cfitsio  3390
Macros | Functions | Variables
fitscore.c File Reference
#include <string.h>
#include <limits.h>
#include <stdlib.h>
#include <math.h>
#include <ctype.h>
#include <errno.h>
#include <stddef.h>
#include <locale.h>
#include "fitsio2.h"
Include dependency graph for fitscore.c:

Macros

#define errmsgsiz   25
 
#define ESMARKER   27 /* Escape character is used as error stack marker */
 Escape character is used as error stack marker. More...
 
#define DelAll   1 /* delete all messages on the error stack */
 delete all messages on the error stack More...
 
#define DelMark   2 /* delete newest messages back to and including marker */
 delete newest messages back to and including marker More...
 
#define DelNewest   3 /* delete the newest message from the stack */
 delete the newest message from the stack More...
 
#define GetMesg   4 /* pop and return oldest message, ignoring marks */
 pop and return oldest message, ignoring marks More...
 
#define PutMesg   5 /* add a new message to the stack */
 add a new message to the stack More...
 
#define PutMark   6 /* add a marker to the stack */
 add a marker to the stack More...
 

Functions

float ffvers (float *version)
 
int ffflnm (fitsfile *fptr, char *filename, int *status)
 
int ffflmd (fitsfile *fptr, int *filemode, int *status)
 
void ffgerr (int status, char *errtext)
 
void ffpmsg (const char *err_message)
 
void ffpmrk (void)
 
int ffgmsg (char *err_message)
 
void ffcmsg (void)
 
void ffcmrk (void)
 
void ffxmsg (int action, char *errmsg)
 
int ffpxsz (int datatype)
 
int fftkey (const char *keyword, int *status)
 
int fftrec (char *card, int *status)
 
void ffupch (char *string)
 
int ffmkky (const char *keyname, char *value, const char *comm, char *card, int *status)
 
int ffmkey (fitsfile *fptr, const char *card, int *status)
 
int ffkeyn (const char *keyroot, int value, char *keyname, int *status)
 
int ffnkey (int value, const char *keyroot, char *keyname, int *status)
 
int ffpsvc (char *card, char *value, char *comm, int *status)
 
int ffgthd (char *tmplt, char *card, int *hdtype, int *status)
 
int fits_translate_keyword (char *inrec, char *outrec, char *patterns[][2], int npat, int n_value, int n_offset, int n_range, int *pat_num, int *i, int *j, int *m, int *n, int *status)
 
int fits_translate_keywords (fitsfile *infptr, fitsfile *outfptr, int firstkey, char *patterns[][2], int npat, int n_value, int n_offset, int n_range, int *status)
 
int fits_copy_pixlist2image (fitsfile *infptr, fitsfile *outfptr, int firstkey, int naxis, int *colnum, int *status)
 
int fits_translate_pixkeyword (char *inrec, char *outrec, char *patterns[][2], int npat, int naxis, int *colnum, int *pat_num, int *i, int *j, int *n, int *m, int *l, int *status)
 
int ffasfm (char *tform, int *dtcode, long *twidth, int *decimals, int *status)
 
int ffbnfm (char *tform, int *dtcode, long *trepeat, long *twidth, int *status)
 
int ffbnfmll (char *tform, int *dtcode, LONGLONG *trepeat, long *twidth, int *status)
 
void ffcfmt (char *tform, char *cform)
 
void ffcdsp (char *tform, char *cform)
 
int ffgcno (fitsfile *fptr, int casesen, char *templt, int *colnum, int *status)
 
int ffgcnn (fitsfile *fptr, int casesen, char *templt, char *colname, int *colnum, int *status)
 
void ffcmps (char *templt, char *colname, int casesen, int *match, int *exact)
 
int ffgtcl (fitsfile *fptr, int colnum, int *typecode, long *repeat, long *width, int *status)
 
int ffgtclll (fitsfile *fptr, int colnum, int *typecode, LONGLONG *repeat, LONGLONG *width, int *status)
 
int ffeqty (fitsfile *fptr, int colnum, int *typecode, long *repeat, long *width, int *status)
 
int ffeqtyll (fitsfile *fptr, int colnum, int *typecode, LONGLONG *repeat, LONGLONG *width, int *status)
 
int ffgncl (fitsfile *fptr, int *ncols, int *status)
 
int ffgnrw (fitsfile *fptr, long *nrows, int *status)
 
int ffgnrwll (fitsfile *fptr, LONGLONG *nrows, int *status)
 
int ffgacl (fitsfile *fptr, int colnum, char *ttype, long *tbcol, char *tunit, char *tform, double *tscal, double *tzero, char *tnull, char *tdisp, int *status)
 
int ffgbcl (fitsfile *fptr, int colnum, char *ttype, char *tunit, char *dtype, long *repeat, double *tscal, double *tzero, long *tnull, char *tdisp, int *status)
 
int ffgbclll (fitsfile *fptr, int colnum, char *ttype, char *tunit, char *dtype, LONGLONG *repeat, double *tscal, double *tzero, LONGLONG *tnull, char *tdisp, int *status)
 
int ffghdn (fitsfile *fptr, int *chdunum)
 
int ffghadll (fitsfile *fptr, LONGLONG *headstart, LONGLONG *datastart, LONGLONG *dataend, int *status)
 
int ffghof (fitsfile *fptr, OFF_T *headstart, OFF_T *datastart, OFF_T *dataend, int *status)
 
int ffghad (fitsfile *fptr, long *headstart, long *datastart, long *dataend, int *status)
 
int ffrhdu (fitsfile *fptr, int *hdutype, int *status)
 
int ffpinit (fitsfile *fptr, int *status)
 
int ffainit (fitsfile *fptr, int *status)
 
int ffbinit (fitsfile *fptr, int *status)
 
int ffgabc (int tfields, char **tform, int space, long *rowlen, long *tbcol, int *status)
 
int ffgtbc (fitsfile *fptr, LONGLONG *totalwidth, int *status)
 
int ffgtbp (fitsfile *fptr, char *name, char *value, int *status)
 
int ffgcprll (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG firstelem, LONGLONG nelem, int writemode, double *scale, double *zero, char *tform, long *twidth, int *tcode, int *maxelem, LONGLONG *startpos, LONGLONG *elemnum, long *incre, LONGLONG *repeat, LONGLONG *rowlen, int *hdutype, LONGLONG *tnull, char *snull, int *status)
 
int fftheap (fitsfile *fptr, LONGLONG *heapsz, LONGLONG *unused, LONGLONG *overlap, int *valid, int *status)
 
int ffcmph (fitsfile *fptr, int *status)
 
int ffgdes (fitsfile *fptr, int colnum, LONGLONG rownum, long *length, long *heapaddr, int *status)
 
int ffgdesll (fitsfile *fptr, int colnum, LONGLONG rownum, LONGLONG *length, LONGLONG *heapaddr, int *status)
 
int ffgdess (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG nrows, long *length, long *heapaddr, int *status)
 
int ffgdessll (fitsfile *fptr, int colnum, LONGLONG firstrow, LONGLONG nrows, LONGLONG *length, LONGLONG *heapaddr, int *status)
 
