reducer icon indicating copy to clipboard operation
reducer copied to clipboard

Imagebrowser gives runtime warning after trying to do reduction

Open rohanrajpal opened this issue 7 years ago • 2 comments

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. issuebias

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

rohanrajpal avatar Mar 17 '18 07:03 rohanrajpal

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.

jimboH avatar Mar 26 '18 02:03 jimboH

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.

mwcraig avatar Mar 26 '18 02:03 mwcraig