Posts Tagged ‘FITS’

Duplicate EPOCHs in GALEX data

Friday, May 9th, 2008

If you’ve tried the new GALEX survey from the command line, you may have noticed some messages

Warning: Multiple occurrences of key: EPOCH

popping up. Many of the GALEX FITS files have two EPOCH keywords in their headers. Fortunately they both have the same value, so this is innocuous enough. Still the FITS reader gets a bit nervous when it sees this.

It’s a little more embarrassing since the EPOCH keyword is deprecated in FITS. Epoch usually means the time of the observation, but it was explicitly defined to be the epoch of the coordinate system in the original FITS definition. To relieve the confusion this engendered EPOCH was deprecated. We’re supposed to use EQUINOX for the epoch of the coordinate system and DATE-OBS for the epoch of the observatoin.

So having even one EPOCH keyword is bad form much less two!

New ImageFinders and Faster FITS

Thursday, May 8th, 2008

The GALEX release was accompanied by a few other changes. The one that some users may notice is that for surveys where the data is gzip compressed, SkyView should be a little faster. SkyView was sometimes reading the entire image when it only needed to read the FITS headers.

To support the GALEX survey the image finder code in SkyView was updated. In SkyView an image finder is used to find the input image that should be sampled for each pixel in the output image. A new abstract class RectRecurse encapsulates a basic underlying algorithm which says that if we can find a rectangle in the output image where all of the pixels on the edges of the rectangle should be sampled from the same input image, then we can sample the entire rectangle from that input. This class supports two new settings: MinEdge and MaxRad. The MinEdge setting specifies that input images should not be sampled less than MinEdge pixels from their edges. Similarly MaxRad specifies that they may not be sampled at a distance greater than MaxRad from their centers. Note that the units used are pixels in the input image.

The RectRecurse class is extended by non-abstract classes that define criteria for how to pick the best input image for a single pixel in the output image. Current classes include Border which returns the distance from the edge of the image. This is the default for all but the GALEX survey. ScaledBorder is similar except that it scales the pixel distance by the size of the image. It can be useful if the images in the survey are very different in size. Radius returns essentially the inverse of the distance between the output pixel and the center of the input image. MaxExposure returns the exposure of the input image. That is the default for GALEX (where a MaxRad value is also specified).

When putting these in place a change to the main SkyView class was also made so that the ImageFinder and Mosaicker can be specified in the survey specific settings.