ejeschke / ginga

The Ginga astronomical FITS file viewer
BSD 3-Clause "New" or "Revised" License
122 stars 77 forks source link

AstroImage complains about WCS when there is none #73

Closed pllim closed 9 years ago

pllim commented 9 years ago

I wrote a local plugin based on your Histogram to measure local background value from a user drawn annulus. My test image does not have WCS information. When I inspect the log, I see this:

2015-02-06 16:32:39,166 | W | AstroImage.py:568 (info_xy) | Bad coordinate conversion: RA (-1234.551139) is negative
2015-02-06 16:32:39,177 | W | AstroImage.py:568 (info_xy) | Bad coordinate conversion: RA (-1193.458418) is negative

Is it safe for me to ignore this? Better still, is there a way to tell Ginga that it does not have to convert to RA and DEC?

ejeschke commented 9 years ago

@pllim, we really should address this. It's safe to ignore but I think it would be a lot more useful to suppress the messages that happen when mousing around the image, and only show a warning when the image is first loaded and thereafter only if an operation requires a valid wcs.

Leaving this issue open until we have a fix in place.

ejeschke commented 9 years ago

@pllim, I'm having trouble reproducing this issue. I've disabled a couple of log debug messages that get issued when there is no WCS, but this looks like a case of an image with headers that are close enough to trick astropy (or whichever package you are using for WCS support) into thinking that it has a valid WCS and at least building a WCS object from it. Otherwise, I can't see how it would know enough to translate it into a bad RA. If you can find an example FITS that you are willing to send me, please do so. Tnx.

pllim commented 9 years ago

@ejeschke , I can't reproduce it either. I won't put it past bad image header. Let's close this for now and re-open if I can find concrete evidence of this again?

ejeschke commented 9 years ago

Sounds good.