29 #ifndef COORDINATES_FITSCOORDINATEUTIL_H
30 #define COORDINATES_FITSCOORDINATEUTIL_H
43 class CoordinateSystem;
44 class StokesCoordinate;
166 Int specAxis,
Int stokesAxis,
168 const String& sprefix)
const;
176 Int stokesAxis,
Int stokesCoord)
const;
181 const wcsprm& wcs,
LogIO& os)
const;
189 const wcsprm& wcs,
LogIO& os)
const;
195 const wcsprm& wcs)
const;
197 const wcsprm& wcs)
const;
207 void setWCS (wcsprm& wcs)
const;
228 static void wcsInit (::wcsprm& wcsDest);
A Vector of integers, for indexing into Array<T> objects.
A 1-D Specialization of the Array class.
Bool addStokesCoordinate(CoordinateSystem &cSys, Int &axis, Int &stokesFITSValue, const wcsprm &wcs, const IPosition &shape, LogIO &os) const
Geometric parameters needed for a sky projection to a plane.
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.
Bool frequencySystemFromWCS(LogIO &os, MFrequency::Types &type, String &errMsg, const wcsprm &wcs) const
Bool addSpectralCoordinate(CoordinateSystem &cSys, Int &axis, const wcsprm &wcs, const IPosition &shape, LogIO &os) const
Bool getCDFromHeader(Matrix< Double > &cd, uInt n, const RecordInterface &header)
Decode CD cards from FITS file header (Record interface)
virtual casacore::String type() const
Implements RegionShape::type.
ostream-like interface to creating log messages.
ObsInfo getObsInfo(LogIO &os, RecordInterface &header, const wcsprm &wcs) const
Decode ObsInfo from wcs structure.
Store miscellaneous information related to an observation.
Types
Types of known MDirections Warning: The order defines the order in the translation matrix FromTo in ...
Interface for converting between world and pixel coordinates.
Bool fromFITSHeader(Int &stokesFITSValue, CoordinateSystem &coordsys, RecordInterface &recHeader, const Vector< String > &header, const IPosition &shape, uInt which=0) const
Probably even if we return False we should set up the best linear coordinate that we can...
bool Bool
Define the standard types used by Casacore.
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)
Bool toFITSHeader(RecordInterface &header, IPosition &shape, const CoordinateSystem &cSys, Bool oneRelative, Char prefix= 'c', Bool writeWCS=True, Bool preferVelocity=True, Bool opticalVelocity=True, Bool preferWavelength=False, Bool airWavelength=False) const
Convert CoordinateSystem to a FITS header.
TableExprNode shape(const TableExprNode &array)
Function operating on any scalar or array resulting in a Double array containing the shape...
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.
static void wcsInit(::wcsprm &wcsDest)
Initialize the wcsprm struct.
Bool stokesCoordinateFromWCS(LogIO &os, StokesCoordinate &coord, Int &stokesFITSValue, String &errMSg, const wcsprm &wcs, uInt shape, Bool warnStokes) const
void fixCoordinate(Coordinate &c, LogIO &os) const
Fix up Coordinate for zero increments and the like Possibly the wcs FITS parser could do this...
Interconvert between pixel and Stokes value.
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.
const Double c
Fundamental physical constants (SI units):
FITSCoordinateUtil()
Constructor.
String: the storage and methods of handling collections of characters.
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...
Abstract base class for Record classes.
Types
Types of known MFrequencies Warning: The order defines the order in the translation matrix FromTo in...
static Vector< String > cTypeFromDirection(Bool &isNCP, const Projection &proj, const Vector< String > &axisNames, Double refLat, Bool printError)
Helper function to create a FITS style CTYPE vector from the axis names from a DirectionCoordinate.
Bool addLinearCoordinate(CoordinateSystem &cSys, Vector< Int > &axes, const wcsprm &wcs, LogIO &os) const
Interconvert pixel and world coordinates.
void setWCS(wcsprm &wcs) const
Call wcsset.
Bool addDirectionCoordinate(CoordinateSystem &cSys, Vector< Int > &axes, const wcsprm &wcs, LogIO &os) const
Look for Coordinate type and add to CS.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.