int ffpdes (fitsfile *fptr, int colnum, LONGLONG rownum, LONGLONG length, LONGLONG heapaddr, int *status)
 
int ffchdu (fitsfile *fptr, int *status)
 
int ffuptf (fitsfile *fptr, int *status)
 
int ffrdef (fitsfile *fptr, int *status)
 
int ffhdef (fitsfile *fptr, int morekeys, int *status)
 
int ffwend (fitsfile *fptr, int *status)
 
int ffpdfl (fitsfile *fptr, int *status)
 
int ffchfl (fitsfile *fptr, int *status)
 
int ffcdfl (fitsfile *fptr, int *status)
 
int ffcrhd (fitsfile *fptr, int *status)
 
int ffdblk (fitsfile *fptr, long nblocks, int *status)
 
int ffghdt (fitsfile *fptr, int *exttype, int *status)
 
int fits_is_reentrant (void)
 
int fits_is_compressed_image (fitsfile *fptr, int *status)
 
int ffgipr (fitsfile *infptr, int maxaxis, int *bitpix, int *naxis, long *naxes, int *status)
 
int ffgiprll (fitsfile *infptr, int maxaxis, int *bitpix, int *naxis, LONGLONG *naxes, int *status)
 
int ffgidt (fitsfile *fptr, int *imgtype, int *status)
 
int ffgiet (fitsfile *fptr, int *imgtype, int *status)
 
int ffgidm (fitsfile *fptr, int *naxis, int *status)
 
int ffgisz (fitsfile *fptr, int nlen, long *naxes, int *status)
 
int ffgiszll (fitsfile *fptr, int nlen, LONGLONG *naxes, int *status)
 
int ffmahd (fitsfile *fptr, int hdunum, int *exttype, int *status)
 
int ffmrhd (fitsfile *fptr, int hdumov, int *exttype, int *status)
 
int ffmnhd (fitsfile *fptr, int exttype, char *hduname, int hduver, int *status)
 
int ffthdu (fitsfile *fptr, int *nhdu, int *status)
 
int ffgext (fitsfile *fptr, int hdunum, int *exttype, int *status)
 
int ffiblk (fitsfile *fptr, long nblock, int headdata, int *status)
 
int ffgkcl (char *tcard)
 
int ffdtyp (const char *cval, char *dtype, int *status)
 
int ffinttyp (char *cval, int *dtype, int *negative, int *status)
 
int ffc2x (const char *cval, char *dtype, long *ival, int *lval, char *sval, double *dval, int *status)
 
int ffc2xx (const char *cval, char *dtype, LONGLONG *ival, int *lval, char *sval, double *dval, int *status)
 
int ffc2i (const char *cval, long *ival, int *status)
 
int ffc2j (const char *cval, LONGLONG *ival, int *status)
 
int ffc2l (const char *cval, int *lval, int *status)
 
int ffc2r (const char *cval, float *fval, int *status)
 
int ffc2d (const char *cval, double *dval, int *status)
 
int ffc2ii (const char *cval, long *ival, int *status)
 
int ffc2jj (const char *cval, LONGLONG *ival, int *status)
 
int ffc2ll (const char *cval, int *lval, int *status)
 
int ffc2s (const char *instr, char *outstr, int *status)
 
int ffc2rr (const char *cval, float *fval, int *status)
 
int ffc2dd (const char *cval, double *dval, int *status)
 

Variables

int STREAM_DRIVER = 0
 
struct lconv * lcxxx
 

Macro Definition Documentation

#define DelAll   1 /* delete all messages on the error stack */

delete all messages on the error stack

#define DelMark   2 /* delete newest messages back to and including marker */

delete newest messages back to and including marker

#define DelNewest   3 /* delete the newest message from the stack */

delete the newest message from the stack

#define errmsgsiz   25
#define ESMARKER   27 /* Escape character is used as error stack marker */

Escape character is used as error stack marker.

#define GetMesg   4 /* pop and return oldest message, ignoring marks */

pop and return oldest message, ignoring marks

#define PutMark   6 /* add a marker to the stack */

add a marker to the stack

#define PutMesg   5 /* add a new message to the stack */

add a new message to the stack

Function Documentation

int ffainit ( fitsfile fptr,
int *  status 
)

initialize the parameters defining the structure of an ASCII table

Parameters
[in]fptrFITS file pointer
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffasfm ( char *  tform,
int *  dtcode,
long *  twidth,
int *  decimals,
int *  status 
)

parse the ASCII table TFORM column format to determine the data type, the field width, and number of decimal places (if relevant)

Parameters
[in]tformformat code from the TFORMn keyword
[out]dtcodenumerical datatype code
[out]twidthwidth of the field, in chars
[out]decimalsnumber of decimal places (F, E, D format)
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffbinit ( fitsfile fptr,
int *  status 
)

initialize the parameters defining the structure of a binary table

Parameters
[in]fptrFITS file pointer
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffbnfm ( char *  tform,
int *  dtcode,
long *  trepeat,
long *  twidth,
int *  status 
)

parse the binary table TFORM column format to determine the data type, repeat count, and the field width (if it is an ASCII (A) field)

Parameters
[in]tformformat code from the TFORMn keyword
[out]dtcodenumerical datatype code
[out]trepeatrepeat count of the field
[out]twidthwidth of the field, in chars
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffbnfmll ( char *  tform,
int *  dtcode,
LONGLONG trepeat,
long *  twidth,
int *  status 
)

parse the binary table TFORM column format to determine the data type, repeat count, and the field width (if it is an ASCII (A) field)

Parameters
[in]tformformat code from the TFORMn keyword
[out]dtcodenumerical datatype code
[out]trepeatrepeat count of the field
[out]twidthwidth of the field, in chars
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffc2d ( const char *  cval,
double *  dval,
int *  status 
)

convert formatted string to a double value, doing implicit datatype conversion if necessary

Parameters
[in]cvalstring representation of the value
[out]dvalnumerical value of the input string
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffc2dd ( const char *  cval,
double *  dval,
int *  status 
)

convert null-terminated formatted string to a double value

Parameters
[in]cvalstring representation of the value
[out]dvalnumerical value of the input string
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffc2i ( const char *  cval,
long *  ival,
int *  status 
)

convert formatted string to an integer value, doing implicit datatype conversion if necessary.

Parameters
[in]cvalstring representation of the value
[out]ivalnumerical value of the input string
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffc2ii ( const char *  cval,
long *  ival,
int *  status 
)

convert null-terminated formatted string to an integer value

Parameters
[in]cvalstring representation of the value
[out]ivalnumerical value of the input string
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffc2j ( const char *  cval,
LONGLONG ival,
int *  status 
)

convert formatted string to a LONGLONG integer value, doing implicit datatype conversion if necessary.

Parameters
[in]cvalstring representation of the value
[out]ivalnumerical value of the input string
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffc2jj ( const char *  cval,
LONGLONG ival,
int *  status 
)

convert null-terminated formatted string to an long long integer value

Parameters
[in]cvalstring representation of the value
[out]ivalnumerical value of the input string
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffc2l ( const char *  cval,
int *  lval,
int *  status 
)

convert formatted string to a logical value, doing implicit datatype conversion if necessary

