|
Bool | generateFITSKeywords (LogIO &os, Bool &isNCP, Double &longPole, Double &latPole, Vector< Double > &crval, Vector< Double > &crpix, Vector< Double > &cdelt, Vector< Double > &pvi_ma, Vector< String > &ctype, Vector< String > &cunit, Matrix< Double > &pc, const CoordinateSystem &cSys, Int skyCoord, Int longAxis, Int latAxis, Int specAxis, Int stokesAxis, Bool writeWCS, Double offset, const String &sprefix) const |
| Generate actual FITS keywords. More...
|
|
Bool | toFITSHeaderStokes (Vector< Double > &crval, Vector< Double > &crpix, Vector< Double > &cdelt, LogIO &os, const CoordinateSystem &coordsys, Int stokesAxis, Int stokesCoord) const |
| Special Stokes processing for conversion to FITS header. More...
|
|
Bool | addDirectionCoordinate (CoordinateSystem &cSys, Vector< Int > &axes, const wcsprm &wcs, LogIO &os) const |
| Look for Coordinate type and add to CS. More...
|
|
Bool | addSpectralCoordinate (CoordinateSystem &cSys, Int &axis, const wcsprm &wcs, const IPosition &shape, LogIO &os) const |
|
Bool | addStokesCoordinate (CoordinateSystem &cSys, Int &axis, Int &stokesFITSValue, const wcsprm &wcs, const IPosition &shape, LogIO &os) const |
|
Bool | addLinearCoordinate (CoordinateSystem &cSys, Vector< Int > &axes, const wcsprm &wcs, LogIO &os) const |
|
Bool | directionSystemFromWCS (LogIO &os, MDirection::Types &type, String &errMsg, const wcsprm &wcs) const |
| Decode values from WCS structures which are generated via the wcs FITS parser. More...
|
|
Bool | frequencySystemFromWCS (LogIO &os, MFrequency::Types &type, String &errMsg, const wcsprm &wcs) const |
|
Bool | stokesCoordinateFromWCS (LogIO &os, StokesCoordinate &coord, Int &stokesFITSValue, String &errMSg, const wcsprm &wcs, uInt shape, Bool warnStokes) const |
|
ObsInfo | getObsInfo (LogIO &os, RecordInterface &header, const wcsprm &wcs) const |
| Decode ObsInfo from wcs structure. More...
|
|
void | setWCS (wcsprm &wcs) const |
| Call wcsset. More...
|
|
Bool | getCDFromHeader (Matrix< Double > &cd, uInt n, const RecordInterface &header) |
| Decode CD cards from FITS file header (Record interface) More...
|
|
void | getPCFromHeader (LogIO &os, Int &rotationAxis, Matrix< Double > &pc, uInt n, const RecordInterface &header, const String &sprefix) |
| Decode PC matrix from FITS header (Record interface) More...
|
|
void | cardsToRecord (LogIO &os, RecordInterface &rec, char *pHeader) const |
| Helper function to convert a wcs structure holding FITS keywords into a Record for later consumption. More...
|
|
void | fixCoordinate (Coordinate &c, LogIO &os) const |
| Fix up Coordinate for zero increments and the like Possibly the wcs FITS parser could do this. More...
|
|
Intended use:
Public interface
Prerequisite
Synopsis
Helper functions to inter-converft between a CoordinateSystem and FITS headers.
Caution:
Example
Motivation
I hate FITS
Thrown Exceptions
Definition at line 89 of file FITSCoordinateUtil.h.
Probably even if we return False we should set up the best linear coordinate that we can.
On output, stokesFITSValue
holds the FITS value of any unofficial Stokes (beam, optical depth, spectral index) for the last unofficial value accessed (-1 if none). The idea is that if the Stokes axis is of length one and holds an unofficial value, you should drop the STokes axis and convert that value to ImageInfo::ImageTypes
with ImageInfo::imageTypeFromFITSValue
. If on input, stokesFITSValue
is positive, then a warning is issued if any unofficial values are encountered. Otherwise no warning is issued.
Convert CoordinateSystem to a FITS header.
In the record the keywords are vectors, it is expected that the actual FITS code will split them into scalars and upcase the names. Returns False if one of the keywords is already taken.
If writeWCS is True, attempt to write the WCS convention (Greisen and Calabretta "Representation of celestial coordinates in FITS") as approved in version 3.0 of the FITS standard. Use oneRelative=True
to convert zero-relative pixel coordinates to one-relative FITS coordinates.
prefix gives the prefix for the FITS keywords. E.g., if prefix="c" then crval, cdelt etc. if prefix="d" then drval, ddelt etc.