-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MRG] FIX: make screenshot() before starting movie #156
Conversation
@@ -37,6 +37,7 @@ def test_offscreen(): | |||
""" | |||
mlab.options.backend = 'auto' | |||
brain = Brain(*std_args, offscreen=True) | |||
_ = brain.screenshot() | |||
shot = brain.screenshot() | |||
assert_array_equal(shot.shape, (800, 800, 3)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also get the same issue in the tests, and can fix it with taking an additional screenshot. Before adding the new line I got
AssertionError:
Arrays are not equal
(mismatch 33.3333333333%)
x: array([765, 800, 3])
y: array([800, 800, 3])
Is that specific to my setup? I am using Mayavi from Anaconda (where Mayavi is still at 4.4.0 and forces Anaconda to 2.3) on OS X 10.11...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably a Mayavi quirk. Just add a comment here, too, about Mayavi giving the wrong resolution on OSX sometimes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added the comment
@Eric89GXL I added the comment |
Thanks @christianbrodbeck |
I sometimes get an issue where the first
screenshot()
is returned at a different resolution (traceback below). If this is not just my system then this PR would fix that.