Parameters
[in]cvalstring representation of the value
[out]lvalnumerical value of the input string
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffc2ll ( const char *  cval,
int *  lval,
int *  status 
)

convert null-terminated formatted string to a logical value

Parameters
[in]cvalstring representation of the value: T or F
[out]lvalnumerical value of the input string: 1 or 0
[in,out]statuserror status

Here is the caller graph for this function:

int ffc2r ( const char *  cval,
float *  fval,
int *  status 
)

convert formatted string to a real float value, doing implicit datatype conversion if necessary

Parameters
[in]cvalstring representation of the value
[out]fvalnumerical value of the input string
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffc2rr ( const char *  cval,
float *  fval,
int *  status 
)

convert null-terminated formatted string to a float value

Parameters
[in]cvalstring representation of the value
[out]fvalnumerical value of the input string
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffc2s ( const char *  instr,
char *  outstr,
int *  status 
)

convert an input quoted string to an unquoted string by removing the leading and trailing quote character. Also, replace any pairs of single quote characters with just a single quote character (FITS used a pair of single quotes to represent a literal quote character within the string).

Parameters
[in]instrnull terminated quoted input string
[out]outstrnull terminated output string without quotes
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffc2x ( const char *  cval,
char *  dtype,
long *  ival,
int *  lval,
char *  sval,
double *  dval,
int *  status 
)

high level routine to convert formatted character string to its intrinsic data type

Parameters
[in]cvalformatted string representation of the value
[out]dtypedatatype code: C, L, F, I or X Only one of the 5 pointer value will be defined, depending on datatype
[out]ivalinteger value
[out]lvallogical value
[out]svalstring value
[out]dvaldouble value
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffc2xx ( const char *  cval,
char *  dtype,
LONGLONG ival,
int *  lval,
char *  sval,
double *  dval,
int *  status 
)

high level routine to convert formatted character string to its intrinsic data type

Parameters
[in]cvalformatted string representation of the value
[out]dtypedatatype code: C, L, F, I or X Only one of the 5 pointer value will be defined, depending on datatype
[out]ivalinteger value
[out]lvallogical value
[out]svalstring value
[out]dvaldouble value
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffcdfl ( fitsfile fptr,
int *  status 
)
void ffcdsp ( char *  tform,
char *  cform 
)

convert the FITS TDISPn display format into the equivalent C format suitable for use in a printf statement.

Parameters
tformvalue of an ASCII table TFORMn keyword
cformequivalent format code in C language syntax

Here is the caller graph for this function:

void ffcfmt ( char *  tform,
char *  cform 
)

convert the FITS format string for an ASCII Table extension column into the equivalent C format string that can be used in a printf statement, after the values have been read as a double.

Parameters
tformvalue of an ASCII table TFORMn keyword
cformequivalent format code in C language syntax

Here is the caller graph for this function:

int ffchdu ( fitsfile fptr,
int *  status 
)

