WCSLIB 8.2.2
Loading...
Searching...
No Matches
Data Fields
wcsprm Struct Reference

Coordinate transformation parameters. More...

#include <wcs.h>

Data Fields

int flag
 
int naxis
 
double * crpix
 
double * pc
 
double * cdelt
 
double * crval
 
char(* cunit )[72]
 
char(* ctype )[72]
 
double lonpole
 
double latpole
 
double restfrq
 
double restwav
 
int npv
 
int npvmax
 
struct pvcardpv
 
int nps
 
int npsmax
 
struct pscardps
 
double * cd
 
double * crota
 
int altlin
 
int velref
 
char alt [4]
 
int colnum
 
int * colax
 
char(* cname )[72]
 
double * crder
 
double * csyer
 
double * czphs
 
double * cperi
 
char wcsname [72]
 
char timesys [72]
 
char trefpos [72]
 
char trefdir [72]
 
char plephem [72]
 
char timeunit [72]
 
char dateref [72]
 
double mjdref [2]
 
double timeoffs
 
char dateobs [72]
 
char datebeg [72]
 
char dateavg [72]
 
char dateend [72]
 
double mjdobs
 
double mjdbeg
 
double mjdavg
 
double mjdend
 
double jepoch
 
double bepoch
 
double tstart
 
double tstop
 
double xposure
 
double telapse
 
double timsyer
 
double timrder
 
double timedel
 
double timepixr
 
double obsgeo [6]
 
char obsorbit [72]
 
char radesys [72]
 
double equinox
 
char specsys [72]
 
char ssysobs [72]
 
double velosys
 
double zsource
 
char ssyssrc [72]
 
double velangl
 
struct auxprmaux
 
int ntab
 
int nwtb
 
struct tabprmtab
 
struct wtbarrwtb
 
char lngtyp [8]
 
char lattyp [8]
 
int lng
 
int lat
 
int spec
 
int time
 
int cubeface
 
int dummy
 
int * types
 
struct linprm lin
 
struct celprm cel
 
struct spcprm spc
 
struct wcserrerr
 
int m_flag
 
int m_naxis
 
double * m_crpix
 
double * m_pc
 
double * m_cdelt
 
double * m_crval
 
char(* m_cunit )[72]
 
