ratt-ru / purr

Data reduction logging tool, Useful for remembering reductions
GNU General Public License v2.0
1 stars 1 forks source link

FITS renderer breaks over blank values in FITS file #25

Closed gijzelaerr closed 10 years ago

gijzelaerr commented 10 years ago
at 2010-08-03 16:34:55 Oleg Smirnov reported:

FITS renderer breaks over blank values in FITS file

gijzelaerr commented 10 years ago

Original comment thread migrated from bugzilla

at 2010-08-03 16:34:55 Oleg Smirnov replied:

It doesn't look like the PURR FITS renderer likes the blanked values in the map I extracted from the SUMSS postage-stamp server, so consider this a bonus bug report!

Error rendering histogram /home/ianh/Desktop/KALIBRATORS/purrlog/entry-20100803- 144252/1218-460-SUMMS.fits.purr-products/0-hist-full.png Traceback (most recent call last): File "/home/ianh/Purr/Purr/Plugins/fits.py", line 251, in regenerate self._make_histogram(hf_path,"Histogram of %s"%title,edges,counts); File "/home/ianh/Purr/Purr/Plugins/fits.py", line 119, in _make_histogram ar.draw(canv); File "/home/ianh/Purr/Purr/Plugins/local_pychart/area.py", line 200, in draw self.x_grid_interval) File "/home/ianh/Purr/Purr/Plugins/local_pychart/area.py", line 179, in __get_data_range dmin, dmax, interval = coord.get_min_max(dmin, dmax, interval) File "/home/ianh/Purr/Purr/Plugins/local_pychart/linear_coord.py", line 34, in get_min_max interval = 10 * (float(int(math.log(dmax-dmin)/math.log(10)))) ValueError: cannot convert float NaN to integer Error rendering histogram /home/ianh/Desktop/KALIBRATORS/purrlog/entry-20100803-144252/1218-460- SUMMS.fits.purr-products/0-hist-zoom.png Traceback (most recent call last): File "/home/ianh/Purr/Purr/Plugins/fits.py", line 293, in regenerate self._make_histogram(hz_path,"Histogram zoom of %s"%title,edges[ih0:ih1],counts[ih0:ih1]); File "/home/ianh/Purr/Purr/Plugins/fits.py", line 119, in _make_histogram ar.draw(canv); File "/home/ianh/Purr/Purr/Plugins/local_pychart/area.py", line 200, in draw self.x_grid_interval) File "/home/ianh/Purr/Purr/Plugins/local_pychart/area.py", line 179, in __get_data_range dmin, dmax, interval = coord.get_min_max(dmin, dmax, interval) File "/home/ianh/Purr/Purr/Plugins/local_pychart/linear_coord.py", line 34, in get_min_max interval = 10 * (float(int(math.log(dmax-dmin)/math.log(10)))) ValueError: cannot convert float NaN to integer

at 2010-08-03 16:35:40 Oleg Smirnov replied:

Ian, could you please send me a FITS file (or attach it to this bug, if it's small?) By "blanked" values, do you mean the FITS image contans actual NANs?

at 2010-08-03 16:58:56 Ian Heywood replied:

The FITS file is available here:

http://www-astro.physics.ox.ac.uk/~ianh/PURRLOGS/kalibrators/entry-20100803-144252/1218-460- SUMMS.fits

at 2010-08-12 15:06:31 Ian Heywood replied:

A couple of other example FITS files for which the renderer didn't play ball:

http://www-astro.physics.ox.ac.uk/~ianh/PURRLOGS/kalibrators/entry-20100808- 000112/stamp.10611-1281617180.fits

and an NVSS one, which interestingly has the blank pixels at the top:

http://www-astro.physics.ox.ac.uk/~ianh/PURRLOGS/kalibrators/entry-20100803-162439/3c273.fits

Purr manages to render an image here but the statistics are skewed because of the NaNs.

Context for this bug report is here:

http://www-astro.physics.ox.ac.uk/~ianh/PURRLOGS/kalibrators/

at 2011-07-02 16:50:30 Oleg Smirnov replied:

Uploaded copies of said files to http://www.astron.nl/meqwiki- data/users/oms/fits-test/, for future testing.

at 2011-07-02 20:13:54 Oleg Smirnov replied:

Fixed in r8253.