close the current HDU. If we have write access to the file, then:

  • write the END keyword and pad header with blanks if necessary
  • check the data fill values, and rewrite them if not correct
    Parameters
    [in]fptrFITS file pointer
    [in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffchfl ( fitsfile fptr,
int *  status 
)

Check Header Fill values

  Check that the header unit is correctly filled with blanks from
  the END card to the end of the current FITS 2880-byte block

Translated ftchfl into C by Peter Wilson, Oct. 1997
Parameters
[in]fptrFITS file pointer
[in,out]statuserror status

Here is the call graph for this function:

int ffcmph ( fitsfile fptr,
int *  status 
)

compress the binary table heap by reordering the contents heap and recovering any unused space

Parameters
[in]fptrFITS file pointer
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

void ffcmps ( char *  templt,
char *  colname,
int  casesen,
int *  match,
int *  exact 
)

compare the template to the string and test if they match. The strings are limited to 68 characters or less (the max. length of a FITS string keyword value. This routine reports whether the two strings match and whether the match is exact or involves wildcards.

This algorithm is very similar to the way unix filename wildcards work except that this first treats a wild card as a literal character when looking for a match. If there is no literal match, then it interpretes it as a wild card. So the template 'AB*DE' is considered to be an exact rather than a wild card match to the string 'AB*DE'. The '#' wild card in the template string will match any consecutive string of decimal digits in the colname.

Parameters
[in]templtinput template (may have wildcards)
[in]colnamefull column name up to 68 + 1 chars long
[in]casesencase sensitive string comparison? 1=yes
[out]matchdo template and colname match? 1=yes
[out]exact)do strings exactly match, or wildcards

Here is the call graph for this function:

Here is the caller graph for this function:

void ffcmrk ( void  )

erase newest messages in the error stack, stopping if a marker is found. The marker is also erased in this case.

Here is the call graph for this function:

Here is the caller graph for this function:

void ffcmsg ( void  )

erase all messages in the error stack

Here is the call graph for this function:

Here is the caller graph for this function:

int ffcrhd ( fitsfile fptr,
int *  status 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int ffdblk ( fitsfile fptr,
long  nblocks,
int *  status 
)

Delete the specified number of 2880-byte blocks from the end of the CHDU by shifting all following extensions up this number of blocks.

Parameters
[in]fptrFITS file pointer
[in]nblocksnumber of 2880-byte blocks to delete
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffdtyp ( const char *  cval,
char *  dtype,
int *  status 
)

determine implicit datatype of input string. This assumes that the string conforms to the FITS standard for keyword values, so may not detect all invalid formats.

Parameters
[in]cvalformatted string representation of the value
[out]dtypedatatype code: C, L, F, I, or X
[in,out]statuserror status

Here is the caller graph for this function:

int ffeqty ( fitsfile fptr,
int  colnum,
int *  typecode,
long *  repeat,
long *  width,
int *  status 
)

Get the 'equivalent' table column type.

This routine is similar to the ffgtcl routine (which returns the physical datatype of the column, as stored in the FITS file) except that if the TSCALn and TZEROn keywords are defined for the column, then it returns the 'equivalent' datatype. Thus, if the column is defined as '1I' (short integer) this routine may return the type as 'TUSHORT' or as 'TFLOAT' depending on the TSCALn and TZEROn values.

Returns the datatype code of the column, as well as the vector repeat count and (if it is an ASCII character column) the width of the field or a unit string within the field. This supports the TFORMn = 'rAw' syntax for specifying arrays of substrings, so if TFORMn = '60A12' then repeat = 60 and width = 12.

Parameters
[in]fptrFITS file pointer
[in]colnumcolumn number
[out]typecodedatatype code (21 = short, etc)
[out]repeatrepeat count of field
[out]widthif ASCII, width of field or unit string
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffeqtyll ( fitsfile fptr,
int  colnum,
int *  typecode,
LONGLONG repeat,
LONGLONG width,
int *  status 
)

Get the 'equivalent' table column type.

This routine is similar to the ffgtcl routine (which returns the physical datatype of the column, as stored in the FITS file) except that if the TSCALn and TZEROn keywords are defined for the column, then it returns the 'equivalent' datatype. Thus, if the column is defined as '1I' (short integer) this routine may return the type as 'TUSHORT' or as 'TFLOAT' depending on the TSCALn and TZEROn values.

Returns the datatype code of the column, as well as the vector repeat count and (if it is an ASCII character column) the width of the field or a unit string within the field. This supports the TFORMn = 'rAw' syntax for specifying arrays of substrings, so if TFORMn = '60A12' then repeat = 60 and width = 12.

Parameters
[in]fptrfile pointer
[in]colnumcolumn number
[out]typecodedatatype code (21 = short, etc)
[out]repeatrepeat count of field
[out]widthif ASCII, width of field or unit string
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffflmd ( fitsfile fptr,
int *  filemode,
int *  status 
)

return the access mode of the FITS file

Parameters
[in]fptrFITS file pointer
[out]filemodeopen mode of the file
[in,out]statuserror status

Here is the caller graph for this function:

int ffflnm ( fitsfile fptr,
char *  filename,
int *  status 
)

return the name of the FITS file

Parameters
[in]fptrFITS file pointer
[out]filenamename of the file
[in,out]statuserror status

Here is the caller graph for this function:

int ffgabc ( int  tfields,
char **  tform,
int  space,
long *  rowlen,
long *  tbcol,
int *  status 
)

calculate the starting byte offset of each column of an ASCII table and the total length of a row, in bytes. The input space value determines how many blank spaces to leave between each column (1 is recommended).

Parameters
[in]tfieldsnumber of columns in the table
[in]tformvalue of TFORMn keyword for each column
[in]spacenumber of spaces to leave between cols
[out]rowlentotal width of a table row
[out]tbcolstarting byte in row for each column
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgacl ( fitsfile fptr,
int  colnum,
char *  ttype,
long *  tbcol,
char *  tunit,
char *  tform,
double *  tscal,
double *  tzero,
char *  tnull,
char *  tdisp,
int *  status 
)

get ASCII column keyword values

Parameters
[in]fptrFITS file pointer
[in]colnumcolumn number
[out]ttypeTTYPEn keyword value
[out]tbcolTBCOLn keyword value
[out]tunitTUNITn keyword value
[out]tformTFORMn keyword value
[out]tscalTSCALn keyword value
[out]tzeroTZEROn keyword value
[out]tnullTNULLn keyword value
[out]tdispTDISPn keyword value
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgbcl ( fitsfile fptr,
int  colnum,
char *  ttype,
char *  tunit,
char *  dtype,
long *  repeat,
double *  tscal,
double *  tzero,
long *  tnull,
char *  tdisp,
int *  status 
)

get BINTABLE column keyword values

Parameters
[in]fptrFITS file pointer
[in]colnumcolumn number
[out]ttypeTTYPEn keyword value
[out]tunitTUNITn keyword value
[out]dtypedatatype char: I, J, E, D, etc.
[out]repeatvector column repeat count
[out]tscalTSCALn keyword value
[out]tzeroTZEROn keyword value
[out]tnullTNULLn keyword value integer cols only
[out]tdispTDISPn keyword value
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgbclll ( fitsfile fptr,
int  colnum,
char *  ttype,
char *  tunit,
char *  dtype,
LONGLONG repeat,
double *  tscal,
double *  tzero,
LONGLONG tnull,
char *  tdisp,
int *  status 
)

get BINTABLE column keyword values

Parameters
[in]fptrFITS file pointer
[in]colnumcolumn number
[out]ttypeTTYPEn keyword value
[out]tunitTUNITn keyword value
[out]dtypedatatype char: I, J, E, D, etc.
[out]repeatvector column repeat count
[out]tscalTSCALn keyword value
[out]tzeroTZEROn keyword value
[out]tnullTNULLn keyword value integer cols only
[out]tdispTDISPn keyword value
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgcnn ( fitsfile fptr,
int  casesen,
char *  templt,
char *  colname,
int *  colnum,
int *  status 
)

Return the full column name and column number of the next column whose TTYPEn keyword value matches the input template string. The template may contain the * and ? wildcards. Status = 237 is returned if the match is not unique. If so, one may call this routine again with input status=237 to get the next match. A status value of 219 is returned when there are no more matching columns.

Parameters
[in]fptrFITS file pointer
[in]casesencase sensitive string comparison? 0=no
[in]templtinput name of column (w/wildcards)
[out]colnamefull column name up to 68 + 1 chars long
[out]colnumnumber of the named column; 1=first col
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgcno ( fitsfile fptr,
int  casesen,
char *  templt,
int *  colnum,
int *  status 
)

Determine the column number corresponding to an input column name. The first column of the table = column 1; This supports the * and ? wild cards in the input template.

Parameters
[in]fptrFITS file pionter
[in]casesencase sensitive string comparison? 0=no
[in]templtinput name of column (w/wildcards)
[out]colnumnumber of the named column; 1=first col
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgcprll ( fitsfile fptr,
int  colnum,
LONGLONG  firstrow,
LONGLONG  firstelem,
LONGLONG  nelem,
int  writemode,
double *  scale,
double *  zero,
char *  tform,
long *  twidth,
int *  tcode,
int *  maxelem,
LONGLONG startpos,
LONGLONG elemnum,
long *  incre,
LONGLONG repeat,
LONGLONG rowlen,
int *  hdutype,
LONGLONG tnull,
char *  snull,
int *  status 
)

Get Column PaRameters, and test starting row and element numbers for validity. This is a workhorse routine that is call by nearly every other routine that reads or writes to FITS files.

Parameters
[in]fptrFITS file pointer
[in]colnumcolumn number (1 = 1st column of table)
[in]firstrowfirst row (1 = 1st row of table)
[in]firstelemfirst element within vector (1 = 1st)
[in]nelemnumber of elements to read or write
[in]writemode= 1 if writing data, = 0 if reading data If = 2, then writing data, but don't modify the returned values of repeat and incre. If = -1, then reading data in reverse direction.
[out]scaleFITS scaling factor (TSCALn keyword value)
[out]zeroFITS scaling zero pt (TZEROn keyword value)
[out]tformASCII column format: value of TFORMn keyword
[out]twidthwidth of ASCII column (characters)
[out]tcodecolumn datatype code: I*4=41, R*4=42, etc
[out]maxelemmax number of elements that fit in buffer
[out]startposoffset in file to starting row & column
[out]elemnumstarting element number ( 0 = 1st element)
[out]increbyte offset between elements within a row
[out]repeatnumber of elements in a row (vector column)
[out]rowlenlength of a row, in bytes
[out]hdutypeHDU type: 0, 1, 2 = primary, table, bintable
[out]tnullnull value for integer columns
[out]snullnull value for ASCII table columns
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgdes ( fitsfile fptr,
int  colnum,
LONGLONG  rownum,
long *  length,
long *  heapaddr,
int *  status 
)

get (read) the variable length vector descriptor from the table.

Parameters
[in]fptrFITS file pointer
[in]colnumcolumn number (1 = 1st column of table)
[in]rownumrow number (1 = 1st row of table)
[in]lengthnumber of elements in the row
[in]heapaddrheap pointer to the data
[in]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgdesll ( fitsfile fptr,
int  colnum,
LONGLONG  rownum,
LONGLONG length,
LONGLONG heapaddr,
int *  status 
)

get (read) the variable length vector descriptor from the binary table. This is similar to ffgdes, except it supports the full 8-byte range of the length and offset values in 'Q' columns, as well as 'P' columns.

Parameters
[in]fptrFITS file pointer
[in]colnumcolumn number (1 = 1st column of table)
[in]rownumrow number (1 = 1st row of table)
[out]lengthnumber of elements in the row
[out]heapaddrheap pointer to the data
[in,out]*statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgdess ( fitsfile fptr,
int  colnum,
LONGLONG  firstrow,
LONGLONG  nrows,
long *  length,
long *  heapaddr,
int *  status 
)

get (read) a range of variable length vector descriptors from the table.

Parameters
[in]fptrFITS file pointer
[in]colnumcolumn number (1 = 1st column of table)
[in]firstrowfirst row (1 = 1st row of table)
[in]nrowsnumber or rows to read
[out]lengthnumber of elements in the row
[out]heapaddrheap pointer to the data
[in,out]statuserror status

Here is the call graph for this function:

int ffgdessll ( fitsfile fptr,
int  colnum,
LONGLONG  firstrow,
LONGLONG  nrows,
LONGLONG length,
LONGLONG heapaddr,
int *  status 
)

get (read) a range of variable length vector descriptors from the table.

Parameters
[in]fptrFITS file pointer
[in]colnumcolumn number (1 = 1st column of table)
[in]firstrowfirst row (1 = 1st row of table)
[in]nrowsnumber or rows to read
[out]lengthnumber of elements in the row
[out]heapaddrheap pointer to the data
[in,out]statuserror status

Here is the call graph for this function:

void ffgerr ( int  status,
char *  errtext 
)

Return a short descriptive error message that corresponds to the input error status value. The message may be up to 30 characters long, plus the terminating null character.

Parameters
[in]statuserror status value
[out]errtexterror message (max 30 char long + null)

Here is the caller graph for this function:

int ffgext ( fitsfile fptr,
int  hdunum,
int *  exttype,
int *  status 
)

Get Extension. Move to the specified extension and initialize the HDU structure.

Parameters
[in]fptrFITS file pointer
[in]hdunumno. of HDU to move get (0 based)
[out]exttypetype of extension, 0, 1, or 2
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffghad ( fitsfile fptr,
long *  headstart,
long *  datastart,
long *  dataend,
int *  status 
)

Return the address (= byte offset) in the FITS file to the beginning of the current HDU, the beginning of the data unit, and the end of the data unit.

Parameters
[in]fptrFITS file pointer
[out]headstartbyte offset to beginning of CHDU
[out]datastartbyte offset to beginning of next HDU
[out]dataendbyte offset to beginning of next HDU
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffghadll ( fitsfile fptr,
LONGLONG headstart,
LONGLONG datastart,
LONGLONG dataend,
int *  status 
)

Return the address (= byte offset) in the FITS file to the beginning of the current HDU, the beginning of the data unit, and the end of the data unit.

Parameters
[in]fptrFITS file pointer
[out]headstartbyte offset to beginning of CHDU
[out]datastartbyte offset to beginning of next HDU
[out]dataendbyte offset to beginning of next HDU
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffghdn ( fitsfile fptr,
int *  chdunum 
)

Return the number of the Current HDU in the FITS file. The primary array is HDU number 1. Note that this is one of the few cfitsio routines that does not return the error status value as the value of the function.

Parameters
[in]fptrFITS file pointer
[out]chdunumnumber of the CHDU; 1 = primary array

Here is the caller graph for this function:

int ffghdt ( fitsfile fptr,
int *  exttype,
int *  status 
)

Return the type of the CHDU. This returns the 'logical' type of the HDU, not necessarily the physical type, so in the case of a compressed image stored in a binary table, this will return the type as an Image, not a binary table.

Parameters
[in]fptrFITS file pointer
[out]exttypetype of extension, 0, 1, or 2 for IMAGE_HDU, ASCII_TBL, or BINARY_TBL
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffghof ( fitsfile fptr,
OFF_T headstart,
OFF_T datastart,
OFF_T dataend,
int *  status 
)

Return the address (= byte offset) in the FITS file to the beginning of the current HDU, the beginning of the data unit, and the end of the data unit.

Parameters
[in]fptrFITS file pointer
[out]headstartbyte offset to beginning of CHDU
[out]datastartbyte offset to beginning of next HDU
[out]dataendbyte offset to beginning of next HDU
[in,out]statuserror status

Here is the call graph for this function:

int ffgidm ( fitsfile fptr,
int *  naxis,
int *  status 
)

Get the dimension of the image (= NAXIS keyword for normal image, or ZNAXIS for a compressed image) These values are cached for faster access.

Parameters
[in]fptrFITS file pointer
[out]naxisimage dimension (NAXIS value)
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgidt ( fitsfile fptr,
int *  imgtype,
int *  status 
)

Get the datatype of the image (= BITPIX keyword for normal image, or ZBITPIX for a compressed image)

Parameters
[in]fptrFITS file pointer
[out]imgtypeimage data type
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgiet ( fitsfile fptr,
int *  imgtype,
int *  status 
)

Get the effective datatype of the image (= BITPIX keyword for normal image, or ZBITPIX for a compressed image)

Parameters
[in]fptrFITS file pointer
[out]imgtypeimage data type
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgipr ( fitsfile infptr,
int  maxaxis,
int *  bitpix,
int *  naxis,
long *  naxes,
int *  status 
)

get the datatype and size of the input image

Parameters
[in]infptrFITS file pointer
[in]maxaxismax number of axes to return
[out]bitpiximage data type
[out]naxisimage dimension (NAXIS value)
[out]naxessize of image dimensions
[in,out]statuserror status
int ffgiprll ( fitsfile infptr,
int  maxaxis,
int *  bitpix,
int *  naxis,
LONGLONG naxes,
int *  status 
)

get the datatype and size of the input image

Parameters
[in]infptrFITS file pointer
[in]maxaxismax number of axes to return
[out]bitpiximage data type
[out]naxisimage dimension (NAXIS value)
[out]naxessize of image dimensions
[in,out]statuserror status

Here is the caller graph for this function:

int ffgisz ( fitsfile fptr,
int  nlen,
long *  naxes,
int *  status 
)

Get the size of the image dimensions (= NAXISn keywords for normal image, or ZNAXISn for a compressed image) These values are cached for faster access.

Parameters
[in]fptrFITS file pointer
[in]nlennumber of axes to return
[out]naxessize of image dimensions
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgiszll ( fitsfile fptr,
int  nlen,
LONGLONG naxes,
int *  status 
)

Get the size of the image dimensions (= NAXISn keywords for normal image, or ZNAXISn for a compressed image)

Parameters
[in]fptrFITS file pointer
[in]nlennumber of axes to return
[out]naxessize of image dimensions
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgkcl ( char *  tcard)

Return the type classification of the input header record

TYP_STRUC_KEY: SIMPLE, BITPIX, NAXIS, NAXISn, EXTEND, BLOCKED, GROUPS, PCOUNT, GCOUNT, END XTENSION, TFIELDS, TTYPEn, TBCOLn, TFORMn, THEAP, and the first 4 COMMENT keywords in the primary array that define the FITS format.

TYP_CMPRS_KEY: The keywords used in the compressed image format ZIMAGE, ZCMPTYPE, ZNAMEn, ZVALn, ZTILEn, ZBITPIX, ZNAXISn, ZSCALE, ZZERO, ZBLANK, EXTNAME = 'COMPRESSED_IMAGE' ZSIMPLE, ZTENSION, ZEXTEND, ZBLOCKED, ZPCOUNT, ZGCOUNT ZQUANTIZ, ZDITHER0

TYP_SCAL_KEY: BSCALE, BZERO, TSCALn, TZEROn

TYP_NULL_KEY: BLANK, TNULLn

TYP_DIM_KEY: TDIMn

TYP_RANG_KEY: TLMINn, TLMAXn, TDMINn, TDMAXn, DATAMIN, DATAMAX

TYP_UNIT_KEY: BUNIT, TUNITn

TYP_DISP_KEY: TDISPn

TYP_HDUID_KEY: EXTNAME, EXTVER, EXTLEVEL, HDUNAME, HDUVER, HDULEVEL

TYP_CKSUM_KEY CHECKSUM, DATASUM

TYP_WCS_KEY: Primary array: WCAXES, CTYPEn, CUNITn, CRVALn, CRPIXn, CROTAn, CDELTn CDj_is, PVj_ms, LONPOLEs, LATPOLEs

Pixel list: TCTYPn, TCTYns, TCUNIn, TCUNns, TCRVLn, TCRVns, TCRPXn, TCRPks, TCDn_k, TCn_ks, TPVn_m, TPn_ms, TCDLTn, TCROTn

Bintable vector: jCTYPn, jCTYns, jCUNIn, jCUNns, jCRVLn, jCRVns, iCRPXn, iCRPns, jiCDn, jiCDns, jPVn_m, jPn_ms, jCDLTn, jCROTn

TYP_REFSYS_KEY: EQUINOXs, EPOCH, MJD-OBSs, RADECSYS, RADESYSs

TYP_COMM_KEY: COMMENT, HISTORY, (blank keyword)

TYP_CONT_KEY: CONTINUE

TYP_USER_KEY: all other keywords

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgmsg ( char *  err_message)

get oldest message from error stack, ignoring markers

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgncl ( fitsfile fptr,
int *  ncols,
int *  status 
)

Get the number of columns in the table (= TFIELDS keyword)

Parameters
[in]fptrFITS file pointer
[out]ncolsnumber of columns in the table
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgnrw ( fitsfile fptr,
long *  nrows,
int *  status 
)

Get the number of rows in the table (= NAXIS2 keyword)

Parameters
[in]fptrFITS file pointer
[out]nrowsnumber of rows in the table
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgnrwll ( fitsfile fptr,
LONGLONG nrows,
int *  status 
)

Get the number of rows in the table (= NAXIS2 keyword)

Parameters
[in]fptrFITS file pointer
[out]nrowsnumber of rows in the table
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgtbc ( fitsfile fptr,
LONGLONG totalwidth,
int *  status 
)

calculate the starting byte offset of each column of a binary table. Use the values of the datatype code and repeat counts in the column structure. Return the total length of a row, in bytes.

Parameters
[in]fptrFITS file pointer
[out]totalwidthtotal width of a table row
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgtbp ( fitsfile fptr,
char *  name,
char *  value,
int *  status 
)

Get TaBle Parameter. The input keyword name begins with the letter T. Test if the keyword is one of the table column definition keywords of an ASCII or binary table. If so, decode it and update the value in the structure.

Parameters
[in]fptrFITS file pointer
[in]namename of the keyword
[in]valuevalue string of the keyword
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgtcl ( fitsfile fptr,
int  colnum,
int *  typecode,
long *  repeat,
long *  width,
int *  status 
)

Get Type of table column. Returns the datatype code of the column, as well as the vector repeat count and (if it is an ASCII character column) the width of the field or a unit string within the field. This supports the TFORMn = 'rAw' syntax for specifying arrays of substrings, so if TFORMn = '60A12' then repeat = 60 and width = 12.

Parameters
[in]fptrFITS file pointer
[in]colnumcolumn number
[out]typecodedatatype code (21 = short, etc)
[out]repeatrepeat count of field
[out]widthif ASCII, width of field or unit string
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgtclll ( fitsfile fptr,
int  colnum,
int *  typecode,
LONGLONG repeat,
LONGLONG width,
int *  status 
)

Get Type of table column. Returns the datatype code of the column, as well as the vector repeat count and (if it is an ASCII character column) the width of the field or a unit string within the field. This supports the TFORMn = 'rAw' syntax for specifying arrays of substrings, so if TFORMn = '60A12' then repeat = 60 and width = 12.

Parameters
[in]fptrFITS file pointer
[in]colnumcolumn number
[out]typecodedatatype code (21 = short, etc)
[out]repeatrepeat count of field
[out]widthif ASCII, width of field or unit string
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffgthd ( char *  tmplt,
char *  card,
int *  hdtype,
int *  status 
)

'Get Template HeaDer' parse a template header line and create a formated character string which is suitable for appending to a FITS header

Parameters
[in]tmpltinput header template string
[out]cardreturned FITS header record
[out]hdtypehow to interpreter the returned card string -2 = modify the name of a keyword; the old keyword name is returned starting at address chars[0]; the new name is returned starting at address char[40] (to be consistent with the Fortran version). Both names are null terminated. -1 = card contains the name of a keyword that is to be deleted 0 = append this keyword if it doesn't already exist, or modify the value if the keyword already exists. 1 = append this comment keyword ('HISTORY', 'COMMENT', or blank keyword name) 2 = this is the END keyword; do not write it to the header
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffhdef ( fitsfile fptr,
int  morekeys,
int *  status 
)

based on the number of keywords which have already been written, plus the number of keywords to reserve space for, we then can define where the data unit should start (it must start at the beginning of a 2880-byte logical block).

This routine will only have any effect if the starting location of the data unit following the header is not already defined. In any case, it is always possible to add more keywords to the header even if the data has already been written. It is just more efficient to reserve the space in advance.

Parameters
[in]fptrFITS file pointer
[in]morekeysreserve space for this many keywords
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffiblk ( fitsfile fptr,
long  nblock,
int  headdata,
int *  status 
)

insert 2880-byte blocks at the end of the current header or data unit

Parameters
[in]fptrFITS file pointer
[in]nblockno. of blocks to insert
[in]headdatainsert where? 0=header, 1=data -1=beginning of file
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffinttyp ( char *  cval,
int *  dtype,
int *  negative,
int *  status 
)

determine implicit datatype of input integer string. This assumes that the string conforms to the FITS standard for integer keyword value, so may not detect all invalid formats.

Parameters
[in]cvalformatted string representation of the integer
[out]dtypedatatype code: TBYTE, TSHORT, TUSHORT, etc
[out]negativeis cval negative?
[in,out]statuserror status
int ffkeyn ( const char *  keyroot,
int  value,
char *  keyname,
int *  status 
)

Construct a keyword name string by appending the index number to the root. e.g., if root = "TTYPE" and value = 12 then keyname = "TTYPE12". Note: this allows keyword names longer than 8 characters.

Parameters
[in]keyrootroot string for keyword name keyword name
[in]valueindex number to be appended to root name
[out]keynameoutput root + index keyword name
[in,out]statuserror status

Here is the caller graph for this function:

int ffmahd ( fitsfile fptr,
int  hdunum,
int *  exttype,
int *  status 
)

Move to Absolute Header Data unit. Move to the specified HDU and read the header to initialize the table structure. Note that extnum is one based, so the primary array is extnum = 1.

Parameters
[in]fptrFITS file pointer
[in]hdunumnumber of the HDU to move to
[out]exttypetype of extension, 0, 1, or 2
[in,out]statuserror status

Here is the call graph for this function:

int ffmkey ( fitsfile fptr,
const char *  card,
int *  status 
)

replace the previously read card (i.e. starting 80 bytes before the (fptr->Fptr)->nextkey position) with the contents of the input card.

Parameters
[in]fptrFITS file pointer
[in]cardstring value
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffmkky ( const char *  keyname,
char *  value,
const char *  comm,
char *  card,
int *  status 
)

Make a complete FITS 80-byte keyword card from the input name, value and comment strings. Output card is null terminated without any trailing blanks.

Parameters
[in]keynamekeyword name
[in]valuekeyword value
[in]commkeyword comment
[out]cardconstructed keyword card
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffmnhd ( fitsfile fptr,
int  exttype,
char *  hduname,
int  hduver,
int *  status 
)

Move to the next HDU with a given extension type (IMAGE_HDU, ASCII_TBL, BINARY_TBL, or ANY_HDU), extension name (EXTNAME or HDUNAME keyword), and EXTVERS keyword values. If hduvers = 0, then move to the first HDU with the given type and name regardless of EXTVERS value. If no matching HDU is found in the file, then the current open HDU will remain unchanged.

Parameters
[in]fptrFITS file pointer
[in]exttypetype of extension, 0, 1, or 2
[in]hdunamedesired EXTNAME value for the HDU
[in]hduverdesired EXTVERS value for the HDU
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffmrhd ( fitsfile fptr,
int  hdumov,
int *  exttype,
int *  status 
)

Move a Relative number of Header Data units. Offset to the specified extension and read the header to initialize the HDU structure.

Parameters
[in]fptrFITS file pointer
[in]hdumovrel. no. of HDUs to move by (+ or -)
[out]exttypetype of extension, 0, 1, or 2
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffnkey ( int  value,
const char *  keyroot,
char *  keyname,
int *  status 
)

Construct a keyword name string by appending the root string to the index number. e.g., if root = "TTYPE" and value = 12 then keyname = "12TTYPE".

Parameters
[in]valueindex number to be appended to root name
[in]keyrootroot string for keyword name
[out]keynameoutput root + index keyword name
[in,out]statuserror status

Here is the caller graph for this function:

int ffpdes ( fitsfile fptr,
int  colnum,
LONGLONG  rownum,
LONGLONG  length,
LONGLONG  heapaddr,
int *  status 
)

put (write) the variable length vector descriptor to the table.

Parameters
[in]fptrFITS file pointer
[in]colnumcolumn number (1 = 1st column of table)
[in]rownumrow number (1 = 1st row of table)
[in]lengthnumber of elements in the row
[in]heapaddrheap pointer to the data
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffpdfl ( fitsfile fptr,
int *  status 
)

Write the Data Unit Fill values if they are not already correct. The fill values are used to fill out the last 2880 byte block of the HDU. Fill the data unit with zeros or blanks depending on the type of HDU from the end of the data to the end of the current FITS 2880 byte block

Parameters
[in]fptrFITS file pointer
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffpinit ( fitsfile fptr,
int *  status 
)

initialize the parameters defining the structure of the primary array or an Image extension

Parameters
[in]fptrFITS file pointer
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

void ffpmrk ( void  )

write a marker to the stack. It is then possible to pop only those messages following the marker off of the stack, leaving the previous messages unaffected.

The marker is ignored by the ffgmsg routine.

Here is the call graph for this function:

Here is the caller graph for this function:

void ffpmsg ( const char *  err_message)

put message on to error stack

Here is the call graph for this function:

int ffpsvc ( char *  card,
char *  value,
char *  comm,
int *  status 
)

ParSe the Value and Comment strings from the input header card string. If the card contains a quoted string value, the returned value string includes the enclosing quote characters. If comm = NULL, don't return the comment string.

Parameters
[in]cardFITS header card (nominally 80 bytes long)
[out]valuevalue string parsed from the card
[out]commcomment string parsed from the card
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffpxsz ( int  datatype)

return the number of bytes per pixel associated with the datatype

Here is the caller graph for this function:

int ffrdef ( fitsfile fptr,
int *  status 
)

ReDEFine the structure of a data unit. This routine re-reads the CHDU header keywords to determine the structure and length of the current data unit. This redefines the start of the next HDU.

Parameters
[in]fptrFITS file pointer
[in,out]statuserror status

Here is the call graph for this function:

int ffrhdu ( fitsfile fptr,
int *  hdutype,
int *  status 
)

read the required keywords of the CHDU and initialize the corresponding structure elements that describe the format of the HDU

Parameters
[in]fptrFITS file pointer
[out]hdutypetype of HDU
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int ffthdu ( fitsfile fptr,
int *  nhdu,
int *  status 
)

Return the number of HDUs that currently exist in the file.

Parameters
[in]fptrFITS file pointer
[out]nhdunumber of HDUs in the file
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int fftheap ( fitsfile fptr,
LONGLONG heapsz,
LONGLONG unused,
LONGLONG overlap,
int *  valid,
int *  status 
)

Tests the contents of the binary table variable length array heap. Returns the number of bytes that are currently not pointed to by any of the descriptors, and also the number of bytes that are pointed to by more than one descriptor. It returns valid = FALSE if any of the descriptors point to addresses that are out of the bounds of the heap.

Parameters
[in]fptr
[out]heapszcurrent size of the heap
[out]unusedno. of unused bytes in the heap
[out]overlapno. of bytes shared by > 1 descriptors
[out]validare all the heap addresses valid?
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int fftkey ( const char *  keyword,
int *  status 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int fftrec ( char *  card,
int *  status 
)

Test that the keyword card conforms to the FITS standard. Must contain only printable ASCII characters;

Parameters
[in]cardkeyword card to test
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

void ffupch ( char *  string)

convert string to upper case, in place.

Here is the caller graph for this function:

int ffuptf ( fitsfile fptr,
int *  status 
)

Update the value of the TFORM keywords for the variable length array columns to make sure they all have the form 1Px(len) or Px(len) where 'len' is the maximum length of the vector in the table (e.g., '1PE(400)')

Parameters
[in]fptrFITS file pointer
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

float ffvers ( float *  version)

return the current version number of the FITSIO software

Parameters
[in,out]versionversion number

Here is the caller graph for this function:

int ffwend ( fitsfile fptr,
int *  status 
)

write the END card and following fill (space chars) in the current header

Parameters
[in]fptrFITS file pointer
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

void ffxmsg ( int  action,
char *  errmsg 
)

general routine to get, put, or clear the error message stack. Use a static array rather than allocating memory as needed for the error messages because it is likely to be more efficient and simpler to implement.

Action Code: DelAll 1 delete all messages on the error stack DelMark 2 delete messages back to and including the 1st marker DelNewest 3 delete the newest message from the stack GetMesg 4 pop and return oldest message, ignoring marks PutMesg 5 add a new message to the stack PutMark 6 add a marker to the stack

Here is the caller graph for this function:

int fits_copy_pixlist2image ( fitsfile infptr,
fitsfile outfptr,
int  firstkey,
int  naxis,
int *  colnum,
int *  status 
)

Copy relevant keywords from the pixel list table header into a newly created primary array header. Convert names of keywords where appropriate. See fits_translate_pixkeyword() for the definitions.

Translation begins at header record number 'firstkey', and continues to the end of the header.

Parameters
[in]infptrpointer to input HDU
[in]outfptrpointer to output HDU
[in]firstkeyfirst HDU record number to start with
[in]naxisnumber of axes in the image
[in]colnumnumbers of the columns to be binned
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int fits_is_compressed_image ( fitsfile fptr,
int *  status 
)

Returns TRUE if the CHDU is a compressed image, else returns zero.

Parameters
[in]fptrFITS file pointer
[in,out]statuserror status

Here is the call graph for this function:

int fits_is_reentrant ( void  )

Was CFITSIO compiled with the -D_REENTRANT flag? 1 = yes, 0 = no. Note that specifying the -D_REENTRANT flag is required, but may not be sufficient, to ensure that CFITSIO can be safely used in a multi-threaded environoment.

int fits_translate_keyword ( char *  inrec,
char *  outrec,
char *  patterns[][2],
int  npat,
int  n_value,
int  n_offset,
int  n_range,
int *  pat_num,
int *  i,
int *  j,
int *  m,
int *  n,
int *  status 
)

Translate a keyword name to a new name, based on a set of patterns. The user passes an array of patterns to be matched. Input pattern number i is pattern[i][0], and output pattern number i is pattern[i][1]. Keywords are matched against the input patterns. If a match is found then the keyword is re-written according to the output pattern.

Order is important. The first match is accepted. The fastest match will be made when templates with the same first character are grouped together.

Several characters have special meanings:

 i,j - single digits, preserved in output template
 n - column number of one or more digits, preserved in output template
 m - generic number of one or more digits, preserved in output template
 a - coordinate designator, preserved in output template
 # - number of one or more digits
 ? - any character
   - only allowed in first character position, to match all
     keywords; only useful as last pattern in the list

i, j, n, and m are returned by the routine.

For example, the input pattern "iCTYPn" will match "1CTYP5" (if n_value is 5); the output pattern "CTYPEi" will be re-written as "CTYPE1". Notice that "i" is preserved.

The following output patterns are special

Special output pattern characters:

"-" - do not copy a keyword that matches the corresponding input pattern

"+" - copy the input unchanged

The inrec string could be just the 8-char keyword name, or the entire 80-char header record. Characters 9 = 80 in the input string simply get appended to the translated keyword name.

If n_range = 0, then only keywords with 'n' equal to n_value will be considered as a pattern match. If n_range = +1, then all values of 'n' greater than or equal to n_value will be a match, and if -1, then values of 'n' less than or equal to n_value will match.

This routine was written by Craig Markwardt, GSFC

Parameters
[in]inrecinput string
[out]outrecoutput converted string, or a null string if input does not match any of the patterns
[in]patternspointer to input / output string
[in]npatnumber of templates passed
[in]n_valuebase 'n' template value of interest
[in]n_offsetoffset to be applied to the 'n'
[in]n_rangecontrols range of 'n' template
[out]pat_nummatched pattern number (0 based) or -1
[out]ivalue of i, if any, else 0
[out]jvalue of j, if any, else 0
[out]mvalue of m, if any, else 0
[out]nvalue of n, if any, else 0
[in,out]status)/* IO - error status

Here is the caller graph for this function:

*int fits_translate_keywords ( fitsfile infptr,
fitsfile outfptr,
int  firstkey,
char *  patterns[][2],
int  npat,
int  n_value,
int  n_offset,
int  n_range,
int *  status 
)

Copy relevant keywords from the table header into the newly created primary array header. Convert names of keywords where appropriate. See fits_translate_keyword() for the definitions.

Translation begins at header record number 'firstkey', and continues to the end of the header.

This routine was written by Craig Markwardt, GSFC

Parameters
[in]infptrpointer to input HDU
[in]outfptrpointer to output HDU
[in]firstkeyfirst HDU record number to start with
[in]patternspointer to input / output keyword templates
[in]npatnumber of templates passed
[in]n_valuebase 'n' template value of interest
[in]n_offsetoffset to be applied to the 'n'
[in]n_rangecontrols range of 'n' template
[in,out]statuserror status

Here is the call graph for this function:

Here is the caller graph for this function:

int fits_translate_pixkeyword ( char *  inrec,
char *  outrec,
char *  patterns[][2],
int  npat,
int  naxis,
int *  colnum,
int *  pat_num,
int *  i,
int *  j,
int *  n,
int *  m,
int *  l,
int *  status 
)

Translate a keyword name to a new name, based on a set of patterns. The user passes an array of patterns to be matched. Input pattern number i is pattern[i][0], and output pattern number i is pattern[i][1]. Keywords are matched against the input patterns. If a match is found then the keyword is re-written according to the output pattern.

Order is important. The first match is accepted. The fastest match will be made when templates with the same first character are grouped together.

Several characters have special meanings:

 i,j - single digits, preserved in output template
 n, m - column number of one or more digits, preserved in output template
 k - generic number of one or more digits, preserved in output template
 a - coordinate designator, preserved in output template
 # - number of one or more digits
 ? - any character
   - only allowed in first character position, to match all
     keywords; only useful as last pattern in the list

i, j, n, and m are returned by the routine.

For example, the input pattern "iCTYPn" will match "1CTYP5" (if n_value is 5); the output pattern "CTYPEi" will be re-written as "CTYPE1". Notice that "i" is preserved.

The following output patterns are special

Special output pattern characters:

"-" - do not copy a keyword that matches the corresponding input pattern

"+" - copy the input unchanged

The inrec string could be just the 8-char keyword name, or the entire 80-char header record. Characters 9 = 80 in the input string simply get appended to the translated keyword name.

If n_range = 0, then only keywords with 'n' equal to n_value will be considered as a pattern match. If n_range = +1, then all values of 'n' greater than or equal to n_value will be a match, and if -1, then values of 'n' less than or equal to n_value will match.

Parameters
[in]inrecinput string
[out]outrecoutput converted string, or a null string if input does not match any of the patterns
[in]patternspointer to input / output string
[in]npatnumber of templates passed
[in]naxisnumber of columns to be binned
[in]colnumnumbers of the columns to be binned
[out]pat_nummatched pattern number (0 based) or
[out]i
[out]j
[out]n
[out]m
[out]l
[in,out]statuserror status

Here is the caller graph for this function:

Variable Documentation

struct lconv* lcxxx
int STREAM_DRIVER = 0