char((* m_ctype )[72]
 
struct pvcardm_pv
 
struct pscardm_ps
 
double * m_cd
 
double * m_crota
 
int * m_colax
 
char(* m_cname )[72]
 
double * m_crder
 
double * m_csyer
 
double * m_czphs
 
double * m_cperi
 
struct auxprmm_aux
 
struct tabprmm_tab
 
struct wtbarrm_wtb
 

Detailed Description

Coordinate transformation parameters.

The wcsprm struct contains information required to transform world coordinates. It consists of certain members that must be set by the user (given) and others that are set by the WCSLIB routines (returned). While the addresses of the arrays themselves may be set by wcsinit() if it (optionally) allocates memory, their contents must be set by the user.

Some parameters that are given are not actually required for transforming coordinates. These are described as "auxiliary"; the struct simply provides a place to store them, though they may be used by wcshdo() in constructing a FITS header from a wcsprm struct. Some of the returned values are supplied for informational purposes and others are for internal use only as indicated.

In practice, it is expected that a WCS parser would scan the FITS header to determine the number of coordinate axes. It would then use wcsinit() to allocate memory for arrays in the wcsprm struct and set default values. Then as it reread the header and identified each WCS keyrecord it would load the value into the relevant wcsprm array element. This is essentially what wcspih() does - refer to the prologue of wcshdr.h. As the final step, wcsset() is invoked, either directly or indirectly, to set the derived members of the wcsprm struct. wcsset() strips off trailing blanks in all string members and null-fills the character array.

Field Documentation

◆ flag

int wcsprm::flag

(Given and returned) This flag must be set to zero whenever any of the following wcsprm struct members are set or changed:

This signals the initialization routine, wcsset(), to recompute the returned members of the linprm, celprm, spcprm, and tabprm structs. wcsset() will reset flag to indicate that this has been done.

PLEASE NOTE: flag should be set to -1 when wcsinit() is called for the first time for a particular wcsprm struct in order to initialize memory management. It must ONLY be used on the first initialization otherwise memory leaks may result.

◆ naxis

int wcsprm::naxis

(Given or returned) Number of pixel and world coordinate elements.

If wcsinit() is used to initialize the linprm struct (as would normally be the case) then it will set naxis from the value passed to it as a function argument. The user should not subsequently modify it.

◆ crpix

double * wcsprm::crpix

(Given) Address of the first element of an array of double containing the coordinate reference pixel, CRPIXja.

◆ pc

double * wcsprm::pc

(Given) Address of the first element of the PCi_ja (pixel coordinate) transformation matrix. The expected order is

struct wcsprm wcs;
wcs.pc = {PC1_1, PC1_2, PC2_1, PC2_2};
Coordinate transformation parameters.
Definition wcs.h:2085
double * pc
Definition wcs.h:2094

This may be constructed conveniently from a 2-D array via

double m[2][2] = {{PC1_1, PC1_2},
{PC2_1, PC2_2}};

which is equivalent to

double m[2][2];
m[0][0] = PC1_1;
m[0][1] = PC1_2;
m[1][0] = PC2_1;
m[1][1] = PC2_2;

The storage order for this 2-D array is the same as for the 1-D array, whence

wcs.pc = *m;

would be legitimate.

◆ cdelt

double * wcsprm::cdelt

(Given) Address of the first element of an array of double containing the coordinate increments, CDELTia.

◆ crval

double * wcsprm::crval

(Given) Address of the first element of an array of double containing the coordinate reference values, CRVALia.

◆ cunit

wcsprm::cunit

(Given) Address of the first element of an array of char[72] containing the CUNITia keyvalues which define the units of measurement of the CRVALia, CDELTia, and CDi_ja keywords.

As CUNITia is an optional header keyword, cunit[][72] may be left blank but otherwise is expected to contain a standard units specification as defined by WCS Paper I. Utility function wcsutrn(), described in wcsunits.h, is available to translate commonly used non-standard units specifications but this must be done as a separate step before invoking wcsset().

For celestial axes, if cunit[][72] is not blank, wcsset() uses wcsunits() to parse it and scale cdelt[], crval[], and cd[][*] to degrees. It then resets cunit[][72] to "deg".

For spectral axes, if cunit[][72] is not blank, wcsset() uses wcsunits() to parse it and scale cdelt[], crval[], and cd[][*] to SI units. It then resets cunit[][72] accordingly.

wcsset() ignores cunit[][72] for other coordinate types; cunit[][72] may be used to label coordinate values.

These variables accomodate the longest allowed string-valued FITS keyword, being limited to 68 characters, plus the null-terminating character.

◆ ctype

wcsprm::ctype

(Given) Address of the first element of an array of char[72] containing the coordinate axis types, CTYPEia.

The ctype[][72] keyword values must be in upper case and there must be zero or one pair of matched celestial axis types, and zero or one spectral axis. The ctype[][72] strings should be padded with blanks on the right and null-terminated so that they are at least eight characters in length.

These variables accomodate the longest allowed string-valued FITS keyword, being limited to 68 characters, plus the null-terminating character.

◆ lonpole

double wcsprm::lonpole

(Given and returned) The native longitude of the celestial pole, $\phi_{\mathrm p}$, given by LONPOLEa [deg] or by PVi_2a [deg] attached to the longitude axis which takes precedence if defined, and ...

◆ latpole

double wcsprm::latpole

(Given and returned) ... the native latitude of the celestial pole, $\theta_{\mathrm p}$, given by LATPOLEa [deg] or by PVi_3a [deg] attached to the longitude axis which takes precedence if defined.

lonpole and latpole may be left to default to values set by wcsinit() (see celprm::ref), but in any case they will be reset by wcsset() to the values actually used. Note therefore that if the wcsprm struct is reused without resetting them, whether directly or via wcsinit(), they will no longer have their default values.

◆ restfrq

double wcsprm::restfrq

(Given) The rest frequency [Hz], and/or ...

◆ restwav

double wcsprm::restwav

(Given) ... the rest wavelength in vacuo [m], only one of which need be given, the other should be set to zero.

◆ npv

int wcsprm::npv

(Given) The number of entries in the wcsprm::pv[] array.

◆ npvmax

int wcsprm::npvmax

(Given or returned) The length of the wcsprm::pv[] array.

npvmax will be set by wcsinit() if it allocates memory for wcsprm::pv[], otherwise it must be set by the user. See also wcsnpv().

◆ pv

struct pvcard * wcsprm::pv

(Given) Address of the first element of an array of length npvmax of pvcard structs.

As a FITS header parser encounters each PVi_ma keyword it should load it into a pvcard struct in the array and increment npv. wcsset() interprets these as required.

Note that, if they were not given, wcsset() resets the entries for PVi_1a, PVi_2a, PVi_3a, and PVi_4a for longitude axis i to match phi_0 and theta_0 (the native longitude and latitude of the reference point), LONPOLEa and LATPOLEa respectively.

◆ nps

int wcsprm::nps

(Given) The number of entries in the wcsprm::ps[] array.

◆ npsmax

int wcsprm::npsmax

(Given or returned) The length of the wcsprm::ps[] array.

npsmax will be set by wcsinit() if it allocates memory for wcsprm::ps[], otherwise it must be set by the user. See also wcsnps().

◆ ps

struct pscard * wcsprm::ps

(Given) Address of the first element of an array of length npsmax of pscard structs.

As a FITS header parser encounters each PSi_ma keyword it should load it into a pscard struct in the array and increment nps. wcsset() interprets these as required (currently no PSi_ma keyvalues are recognized).

◆ cd

double * wcsprm::cd

(Given) For historical compatibility, the wcsprm struct supports two alternate specifications of the linear transformation matrix, those associated with the CDi_ja keywords, and ...

◆ crota

double * wcsprm::crota

(Given) ... those associated with the CROTAi keywords. Although these may not formally co-exist with PCi_ja, the approach taken here is simply to ignore them if given in conjunction with PCi_ja.

◆ altlin

int wcsprm::altlin

(Given) altlin is a bit flag that denotes which of the PCi_ja, CDi_ja and CROTAi keywords are present in the header:

  • Bit 0: PCi_ja is present.

  • Bit 1: CDi_ja is present.

    Matrix elements in the IRAF convention are equivalent to the product CDi_ja = CDELTia * PCi_ja, but the defaults differ from that of the PCi_ja matrix. If one or more CDi_ja keywords are present then all unspecified CDi_ja default to zero. If no CDi_ja (or CROTAi) keywords are present, then the header is assumed to be in PCi_ja form whether or not any PCi_ja keywords are present since this results in an interpretation of CDELTia consistent with the original FITS specification.

    While CDi_ja may not formally co-exist with PCi_ja, it may co-exist with CDELTia and CROTAi which are to be ignored.

  • Bit 2: CROTAi is present.

    In the AIPS convention, CROTAi may only be associated with the latitude axis of a celestial axis pair. It specifies a rotation in the image plane that is applied AFTER the CDELTia; any other CROTAi keywords are ignored.

    CROTAi may not formally co-exist with PCi_ja.

    CROTAi and CDELTia may formally co-exist with CDi_ja but if so are to be ignored.

  • Bit 3: PCi_ja + CDELTia was derived from CDi_ja by wcspcx().

    This bit is set by wcspcx() when it derives PCi_ja and CDELTia from CDi_ja via an orthonormal decomposition. In particular, it signals wcsset() not to replace PCi_ja by a copy of CDi_ja with CDELTia set to unity.

CDi_ja and CROTAi keywords, if found, are to be stored in the wcsprm::cd and wcsprm::crota arrays which are dimensioned similarly to wcsprm::pc and wcsprm::cdelt. FITS header parsers should use the following procedure:

  • Whenever a PCi_ja keyword is encountered:

    altlin |= 1;
    int altlin
    Definition wcs.h:2119

  • Whenever a CDi_ja keyword is encountered:

    altlin |= 2;

  • Whenever a CROTAi keyword is encountered:
    altlin |= 4;

If none of these bits are set the PCi_ja representation results, i.e. wcsprm::pc and wcsprm::cdelt will be used as given.

These alternate specifications of the linear transformation matrix are translated immediately to PCi_ja by wcsset() and are invisible to the lower-level WCSLIB routines. In particular, unless bit 3 is also set, wcsset() resets wcsprm::cdelt to unity if CDi_ja is present (and no PCi_ja).

If CROTAi are present but none is associated with the latitude axis (and no PCi_ja or CDi_ja), then wcsset() reverts to a unity PCi_ja matrix.

◆ velref

int wcsprm::velref

(Given) AIPS velocity code VELREF, refer to spcaips().

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::velref is changed.

◆ alt

char wcsprm::alt

(Given, auxiliary) Character code for alternate coordinate descriptions (i.e. the 'a' in keyword names such as CTYPEia). This is blank for the primary coordinate description, or one of the 26 upper-case letters, A-Z.

An array of four characters is provided for alignment purposes, only the first is used.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::alt is changed.

◆ colnum

int wcsprm::colnum

(Given, auxiliary) Where the coordinate representation is associated with an image-array column in a FITS binary table, this variable may be used to record the relevant column number.

It should be set to zero for an image header or pixel list.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::colnum is changed.

◆ colax

int * wcsprm::colax

(Given, auxiliary) Address of the first element of an array of int recording the column numbers for each axis in a pixel list.

The array elements should be set to zero for an image header or image array in a binary table.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::colax is changed.

◆ cname

wcsprm::cname

(Given, auxiliary) The address of the first element of an array of char[72] containing the coordinate axis names, CNAMEia.

These variables accomodate the longest allowed string-valued FITS keyword, being limited to 68 characters, plus the null-terminating character.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::cname is changed.

◆ crder

double * wcsprm::crder

(Given, auxiliary) Address of the first element of an array of double recording the random error in the coordinate value, CRDERia.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::crder is changed.

◆ csyer

double * wcsprm::csyer

(Given, auxiliary) Address of the first element of an array of double recording the systematic error in the coordinate value, CSYERia.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::csyer is changed.

◆ czphs

double * wcsprm::czphs

(Given, auxiliary) Address of the first element of an array of double recording the time at the zero point of a phase axis, CZPHSia.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::czphs is changed.

◆ cperi

double * wcsprm::cperi

(Given, auxiliary) Address of the first element of an array of double recording the period of a phase axis, CPERIia.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::cperi is changed.

◆ wcsname

char wcsprm::wcsname

(Given, auxiliary) The name given to the coordinate representation, WCSNAMEa. This variable accomodates the longest allowed string-valued FITS keyword, being limited to 68 characters, plus the null-terminating character.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::wcsname is changed.

◆ timesys

char wcsprm::timesys

(Given, auxiliary) TIMESYS keyvalue, being the time scale (UTC, TAI, etc.) in which all other time-related auxiliary header values are recorded. Also defines the time scale for an image axis with CTYPEia set to 'TIME'.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::timesys is changed.

◆ trefpos

char wcsprm::trefpos

(Given, auxiliary) TREFPOS keyvalue, being the location in space where the recorded time is valid.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::trefpos is changed.

◆ trefdir

char wcsprm::trefdir

(Given, auxiliary) TREFDIR keyvalue, being the reference direction used in calculating a pathlength delay.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::trefdir is changed.

◆ plephem

char wcsprm::plephem

(Given, auxiliary) PLEPHEM keyvalue, being the Solar System ephemeris used for calculating a pathlength delay.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::plephem is changed.

◆ timeunit

char wcsprm::timeunit

(Given, auxiliary) TIMEUNIT keyvalue, being the time units in which the following header values are expressed: TSTART, TSTOP, TIMEOFFS, TIMSYER, TIMRDER, TIMEDEL. It also provides the default value for CUNITia for time axes.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::timeunit is changed.

◆ dateref

char wcsprm::dateref

(Given, auxiliary) DATEREF keyvalue, being the date of a reference epoch relative to which other time measurements refer.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::dateref is changed.

◆ mjdref

double wcsprm::mjdref

(Given, auxiliary) MJDREF keyvalue, equivalent to DATEREF expressed as a Modified Julian Date (MJD = JD - 2400000.5). The value is given as the sum of the two-element vector, allowing increased precision.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::mjdref is changed.

◆ timeoffs

double wcsprm::timeoffs

(Given, auxiliary) TIMEOFFS keyvalue, being a time offset, which may be used, for example, to provide a uniform clock correction for times referenced to DATEREF.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::timeoffs is changed.

◆ dateobs

char wcsprm::dateobs

(Given, auxiliary) DATE-OBS keyvalue, being the date at the start of the observation unless otherwise explained in the DATE-OBS keycomment, in ISO format, yyyy-mm-ddThh:mm:ss.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::dateobs is changed.

◆ datebeg

char wcsprm::datebeg

(Given, auxiliary) DATE-BEG keyvalue, being the date at the start of the observation in ISO format, yyyy-mm-ddThh:mm:ss.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::datebeg is changed.

◆ dateavg

char wcsprm::dateavg

(Given, auxiliary) DATE-AVG keyvalue, being the date at a representative mid-point of the observation in ISO format, yyyy-mm-ddThh:mm:ss.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::dateavg is changed.

◆ dateend

char wcsprm::dateend

(Given, auxiliary) DATE-END keyvalue, baing the date at the end of the observation in ISO format, yyyy-mm-ddThh:mm:ss.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::dateend is changed.

◆ mjdobs

double wcsprm::mjdobs

(Given, auxiliary) MJD-OBS keyvalue, equivalent to DATE-OBS expressed as a Modified Julian Date (MJD = JD - 2400000.5).

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::mjdobs is changed.

◆ mjdbeg

double wcsprm::mjdbeg

(Given, auxiliary) MJD-BEG keyvalue, equivalent to DATE-BEG expressed as a Modified Julian Date (MJD = JD - 2400000.5).

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::mjdbeg is changed.

◆ mjdavg

double wcsprm::mjdavg

(Given, auxiliary) MJD-AVG keyvalue, equivalent to DATE-AVG expressed as a Modified Julian Date (MJD = JD - 2400000.5).

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::mjdavg is changed.

◆ mjdend

double wcsprm::mjdend

(Given, auxiliary) MJD-END keyvalue, equivalent to DATE-END expressed as a Modified Julian Date (MJD = JD - 2400000.5).

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::mjdend is changed.

◆ jepoch

double wcsprm::jepoch

(Given, auxiliary) JEPOCH keyvalue, equivalent to DATE-OBS expressed as a Julian epoch.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::jepoch is changed.

◆ bepoch

double wcsprm::bepoch

(Given, auxiliary) BEPOCH keyvalue, equivalent to DATE-OBS expressed as a Besselian epoch

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::bepoch is changed.

◆ tstart

double wcsprm::tstart

(Given, auxiliary) TSTART keyvalue, equivalent to DATE-BEG expressed as a time in units of TIMEUNIT relative to DATEREF+TIMEOFFS.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::tstart is changed.

◆ tstop

double wcsprm::tstop

(Given, auxiliary) TSTOP keyvalue, equivalent to DATE-END expressed as a time in units of TIMEUNIT relative to DATEREF+TIMEOFFS.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::tstop is changed.

◆ xposure

double wcsprm::xposure

(Given, auxiliary) XPOSURE keyvalue, being the effective exposure time in units of TIMEUNIT.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::xposure is changed.

◆ telapse

double wcsprm::telapse

(Given, auxiliary) TELAPSE keyvalue, equivalent to the elapsed time between DATE-BEG and DATE-END, in units of TIMEUNIT.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::telapse is changed.

◆ timsyer

double wcsprm::timsyer

(Given, auxiliary) TIMSYER keyvalue, being the absolute error of the time values, in units of TIMEUNIT.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::timsyer is changed.

◆ timrder

double wcsprm::timrder

(Given, auxiliary) TIMRDER keyvalue, being the accuracy of time stamps relative to each other, in units of TIMEUNIT.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::timrder is changed.

◆ timedel

double wcsprm::timedel

(Given, auxiliary) TIMEDEL keyvalue, being the resolution of the time stamps.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::timedel is changed.

◆ timepixr

double wcsprm::timepixr

(Given, auxiliary) TIMEPIXR keyvalue, being the relative position of the time stamps in binned time intervals, a value between 0.0 and 1.0.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::timepixr is changed.

◆ obsgeo

double wcsprm::obsgeo

(Given, auxiliary) Location of the observer in a standard terrestrial reference frame. The first three give ITRS Cartesian coordinates OBSGEO-X [m], OBSGEO-Y [m], OBSGEO-Z [m], and the second three give OBSGEO-L [deg], OBSGEO-B [deg], OBSGEO-H [m], which are related through a standard transformation.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::obsgeo is changed.

◆ obsorbit

char wcsprm::obsorbit

(Given, auxiliary) OBSORBIT keyvalue, being the URI, URL, or name of an orbit ephemeris file giving spacecraft coordinates relating to TREFPOS.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::obsorbit is changed.

◆ radesys

char wcsprm::radesys

(Given, auxiliary) The equatorial or ecliptic coordinate system type, RADESYSa.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::radesys is changed.

◆ equinox

double wcsprm::equinox

(Given, auxiliary) The equinox associated with dynamical equatorial or ecliptic coordinate systems, EQUINOXa (or EPOCH in older headers). Not applicable to ICRS equatorial or ecliptic coordinates.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::equinox is changed.

◆ specsys

char wcsprm::specsys

(Given, auxiliary) Spectral reference frame (standard of rest), SPECSYSa.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::specsys is changed.

◆ ssysobs

char wcsprm::ssysobs

(Given, auxiliary) The spectral reference frame in which there is no differential variation in the spectral coordinate across the field-of-view, SSYSOBSa.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::ssysobs is changed.

◆ velosys

double wcsprm::velosys

(Given, auxiliary) The relative radial velocity [m/s] between the observer and the selected standard of rest in the direction of the celestial reference coordinate, VELOSYSa.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::velosys is changed.

◆ zsource

double wcsprm::zsource

(Given, auxiliary) The redshift, ZSOURCEa, of the source.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::zsource is changed.

◆ ssyssrc

char wcsprm::ssyssrc

(Given, auxiliary) The spectral reference frame (standard of rest), SSYSSRCa, in which wcsprm::zsource was measured.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::ssyssrc is changed.

◆ velangl

double wcsprm::velangl

(Given, auxiliary) The angle [deg] that should be used to decompose an observed velocity into radial and transverse components.

It is not necessary to reset the wcsprm struct (via wcsset()) when wcsprm::velangl is changed.

◆ aux

struct auxprm * wcsprm::aux

(Given, auxiliary) This struct holds auxiliary coordinate system information of a specialist nature. While these parameters may be widely recognized within particular fields of astronomy, they differ from the above auxiliary parameters in not being defined by any of the FITS WCS standards. Collecting them together in a separate struct that is allocated only when required helps to control bloat in the size of the wcsprm struct.

◆ ntab

int wcsprm::ntab

(Given) See wcsprm::tab.

◆ nwtb

int wcsprm::nwtb

(Given) See wcsprm::wtb.

◆ tab

struct tabprm * wcsprm::tab

(Given) Address of the first element of an array of ntab tabprm structs for which memory has been allocated. These are used to store tabular transformation parameters.

Although technically wcsprm::ntab and tab are "given", they will normally be set by invoking wcstab(), whether directly or indirectly.

The tabprm structs contain some members that must be supplied and others that are derived. The information to be supplied comes primarily from arrays stored in one or more FITS binary table extensions. These arrays, referred to here as "wcstab arrays", are themselves located by parameters stored in the FITS image header.

◆ wtb

struct wtbarr * wcsprm::wtb

(Given) Address of the first element of an array of nwtb wtbarr structs for which memory has been allocated. These are used in extracting wcstab arrays from a FITS binary table.

Although technically wcsprm::nwtb and wtb are "given", they will normally be set by invoking wcstab(), whether directly or indirectly.

◆ lngtyp

char wcsprm::lngtyp

(Returned) Four-character WCS celestial longitude and ...

◆ lattyp

char wcsprm::lattyp

(Returned) ... latitude axis types. e.g. "RA", "DEC", "GLON", "GLAT", etc. extracted from 'RA–', 'DEC-', 'GLON', 'GLAT', etc. in the first four characters of CTYPEia but with trailing dashes removed. (Declared as char[8] for alignment reasons.)

◆ lng

int wcsprm::lng

(Returned) Index for the longitude coordinate, and ...

◆ lat

int wcsprm::lat

(Returned) ... index for the latitude coordinate, and ...

◆ spec

int wcsprm::spec

(Returned) ... index for the spectral coordinate, and ...

◆ time

int wcsprm::time

(Returned) ... index for the time coordinate in the imgcrd[][] and world[][] arrays in the API of wcsp2s(), wcss2p() and wcsmix().

These may also serve as indices into the pixcrd[][] array provided that the PCi_ja matrix does not transpose axes.

◆ cubeface

int wcsprm::cubeface

(Returned) Index into the pixcrd[][] array for the CUBEFACE axis. This is used for quadcube projections where the cube faces are stored on a separate axis (see wcs.h).

◆ dummy

int wcsprm::dummy

◆ types

int * wcsprm::types

(Returned) Address of the first element of an array of int containing a four-digit type code for each axis.

  • First digit (i.e. 1000s):

    • 0: Non-specific coordinate type.
    • 1: Stokes coordinate.
    • 2: Celestial coordinate (including CUBEFACE).
    • 3: Spectral coordinate.
    • 4: Time coordinate.

  • Second digit (i.e. 100s):

    • 0: Linear axis.
    • 1: Quantized axis (STOKES, CUBEFACE).
    • 2: Non-linear celestial axis.
    • 3: Non-linear spectral axis.
    • 4: Logarithmic axis.
    • 5: Tabular axis.

  • Third digit (i.e. 10s):

    • 0: Group number, e.g. lookup table number, being an index into the tabprm array (see above).

  • The fourth digit is used as a qualifier depending on the axis type.

    • For celestial axes:

      • 0: Longitude coordinate.
      • 1: Latitude coordinate.
      • 2: CUBEFACE number.

    • For lookup tables: the axis number in a multidimensional table.

CTYPEia in "4-3" form with unrecognized algorithm code will have its type set to -1 and generate an error.

◆ lin

struct linprm wcsprm::lin

(Returned) Linear transformation parameters (usage is described in the prologue to lin.h).

◆ cel

struct celprm wcsprm::cel

(Returned) Celestial transformation parameters (usage is described in the prologue to cel.h).

◆ spc

struct spcprm wcsprm::spc

(Returned) Spectral transformation parameters (usage is described in the prologue to spc.h).

◆ err

struct wcserr * wcsprm::err

(Returned) If enabled, when an error status is returned, this struct contains detailed information about the error, see wcserr_enable().

◆ m_flag

int wcsprm::m_flag

(For internal use only.)

◆ m_naxis

int wcsprm::m_naxis

(For internal use only.)

◆ m_crpix

double * wcsprm::m_crpix

(For internal use only.)

◆ m_pc

double * wcsprm::m_pc

(For internal use only.)

◆ m_cdelt

double * wcsprm::m_cdelt

(For internal use only.)

◆ m_crval

double * wcsprm::m_crval

(For internal use only.)

◆ m_cunit

wcsprm::m_cunit

(For internal use only.)

◆ m_ctype

wcsprm::m_ctype

(For internal use only.)

◆ m_pv

struct pvcard * wcsprm::m_pv

(For internal use only.)

◆ m_ps

struct pscard * wcsprm::m_ps

(For internal use only.)

◆ m_cd

double * wcsprm::m_cd

(For internal use only.)

◆ m_crota

double * wcsprm::m_crota

(For internal use only.)

◆ m_colax

int * wcsprm::m_colax

(For internal use only.)

◆ m_cname

wcsprm::m_cname

(For internal use only.)

◆ m_crder

double * wcsprm::m_crder

(For internal use only.)

◆ m_csyer

double * wcsprm::m_csyer

(For internal use only.)

◆ m_czphs

double * wcsprm::m_czphs

(For internal use only.)

◆ m_cperi

double * wcsprm::m_cperi

(For internal use only.)

◆ m_aux

struct auxprm* wcsprm::m_aux

◆ m_tab

struct tabprm * wcsprm::m_tab

(For internal use only.)

◆ m_wtb

struct wtbarr * wcsprm::m_wtb

(For internal use only.)