Documentation
¶
Overview ¶
Package fits reads the images in FITS files as the FITS Standard 4.0 describes them, and refuses the rest. It reads a header's cards and an image's pixels a row at a time. It reads where the image lies on the sky.
The image is the primary array or an `IMAGE` extension. Its pixels are any of the six types the standard allows. They are scaled by `BSCALE` and `BZERO`, and `BLANK` is read as no value.
Where it lies on the sky is read from the world coordinate cards. The projections read are TAN and CAR, in equatorial or galactic coordinates.
Anything else is refused, and each refusal says why in words.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Frame ¶
type Frame string
Frame is the coordinates an image's axes are in.
const ( // Equatorial is right ascension and declination, ICRS. FK5 at the // J2000 equinox is read as ICRS: the two differ by tens of // milliarcseconds, far below any pixel here. Equatorial Frame = "equatorial" // Galactic is galactic longitude and latitude. Galactic Frame = "galactic" )
The frames an image may be in.
type Header ¶
type Header struct {
// contains filtered or unexported fields
}
Header is a header's cards by keyword. Each value is kept as its card writes it, with its comment taken off.
func ReadHeader ¶
ReadHeader is the header at the front of a reader, read a block at a time to its END card. Headers that end before their END card are refused.
type Image ¶
type Image struct {
// contains filtered or unexported fields
}
Image is a two-dimensional image in a FITS file. Its rows are read as they are asked for.
func Open ¶
Open is the first two-dimensional image in a file: the primary array or an IMAGE extension. HDUs that hold no image are stepped over. Tables and empty primaries are such. Files with no image are refused.
func (*Image) Row ¶
Row is the values of one row. The first row is the bottom one, as the standard counts them. Each is BZERO more than BSCALE times the stored value. Stored BLANKs are NaN, and so are floats that are not a number.
type Sky ¶
type Sky struct {
// contains filtered or unexported fields
}
Sky is where an image's pixels lie on the sky: a projection about a reference point, and the matrix that turns pixels into degrees.
func SkyOf ¶
SkyOf is where a header says its image lies on the sky. It refuses a projection or a frame it does not read, and axes not in degrees.
It refuses a CAR grid not about the equator and a pole moved from where the projection puts it. It refuses an equinox other than J2000 and a pixel matrix with no inverse.