You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Severe bug in imshow when plotting images with small values #6394
What is the dtype of the input data? What is its range? I wonder if
something degenerate is happening during normalization.
Also, which version of matplotlib are you using? The master branch has a
completely overhauled image architecture that may or may not suffer from
this.
@WeatherGod - the data is dtype('>f8'), so could be a big-endian issue? (this will be the case for a large fraction of Astronomical data). I am using the latest commit from master.
It is something funny with the '>f8' type. If you do anything to change the data type of the input (multiply by 1, hdu.data.astype('float'), hdu.data.byteswap().newbyteorder()) fixes the plot.
Activity
tacaswell commentedon May 10, 2016
attn @mdboom
It looks like this is master or 2.x?
astrofrog commentedon May 10, 2016
@tacaswell - this is on master (haven't tested on other branches)
WeatherGod commentedon May 10, 2016
What is the dtype of the input data? What is its range? I wonder if
something degenerate is happening during normalization.
Also, which version of matplotlib are you using? The master branch has a
completely overhauled image architecture that may or may not suffer from
this.
On Tue, May 10, 2016 at 9:48 AM, Thomas Robitaille <notifications@github.com
astrofrog commentedon May 10, 2016
@WeatherGod - the data is
dtype('>f8'), so could be a big-endian issue? (this will be the case for a large fraction of Astronomical data). I am using the latest commit from master.jenshnielsen commentedon May 10, 2016
I can reproduce it with 2.x and master but not on 1.5.1 so it's likely to be a result of the image refactoring
The following warning is also raised on 2.x/master
tacaswell commentedon May 12, 2016
It is something funny with the
'>f8'type. If you do anything to change the data type of the input (multiply by1,hdu.data.astype('float'),hdu.data.byteswap().newbyteorder()) fixes the plot.@mdboom I think the problem is in here https://github.com/matplotlib/matplotlib/blob/master/src/_image_wrapper.cpp#L280 which does not do anything special about non-native byte order. I am not sure of the right place to fix this (c++ layer or where we intake the data).
efiring commentedon May 15, 2016
This should be fixed by #6422. Please reopen if you find this is not the case.
FIX: handle non-native endian images
FIX: handle non-native endian images
FIX: handle non-native endian images
FIX: handle non-native endian images