cfitsio
3390
|
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <time.h>
#include <stddef.h>
#include "fitsio2.h"
Functions | |
int | ffcrim (fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status) |
int | ffcrimll (fitsfile *fptr, int bitpix, int naxis, LONGLONG *naxes, int *status) |
int | ffcrtb (fitsfile *fptr, int tbltype, LONGLONG naxis2, int tfields, char **ttype, char **tform, char **tunit, const char *extnm, int *status) |
int | ffpktp (fitsfile *fptr, const char *filename, int *status) |
int | ffpky (fitsfile *fptr, int datatype, const char *keyname, void *value, const char *comm, int *status) |
int | ffprec (fitsfile *fptr, const char *card, int *status) |
int | ffpkyu (fitsfile *fptr, const char *keyname, const char *comm, int *status) |
int | ffpkys (fitsfile *fptr, const char *keyname, const char *value, const char *comm, int *status) |
int | ffpkls (fitsfile *fptr, const char *keyname, const char *value, const char *comm, int *status) |
int | ffplsw (fitsfile *fptr, int *status) |
int | ffpkyl (fitsfile *fptr, const char *keyname, int value, const char *comm, int *status) |
int | ffpkyj (fitsfile *fptr, const char *keyname, LONGLONG value, const char *comm, int *status) |
int | ffpkyf (fitsfile *fptr, const char *keyname, float value, int decim, const char *comm, int *status) |
int | ffpkye (fitsfile *fptr, const char *keyname, float value, int decim, const char *comm, int *status) |
int | ffpkyg (fitsfile *fptr, const char *keyname, double value, int decim, const char *comm, int *status) |
int | ffpkyd (fitsfile *fptr, const char *keyname, double value, int decim, const char *comm, int *status) |
int | ffpkyc (fitsfile *fptr, const char *keyname, float *value, int decim, const char *comm, int *status) |
int | ffpkym (fitsfile *fptr, const char *keyname, double *value, int decim, const char *comm, int *status) |
int | ffpkfc (fitsfile *fptr, const char *keyname, float *value, int decim, const char *comm, int *status) |
int | ffpkfm (fitsfile *fptr, const char *keyname, double *value, int decim, const char *comm, int *status) |
int | ffpkyt (fitsfile *fptr, const char *keyname, long intval, double fraction, const char *comm, int *status) |
int | ffpcom (fitsfile *fptr, const char *comm, int *status) |
int | ffphis (fitsfile *fptr, const char *history, int *status) |
int | ffpdat (fitsfile *fptr, int *status) |
int | ffverifydate (int year, int month, int day, int *status) |
int | ffgstm (char *timestr, int *timeref, int *status) |
int | ffdt2s (int year, int month, int day, char *datestr, int *status) |
int | ffs2dt (char *datestr, int *year, int *month, int *day, int *status) |
int | fftm2s (int year, int month, int day, int hour, int minute, double second, int decimals, char *datestr, int *status) |
int | ffs2tm (char *datestr, int *year, int *month, int *day, int *hour, int *minute, double *second, int *status) |
int | ffgsdt (int *day, int *month, int *year, int *status) |
int | ffpkns (fitsfile *fptr, const char *keyroot, int nstart, int nkey, char *value[], char *comm[], int *status) |
int | ffpknl (fitsfile *fptr, const char *keyroot, int nstart, int nkey, int *value, char *comm[], int *status) |
int | ffpknj (fitsfile *fptr, const char *keyroot, int nstart, int nkey, long *value, char *comm[], int *status) |
int | ffpknjj (fitsfile *fptr, const char *keyroot, int nstart, int nkey, LONGLONG *value, char *comm[], int *status) |
int | ffpknf (fitsfile *fptr, const char *keyroot, int nstart, int nkey, float *value, int decim, char *comm[], int *status) |
int | ffpkne (fitsfile *fptr, const char *keyroot, int nstart, int nkey, float *value, int decim, char *comm[], int *status) |
int | ffpkng (fitsfile *fptr, const char *keyroot, int nstart, int nkey, double *value, int decim, char *comm[], int *status) |
int | ffpknd (fitsfile *fptr, const char *keyroot, int nstart, int nkey, double *value, int decim, char *comm[], int *status) |
int | ffptdm (fitsfile *fptr, int colnum, int naxis, long naxes[], int *status) |
int | ffptdmll (fitsfile *fptr, int colnum, int naxis, LONGLONG naxes[], int *status) |
int | ffphps (fitsfile *fptr, int bitpix, int naxis, long naxes[], int *status) |
int | ffphpsll (fitsfile *fptr, int bitpix, int naxis, LONGLONG naxes[], int *status) |
int | ffphpr (fitsfile *fptr, int simple, int bitpix, int naxis, long naxes[], LONGLONG pcount, LONGLONG gcount, int extend, int *status) |
int | ffphprll (fitsfile *fptr, int simple, int bitpix, int naxis, LONGLONG naxes[], LONGLONG pcount, LONGLONG gcount, int extend, int *status) |
int | ffphtb (fitsfile *fptr, LONGLONG naxis1, LONGLONG naxis2, int tfields, char **ttype, long *tbcol, char **tform, char **tunit, const char *extnmx, int *status) |
int | ffphbn (fitsfile *fptr, LONGLONG naxis2, int tfields, char **ttype, char **tform, char **tunit, const char *extnmx, LONGLONG pcount, int *status) |
int | ffphext (fitsfile *fptr, const char *xtensionx, int bitpix, int naxis, long naxes[], LONGLONG pcount, LONGLONG gcount, int *status) |
int | ffi2c (LONGLONG ival, char *cval, int *status) |
int | ffl2c (int lval, char *cval, int *status) |
int | ffs2c (const char *instr, char *outstr, int *status) |
int | ffr2f (float fval, int decim, char *cval, int *status) |
int | ffr2e (float fval, int decim, char *cval, int *status) |
int | ffd2f (double dval, int decim, char *cval, int *status) |
int | ffd2e (double dval, int decim, char *cval, int *status) |
int ffcrim | ( | fitsfile * | fptr, |
int | bitpix, | ||
int | naxis, | ||
long * | naxes, | ||
int * | status | ||
) |
create an IMAGE extension following the current HDU. If the current HDU is empty (contains no header keywords), then simply write the required image (or primary array) keywords to the current HDU.
[in] | fptr | FITS file pointer |
[in] | bitpix | bits per pixel |
[in] | naxis | number of axes in the array |
[in] | naxes | size of each axis |
[in,out] | status | error status |
create an IMAGE extension following the current HDU. If the current HDU is empty (contains no header keywords), then simply write the required image (or primary array) keywords to the current HDU.
[in] | fptr | FITS file pointer |
[in] | bitpix | bits per pixel |
[in] | naxis | number of axes in the array |
[in] | naxes | size of each axis |
[in,out] | status | error status |
int ffcrtb | ( | fitsfile * | fptr, |
int | tbltype, | ||
LONGLONG | naxis2, | ||
int | tfields, | ||
char ** | ttype, | ||
char ** | tform, | ||
char ** | tunit, | ||
const char * | extnm, | ||
int * | status | ||
) |
Create a table extension in a FITS file.
[in] | fptr | FITS file pointer |
[in] | tbltype | type of table to create |
[in] | naxis2 | number of rows in the table |
[in] | tfields | number of columns in the table |
[in] | ttype | name of each column |
[in] | tform | value of TFORMn keyword for each column |
[in] | tunit | value of TUNITn keyword for each column |
[in] | extnm | value of EXTNAME keyword, if any |
[in,out] | status | error status |
int ffd2e | ( | double | dval, |
int | decim, | ||
char * | cval, | ||
int * | status | ||
) |
convert double value to a null-terminated exponential format string.
[in] | dval | value to be converted to a string |
[in] | decim | number of decimal places to display |
[in] | cval | character string representation of the value |
[in,out] | status | error status |
int ffd2f | ( | double | dval, |
int | decim, | ||
char * | cval, | ||
int * | status | ||
) |
convert double value to a null-terminated F format string
[in] | dval | value to be converted to a string |
[in] | decim | number of decimal places to display |
[in,out] | cval | character string representation of the value |
[in,out] | status | error status |
int ffdt2s | ( | int | year, |
int | month, | ||
int | day, | ||
char * | datestr, | ||
int * | status | ||
) |
Construct a date character string
[in] | year | year (0 - 9999) |
[in] | month | month (1 - 12) |
[in] | day | day (1 - 31) |
[in,out] | datestr | date string: "YYYY-MM-DD" |
[in,out] | status | error status |
int ffgsdt | ( | int * | day, |
int * | month, | ||
int * | year, | ||
int * | status | ||
) |
Get current System DaTe (GMT if available). Return integer values of the day, month, and year. This routine is included for backward compatibility with the Fortran FITSIO library.
[in] | day | Day of the month |
[in] | month | Numerical month (1=Jan, etc.) |
[in] | year | Year (1999, 2000, etc.) |
[in,out] | status | error status |
int ffgstm | ( | char * | timestr, |
int * | timeref, | ||
int * | status | ||
) |
Returns the current date and time in format 'yyyy-mm-ddThh:mm:ss'.
[in,out] | timestr | returned system date and time string |
[in,out] | timeref | GMT = 0, Local time = 1 |
[in,out] | status | error status |
int ffi2c | ( | LONGLONG | ival, |
char * | cval, | ||
int * | status | ||
) |
convert value to a null-terminated formatted string.
[in] | ival | value to be converted to a string |
[in,out] | cval | character string representation of the value |
[in,out] | status | error status |
int ffl2c | ( | int | lval, |
char * | cval, | ||
int * | status | ||
) |
convert logical value to a null-terminated formatted string. If the input value == 0, then the output character is the letter F, else the output character is the letter T. The output string is null terminated.
[in] | lval | value to be converted to a string |
[in,out] | cval | character string representation of the value |
[in,out] | status | error status |
Write 1 or more COMMENT keywords. If the comment string is too long to fit on a single keyword (72 chars) then it will automatically be continued on multiple CONTINUE keywords.
[in] | fptr | FITS file pointer |
[in] | comm | comment string |
[in,out] | status | error status |
int ffpdat | ( | fitsfile * | fptr, |
int * | status | ||
) |
Write the DATE keyword into the FITS header. If the keyword already exists then the date will simply be updated in the existing keyword.
[in] | fptr | FITS file pointer |
[in,out] | status | error status |
int ffphbn | ( | fitsfile * | fptr, |
LONGLONG | naxis2, | ||
int | tfields, | ||
char ** | ttype, | ||
char ** | tform, | ||
char ** | tunit, | ||
const char * | extnmx, | ||
LONGLONG | pcount, | ||
int * | status | ||
) |
Put required Header keywords into the Binary Table:
[in] | fptr | FITS file pointer |
[in] | naxis2 | number of rows in the table |
[in] | tfields | number of columns in the table |
[in] | ttype | name of each column |
[in] | tform | value of TFORMn keyword for each column |
[in] | tunit | value of TUNITn keyword for each column |
[in] | extnmx | value of EXTNAME keyword, if any |
[in] | pcount | size of the variable length heap area |
[in,out] | status | error status |
int ffphext | ( | fitsfile * | fptr, |
const char * | xtensionx, | ||
int | bitpix, | ||
int | naxis, | ||
long | naxes[], | ||
LONGLONG | pcount, | ||
LONGLONG | gcount, | ||
int * | status | ||
) |
Put required Header keywords into a conforming extension:
[in] | fptr | FITS file pointer |
[in] | xtensionx | value for the XTENSION keyword |
[in] | bitpix | value for the BIXPIX keyword |
[in] | naxis | value for the NAXIS keyword |
[in] | naxes | value for the NAXISn keywords |
[in] | pcount | value for the PCOUNT keyword |
[in] | gcount | value for the GCOUNT keyword |
[in,out] | status | error status |
Write 1 or more HISTORY keywords. If the history string is too long to fit on a single keyword (72 chars) then it will automatically be continued on multiple HISTORY keywords.
[in] | fptr | FITS file pointer |
[in] | history | history string |
[in,out] | status | error status |
int ffphpr | ( | fitsfile * | fptr, |
int | simple, | ||
int | bitpix, | ||
int | naxis, | ||
long | naxes[], | ||
LONGLONG | pcount, | ||
LONGLONG | gcount, | ||
int | extend, | ||
int * | status | ||
) |
write required primary header keywords
[in] | fptr | FITS file pointer |
[in] | simple | does file conform to FITS standard? 1/0 |
[in] | bitpix | number of bits per data value pixel |
[in] | naxis | number of axes in the data array |
[in] | naxes | length of each data axis |
[in] | pcount | number of group parameters (usually 0) |
[in] | gcount | number of random groups (usually 1 or 0) |
[in] | extend | may FITS file have extensions? |
[in,out] | status | error status |
int ffphprll | ( | fitsfile * | fptr, |
int | simple, | ||
int | bitpix, | ||
int | naxis, | ||
LONGLONG | naxes[], | ||
LONGLONG | pcount, | ||
LONGLONG | gcount, | ||
int | extend, | ||
int * | status | ||
) |
write required primary header keywords
[in] | fptr | FITS file pointer |
[in] | simple | does file conform to FITS standard? 1/0 |
[in] | bitpix | number of bits per data value pixel |
[in] | naxis | number of axes in the data array |
[in] | naxes | length of each data axis |
[in] | pcount | number of group parameters (usually 0) |
[in] | gcount | number of random groups (usually 1 or 0 |
[in] | extend | may FITS file have extensions? |
[in,out] | status | error status |
int ffphps | ( | fitsfile * | fptr, |
int | bitpix, | ||
int | naxis, | ||
long | naxes[], | ||
int * | status | ||
) |
write STANDARD set of required primary header keywords
[in] | fptr | FITS file pointer |
[in] | bitpix | number of bits per data value pixel |
[in] | naxis | number of axes in the data array |
[in] | naxes | length of each data axis |
[in,out] | status | error status |
write STANDARD set of required primary header keywords
[in] | fptr | FITS file pointer |
[in] | bitpix | number of bits per data value pixel |
[in] | naxis | number of axes in the data array |
[in] | naxes | length of each data axis |
[in,out] | status | error status |
int ffphtb | ( | fitsfile * | fptr, |
LONGLONG | naxis1, | ||
LONGLONG | naxis2, | ||
int | tfields, | ||
char ** | ttype, | ||
long * | tbcol, | ||
char ** | tform, | ||
char ** | tunit, | ||
const char * | extnmx, | ||
int * | status | ||
) |
Put required Header keywords into the ASCII TaBle:
[in] | fptr | FITS file pointer |
[in] | naxis1 | width of row in the table |
[in] | naxis2 | number of rows in the table |
[in] | tfields | number of columns in the table |
[in] | ttype | name of each column |
[in] | tbcol | byte offset in row to each column |
[in] | tform | value of TFORMn keyword for each column |
[in] | tunit | value of TUNITn keyword for each column |
[in] | extnmx | value of EXTNAME keyword, if any |
[in,out] | status | error status |
int ffpkfc | ( | fitsfile * | fptr, |
const char * | keyname, | ||
float * | value, | ||
int | decim, | ||
const char * | comm, | ||
int * | status | ||
) |
int ffpkfm | ( | fitsfile * | fptr, |
const char * | keyname, | ||
double * | value, | ||
int | decim, | ||
const char * | comm, | ||
int * | status | ||
) |
int ffpkls | ( | fitsfile * | fptr, |
const char * | keyname, | ||
const char * | value, | ||
const char * | comm, | ||
int * | status | ||
) |
Write (put) the keyword, value and comment into the FITS header. This routine is a modified version of ffpkys which supports the HEASARC long string convention and can write arbitrarily long string keyword values. The value is continued over multiple keywords that have the name COMTINUE without an equal sign in column 9 of the card. This routine also supports simple string keywords which are less than 69 characters in length.
[in] | fptr | FITS file pointer |
[in] | keyname | name of keyword to write |
[in] | value | keyword value |
[in] | comm | keyword comment |
[in,out] | status | error status |
int ffpknd | ( | fitsfile * | fptr, |
const char * | keyroot, | ||
int | nstart, | ||
int | nkey, | ||
double * | value, | ||
int | decim, | ||
char * | comm[], | ||
int * | status | ||
) |
Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Writes exponential double values.
[in] | fptr | FITS file pointer |
[in] | keyroot | root name of keywords to write |
[in] | nstart | starting index number |
[in] | nkey | number of keywords to write |
[in] | value | array of keyword values |
[in] | decim | number of decimals to display |
[in] | comm | array of pointers to keyword comment |
[in,out] | status | error status |
int ffpkne | ( | fitsfile * | fptr, |
const char * | keyroot, | ||
int | nstart, | ||
int | nkey, | ||
float * | value, | ||
int | decim, | ||
char * | comm[], | ||
int * | status | ||
) |
Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Writes exponential float values.
[in] | fptr | FITS file pointer |
[in] | keyroot | root name of keywords to write |
[in] | nstart | starting index number |
[in] | nkey | number of keywords to write |
[in] | value | array of keyword values |
[in] | decim | number of decimals to display |
[in] | comm | array of pointers to keyword comment |
[in,out] | status | error status |
int ffpknf | ( | fitsfile * | fptr, |
const char * | keyroot, | ||
int | nstart, | ||
int | nkey, | ||
float * | value, | ||
int | decim, | ||
char * | comm[], | ||
int * | status | ||
) |
Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Writes fixed float values.
[in] | fptr | FITS file pointer |
[in] | keyroot | root name of keywords to write |
[in] | nstart | starting index number |
[in] | nkey | number of keywords to write |
[in] | value | array of keyword values |
[in] | decim | number of decimals to display |
[in] | comm | array of pointers to keyword comment |
[in,out] | status | error status |
int ffpkng | ( | fitsfile * | fptr, |
const char * | keyroot, | ||
int | nstart, | ||
int | nkey, | ||
double * | value, | ||
int | decim, | ||
char * | comm[], | ||
int * | status | ||
) |
Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Writes fixed double values.
[in] | fptr | FITS file pointer |
[in] | keyroot | root name of keywords to write |
[in] | nstart | starting index number |
[in] | nkey | number of keywords to write |
[in] | value | array of keyword values |
[in] | decim | number of decimals to display |
[in] | comm | array of pointers to keyword comment |
[in,out] | status | error status |
int ffpknj | ( | fitsfile * | fptr, |
const char * | keyroot, | ||
int | nstart, | ||
int | nkey, | ||
long * | value, | ||
char * | comm[], | ||
int * | status | ||
) |
Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Write integer keywords
[in] | fptr | FITS file pointer |
[in] | keyroot | root name of keywords to write |
[in] | nstart | starting index number |
[in] | nkey | number of keywords to write |
[in] | value | array of keyword values |
[in] | comm | array of pointers to keyword comment |
[in,out] | status | error status |
int ffpknjj | ( | fitsfile * | fptr, |
const char * | keyroot, | ||
int | nstart, | ||
int | nkey, | ||
LONGLONG * | value, | ||
char * | comm[], | ||
int * | status | ||
) |
Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Write integer keywords
[in] | fptr | FITS file pointer |
[in] | keyroot | root name of keywords to write |
[in] | nstart | starting index number |
[in] | nkey | number of keywords to write |
[in] | value | array of keyword values |
[in] | comm | array of pointers to keyword comment |
[in,out] | status | error status |
int ffpknl | ( | fitsfile * | fptr, |
const char * | keyroot, | ||
int | nstart, | ||
int | nkey, | ||
int * | value, | ||
char * | comm[], | ||
int * | status | ||
) |
Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Writes logical keywords Values equal to zero will be written as a False FITS keyword value; any other non-zero value will result in a True FITS keyword.
[in] | fptr | FITS file pointer |
[in] | keyroot | root name of keywords to write |
[in] | nstart | starting index number |
[in] | nkey | number of keywords to write |
[in] | value | array of keyword values |
[in] | comm | array of pointers to keyword comment |
[in,out] | status | error status |
int ffpkns | ( | fitsfile * | fptr, |
const char * | keyroot, | ||
int | nstart, | ||
int | nkey, | ||
char * | value[], | ||
char * | comm[], | ||
int * | status | ||
) |
Write (put) an indexed array of keywords with index numbers between NSTART and (NSTART + NKEY -1) inclusive. Writes string keywords. The value strings will be truncated at 68 characters, and the HEASARC long string keyword convention is not supported by this routine.
[in] | fptr | FITS file pointer |
[in] | keyroot | root name of keywords to write |
[in] | nstart | starting index number |
[in] | nkey | number of keywords to write |
[in] | value | array of pointers to keyword values |
[in] | comm | array of pointers to keyword comment |
[in,out] | status | error status |
read keywords from template file and append to the FITS file
[in] | fptr | FITS file pointer |
[in] | filename | name of template file |
[in,out] | status | error status |
int ffpky | ( | fitsfile * | fptr, |
int | datatype, | ||
const char * | keyname, | ||
void * | value, | ||
const char * | comm, | ||
int * | status | ||
) |
Write (put) the keyword, value and comment into the FITS header. Writes a keyword value with the datatype specified by the 2nd argument.
[in] | fptr | FITS file pointer |
[in] | datatype | datatype of the value |
[in] | keyname | name of keyword to write |
[in] | value | keyword value |
[in] | comm | keyword comment |
[in,out] | status | error status |
int ffpkyc | ( | fitsfile * | fptr, |
const char * | keyname, | ||
float * | value, | ||
int | decim, | ||
const char * | comm, | ||
int * | status | ||
) |
int ffpkyd | ( | fitsfile * | fptr, |
const char * | keyname, | ||
double | value, | ||
int | decim, | ||
const char * | comm, | ||
int * | status | ||
) |
int ffpkye | ( | fitsfile * | fptr, |
const char * | keyname, | ||
float | value, | ||
int | decim, | ||
const char * | comm, | ||
int * | status | ||
) |
Write (put) the keyword, value and comment into the FITS header. Writes an exponential float keyword value.
[in] | fptr | FITS file pointer |
[in] | keyname | name of keyword to write |
[in] | value | keyword value |
[in] | decim | number of decimal places to display |
[in] | comm | keyword comment |
[in,out] | status | error status |
int ffpkyf | ( | fitsfile * | fptr, |
const char * | keyname, | ||
float | value, | ||
int | decim, | ||
const char * | comm, | ||
int * | status | ||
) |
Write (put) the keyword, value and comment into the FITS header. Writes a fixed float keyword value.
[in] | fptr | FITS file pointer |
[in] | keyname | name of keyword to write |
[in] | value | keyword value |
[in] | decim | number of decimal places to display |
[in] | comm | keyword comment |
[in,out] | status | error status |
int ffpkyg | ( | fitsfile * | fptr, |
const char * | keyname, | ||
double | value, | ||
int | decim, | ||
const char * | comm, | ||
int * | status | ||
) |
Write (put) the keyword, value and comment into the FITS header. Writes a fixed double keyword value.
int ffpkyj | ( | fitsfile * | fptr, |
const char * | keyname, | ||
LONGLONG | value, | ||
const char * | comm, | ||
int * | status | ||
) |
Write (put) the keyword, value and comment into the FITS header. Writes an integer keyword value.
[in] | fptr | FITS file pointer |
[in] | keyname | name of keyword to write |
[in] | value | keyword value |
[in] | comm | keyword comment |
[in,out] | status | error status |
Write (put) the keyword, value and comment into the FITS header. Values equal to 0 will result in a False FITS keyword; any other non-zero value will result in a True FITS keyword.
[in] | fptr | FITS file pointer |
[in] | keyname | name of keyword to write |
[in] | value | keyword value |
[in] | comm | keyword comment |
[in,out] | status | error status |
int ffpkym | ( | fitsfile * | fptr, |
const char * | keyname, | ||
double * | value, | ||
int | decim, | ||
const char * | comm, | ||
int * | status | ||
) |
int ffpkys | ( | fitsfile * | fptr, |
const char * | keyname, | ||
const char * | value, | ||
const char * | comm, | ||
int * | status | ||
) |
Write (put) the keyword, value and comment into the FITS header. The value string will be truncated at 68 characters which is the maximum length that will fit on a single FITS keyword.
[in] | fptr | FITS file pointer |
[in] | keyname | name of keyword to write |
[in] | value | keyword value |
[in] | comm | keyword comment |
[in,out] | status | error status |
int ffpkyt | ( | fitsfile * | fptr, |
const char * | keyname, | ||
long | intval, | ||
double | fraction, | ||
const char * | comm, | ||
int * | status | ||
) |
Write (put) a 'triple' precision keyword where the integer and fractional parts of the value are passed in separate parameters to increase the total amount of numerical precision.
[in] | fptr | FITS file pointer |
[in] | keyname | name of keyword to write |
[in] | intval | integer part of value |
[in] | fraction | fractional part of value |
[in] | comm | keyword comment |
[in,out] | status | error status |
Write (put) a null-valued keyword and comment into the FITS header.
[in] | fptr | FITS file pointer |
[in] | keyname | name of keyword to write |
[in] | comm | keyword comment |
[in,out] | status | error status |
int ffplsw | ( | fitsfile * | fptr, |
int * | status | ||
) |
Write the LONGSTRN keyword and a series of related COMMENT keywords which document that this FITS header may contain long string keyword values which are continued over multiple keywords using the HEASARC long string keyword convention. If the LONGSTRN keyword already exists then this routine simple returns without doing anything.
[in] | fptr | FITS file pointer |
[in,out] | status | error status |
write a keyword record (80 bytes long) to the end of the header
[in] | fptr | FITS file pointer |
[in] | card | string to be written |
[in,out] | status | error status |
int ffptdm | ( | fitsfile * | fptr, |
int | colnum, | ||
int | naxis, | ||
long | naxes[], | ||
int * | status | ||
) |
write the TDIMnnn keyword describing the dimensionality of a column
[in] | fptr | FITS file pointer |
[in] | colnum | column number |
[in] | naxis | number of axes in the data array |
[in] | naxes | length of each data axis |
[in,out] | status | error status |
write the TDIMnnn keyword describing the dimensionality of a column
[in] | fptr | FITS file pointer |
[in] | colnum | column number |
[in] | naxis | number of axes in the data array |
[in] | naxes | length of each data axis |
[in,out] | status | error status |
int ffr2e | ( | float | fval, |
int | decim, | ||
char * | cval, | ||
int * | status | ||
) |
convert float value to a null-terminated exponential format string
[in] | fval | value to be converted to a string |
[in] | decim | number of decimal places to display |
[in,out] | cval | character string representation of the value |
[in,out] | status | error status |
int ffr2f | ( | float | fval, |
int | decim, | ||
char * | cval, | ||
int * | status | ||
) |
convert float value to a null-terminated F format string
[in] | fval | value to be converted to a string |
[in] | decim | number of decimal places to display |
[in,out] | cval | character string representation of the value |
[in,out] | status | error status |
int ffs2c | ( | const char * | instr, |
char * | outstr, | ||
int * | status | ||
) |
convert an input string to a quoted string. Leading spaces are significant. FITS string keyword values must be at least 8 chars long so pad out string with spaces if necessary. Example: km/s ==> 'km/s ' Single quote characters in the input string will be replace by two single quote characters. e.g., o'brian ==> 'o''brian'
[in] | instr | null terminated input string |
[in,out] | outstr | null terminated quoted output string |
[in,out] | status | error status |
int ffs2dt | ( | char * | datestr, |
int * | year, | ||
int * | month, | ||
int * | day, | ||
int * | status | ||
) |
Parse a date character string into year, month, and day values
[in] | datestr | date string: "YYYY-MM-DD" or "dd/mm/yy" |
[in,out] | year | year (0 - 9999) |
[in,out] | month | month (1 - 12) |
[in,out] | day | day (1 - 31) |
[in,out] | status | error status |
int ffs2tm | ( | char * | datestr, |
int * | year, | ||
int * | month, | ||
int * | day, | ||
int * | hour, | ||
int * | minute, | ||
double * | second, | ||
int * | status | ||
) |
int fftm2s | ( | int | year, |
int | month, | ||
int | day, | ||
int | hour, | ||
int | minute, | ||
double | second, | ||
int | decimals, | ||
char * | datestr, | ||
int * | status | ||
) |
Construct a date and time character string
[in] | year | year (0 - 9999) |
[in] | month | month (1 - 12) |
[in] | day | day (1 - 31) |
[in] | hour | hour (0 - 23) |
[in] | minute | minute (0 - 59) |
[in] | second | second (0. - 60.9999999) |
[in] | decimals | number of decimal points to write |
[in,out] | datestr | date string: "YYYY-MM-DDThh:mm:ss.ddd" or "hh:mm:ss.ddd" if year, month day = 0 |
[in,out] | status | error status |
int ffverifydate | ( | int | year, |
int | month, | ||
int | day, | ||
int * | status | ||
) |
Verify that the date is valid
[in] | year | year (0 - 9999) |
[in] | month | month (1 - 12) |
[in] | day | day (1 - 31) |
[in,out] | status | error status |