reducer
reducer copied to clipboard
Imagebrowser gives runtime warning after trying to do reduction
I was trying out the example notebook using the default sample data, sequentially running all the commands.I get a runtime warning with this command
fits_browser = ImageBrowser(images, keys=['imagetyp', 'exposure'])
fits_browser.display()
The warning is
/home/rohan/anaconda3/lib/python3.6/site-packages/astropy/visualization/mpl_normalize.py:117: RuntimeWarning: divide by zero encountered in true_divide
np.true_divide(values, self.vmax - self.vmin, out=values)
/home/rohan/anaconda3/lib/python3.6/site-packages/astropy/visualization/mpl_normalize.py:117: RuntimeWarning: invalid value encountered in true_divide
np.true_divide(values, self.vmax - self.vmin, out=values)
This only happens for imagetyp: BIAS .Other imagetyp fit files are shown correctly.

This is probably related to Issue #162. The error there is different than I'm getting here but it's on the same command(probably). Python version:3.6.4 Reducer version:0.4.1 IPython 6.2.1 Jupyter 4.4.0
It seems to be a weird error, but it does not actually affect the image display. Seems like the normalization step on BIAS image type is not working that properly.
If I had to guess, the error is related to the fact that the data set provided with the package has been a little heavily compressed (in the sense of reducing the dynamic range) to make it smaller, so that it may well be that self.vmin and self.vmax are the same values. Thanks for reporting it though, it should get fixed.