Data Structures | |
| struct | psFits |
| FITS file object. More... | |
| struct | psImageJpegColormap |
Defines | |
| #define | PS_JPEG_RANGELIM(A) (PS_MAX(0,PS_MIN(255,(A)))) |
| #define | PS_JPEG_SCALEVALUE(VALUE, ZERO, SCALE) (PS_MAX(0,PS_MIN(255,(SCALE*(VALUE-ZERO))))) |
Enumerations | |
| enum | psFitsType { PS_FITS_TYPE_NONE = -1, PS_FITS_TYPE_IMAGE = IMAGE_HDU, PS_FITS_TYPE_BINARY_TABLE = BINARY_TBL, PS_FITS_TYPE_ASCII_TABLE = ASCII_TBL, PS_FITS_TYPE_ANY = ANY_HDU } |
| FITS HDU type. More... | |
Functions | |
| psFits * | psFitsOpen (const char *filename, const char *mode) |
| Opens a FITS file and allocates the associated psFits object. | |
| bool | psFitsClose (psFits *fits) |
| Closes a FITS file. | |
| bool | psMemCheckFits (psPtr ptr) |
| Checks the type of a particular pointer. | |
| bool | psFitsMoveExtName (const psFits *fits, const char *extname) |
| Moves the FITS HDU to the specified extension name. | |
| bool | psFitsMoveExtNum (const psFits *fits, int extnum, bool relative) |
| Moves the FITS HDU to the specified extension number. | |
| bool | psFitsMoveLast (psFits *fits) |
| Moves the FITS HDU to the end of the file. | |
| int | psFitsGetExtNum (const psFits *fits) |
| Get the current extension number, where 0 is the primary HDU. | |
| psString | psFitsGetExtName (const psFits *fits) |
| Get the current extension name. | |
| bool | psFitsSetExtName (psFits *fits, const char *name) |
| Set the current extension's name. | |
| int | psFitsGetSize (const psFits *fits) |
| Get the total number of HDUs in the FITS file. | |
| bool | psFitsDeleteExtNum (psFits *fits, int extnum, bool relative) |
| Remove the an HDU as specified by number. | |
| bool | psFitsDeleteExtName (psFits *fits, const char *extname) |
| Remove the an HDU as specified by extension name. | |
| psFitsType | psFitsGetExtType (const psFits *fits) |
| Get the extension type of the current HDU. | |
| bool | psFitsTruncate (psFits *fits) |
| Delete all extensions after the current position. | |
| psDataType | p_psFitsTypeFromCfitsio (int datatype) |
| bool | p_psFitsTypeToCfitsio (psDataType type, int *bitPix, double *bZero, int *dataType) |
| psMetadata * | psFitsReadHeader (psMetadata *out, const psFits *fits) |
| Reads the header of the current HDU. | |
| psMetadata * | psFitsReadHeaderSet (psMetadata *out, const psFits *fits) |
| Reads the header of all HDUs. | |
| bool | psFitsWriteHeader (psFits *fits, const psMetadata *output) |
| Writes the values of the metadata to the current HDU header. | |
| bool | psFitsWriteBlank (psFits *fits, const psMetadata *output, const char *extname) |
| Writes a "blank" --- a header only, with no image or table. | |
| bool | psFitsHeaderValidate (psMetadata *header) |
| psFitsHeaderValidate validates the supplied header so that it is in compliance to the FITS standard for header keyword names and types. | |
| psImage * | psFitsReadImage (const psFits *fits, psRegion region, int z) |
| Reads an image, given the desired region and z-plane. | |
| psImage * | psFitsReadImageBuffer (psImage *output, const psFits *fits, psRegion region, int z) |
| bool | psFitsWriteImage (psFits *fits, const psMetadata *header, const psImage *input, int depth, const char *extname) |
| Writes an image, given the desired region and z-plane. | |
| bool | psFitsInsertImage (psFits *fits, const psMetadata *header, const psImage *input, int depth, const char *extname, bool after) |
| Writes an image, given the desired region and z-plane. | |
| bool | psFitsUpdateImage (psFits *fits, const psImage *input, int x0, int y0, int z) |
| Updates the FITS file image, given the desired region and z-plane. | |
| psArray * | psFitsReadImageCube (const psFits *fits, psRegion region) |
| bool | psFitsWriteImageCube (psFits *fits, psMetadata *header, const psArray *input, const char *extname) |
| bool | psFitsUpdateImageCube (psFits *fits, const psArray *input, int x0, int y0) |
| psMetadata * | psFitsReadTableRow (const psFits *fits, int row) |
| Reads a table row. | |
| psArray * | psFitsReadTableColumn (const psFits *fits, const char *colname) |
| Reads a table column. | |
| psVector * | psFitsReadTableColumnNum (const psFits *fits, const char *colname) |
| Reads a table column of numbers. | |
| psArray * | psFitsReadTable (const psFits *fits) |
| Reads a whole FITS table. | |
| bool | psFitsWriteTable (psFits *fits, const psMetadata *header, const psArray *table, const char *extname) |
| Writes a whole FITS table. | |
| bool | psFitsInsertTable (psFits *fits, const psMetadata *header, const psArray *table, const char *extname, bool after) |
| Inserts a whole FITS table. | |
| bool | psFitsUpdateTable (psFits *fits, const psMetadata *data, int row) |
| Updates a FITS table. | |
| psImageJpegColormap * | psImageJpegColormapAlloc () |
| psImageJpegColormap * | psImageJpegColormapSet (psImageJpegColormap *map, const char *name) |
| bool | psImageJpeg (const psImageJpegColormap *map, const psImage *image, const char *filename, float min, float max) |
| psString | psSlurpFD (int fd) |
| psString | psSlurpFile (FILE *stream) |
| #define PS_JPEG_RANGELIM | ( | A | ) | (PS_MAX(0,PS_MIN(255,(A)))) |
Definition at line 25 of file psImageJpeg.h.
| #define PS_JPEG_SCALEVALUE | ( | VALUE, | |||
| ZERO, | |||||
| SCALE | ) | (PS_MAX(0,PS_MIN(255,(SCALE*(VALUE-ZERO))))) |
Definition at line 27 of file psImageJpeg.h.
| enum psFitsType |
| psDataType p_psFitsTypeFromCfitsio | ( | int | datatype | ) |
| bool p_psFitsTypeToCfitsio | ( | psDataType | type, | |
| int * | bitPix, | |||
| double * | bZero, | |||
| int * | dataType | |||
| ) |
| bool psFitsClose | ( | psFits * | fits | ) |
Closes a FITS file.
| fits | psFits object to close |
| bool psFitsDeleteExtName | ( | psFits * | fits, | |
| const char * | extname | |||
| ) |
Remove the an HDU as specified by extension name.
| fits | the psFits object |
| extname | the extension name to delete |
| bool psFitsDeleteExtNum | ( | psFits * | fits, | |
| int | extnum, | |||
| bool | relative | |||
| ) |
Remove the an HDU as specified by number.
| fits | the psFits object |
| extnum | the extension number to delete (zero is primary HDU) |
| relative | if true, extnum is a relative number to the current position |
| int psFitsGetExtNum | ( | const psFits * | fits | ) |
| psFitsType psFitsGetExtType | ( | const psFits * | fits | ) |
Get the extension type of the current HDU.
| fits | the psFits object |
| int psFitsGetSize | ( | const psFits * | fits | ) |
Get the total number of HDUs in the FITS file.
| fits | the psFits object |
| bool psFitsHeaderValidate | ( | psMetadata * | header | ) |
psFitsHeaderValidate validates the supplied header so that it is in compliance to the FITS standard for header keyword names and types.
| bool psFitsInsertImage | ( | psFits * | fits, | |
| const psMetadata * | header, | |||
| const psImage * | input, | |||
| int | depth, | |||
| const char * | extname, | |||
| bool | after | |||
| ) |
Writes an image, given the desired region and z-plane.
A new IMAGE HDU is appended to the end of the FITS file.
| fits | the psFits object |
| header | header items for the new HDU. Can be NULL. |
| input | the image to output |
| depth | the number of z-planes of the FITS image data cube |
| extname | FITS extension name |
| after | if TRUE, inserts HDU after current HDU, otherwise before |
| bool psFitsInsertTable | ( | psFits * | fits, | |
| const psMetadata * | header, | |||
| const psArray * | table, | |||
| const char * | extname, | |||
| bool | after | |||
| ) |
Inserts a whole FITS table.
A new HDU of the type BINTABLE is inserted either before or after, depending on the AFTER parameter, the current HDU.
| fits | the psFits object |
| header | header items for the new HDU. Can be NULL. |
| table | Array of psMetadata items, which contains the output data items of each row. |
| extname | Extension name |
| after | TRUE if insert is done after CHDU, otherwise table is inserted before CHDU |
| bool psFitsMoveExtName | ( | const psFits * | fits, | |
| const char * | extname | |||
| ) |
Moves the FITS HDU to the specified extension name.
| fits | the psFits object to move |
| extname | the extension name |
| bool psFitsMoveExtNum | ( | const psFits * | fits, | |
| int | extnum, | |||
| bool | relative | |||
| ) |
Moves the FITS HDU to the specified extension number.
| fits | the psFits object to move |
| extnum | the extension number to move to (zero is primary HDU) |
| relative | if true, extnum is a relative number to the current position |
| bool psFitsMoveLast | ( | psFits * | fits | ) |
Moves the FITS HDU to the end of the file.
| fits | the psFits object to move |
| psFits* psFitsOpen | ( | const char * | filename, | |
| const char * | mode | |||
| ) |
Opens a FITS file and allocates the associated psFits object.
| filename | the FITS file name |
| mode | File open mode. Could be one of the following: 'r' (read only), 'r+' (read & write), 'rw' (same as 'r+'), or 'w' (create new file for writing) |
| psMetadata* psFitsReadHeader | ( | psMetadata * | out, | |
| const psFits * | fits | |||
| ) |
Reads the header of the current HDU.
| out | The psMetadata to add the header data. If null, a new psMetadata is created. |
| fits | the psFits object |
| psMetadata* psFitsReadHeaderSet | ( | psMetadata * | out, | |
| const psFits * | fits | |||
| ) |
Reads the header of all HDUs.
The current HDU is not changed.
| out | output metadata or NULL if new psMetadata is to be created. |
| fits | the psFits object |
Reads an image, given the desired region and z-plane.
| fits | the psFits object |
| region | the region in the FITS image to read |
| z | the z-plane in the FITS image cube to read |
Reads a whole FITS table.
The current HDU type must be either PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE.
| fits | the psFits object |
Reads a table column.
The current HDU type must be either PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE.
| fits | the psFits object |
| colname | the column name |
Reads a table column of numbers.
The current HDU type must be either PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE.
| fits | the psFits object |
| colname | the column name |
| psMetadata* psFitsReadTableRow | ( | const psFits * | fits, | |
| int | row | |||
| ) |
Reads a table row.
The current HDU type must be either PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE.
| fits | the psFits object |
| row | row number to read |
| bool psFitsSetExtName | ( | psFits * | fits, | |
| const char * | name | |||
| ) |
Set the current extension's name.
| fits | the psFits object |
| name | the extension name |
| bool psFitsTruncate | ( | psFits * | fits | ) |
Delete all extensions after the current position.
| fits | the psFits object |
Updates the FITS file image, given the desired region and z-plane.
a new IMAGE HDU is inserted before or after, depending on the AFTER parameter, the current HDU.
| fits | the psFits object |
| input | the image to output |
| x0 | psImage's x-axis origin in FITS image coordinates |
| y0 | psImage's y-axis origin in FITS image coordinates |
| z | the z-planes of the FITS image data cube to write |
| bool psFitsUpdateTable | ( | psFits * | fits, | |
| const psMetadata * | data, | |||
| int | row | |||
| ) |
Updates a FITS table.
The current HDU type must be either PS_FITS_TYPE_BINARY_TABLE or PS_FITS_TYPE_ASCII_TABLE.
| fits | the psFits object |
| data | Array of psMetadata items, which contains the output data items of each row. |
| row | the row number to update. |
| bool psFitsWriteBlank | ( | psFits * | fits, | |
| const psMetadata * | output, | |||
| const char * | extname | |||
| ) |
Writes a "blank" --- a header only, with no image or table.
| fits | the psFits object |
| output | the psMetadata data in which to write |
| bool psFitsWriteHeader | ( | psFits * | fits, | |
| const psMetadata * | output | |||
| ) |
Writes the values of the metadata to the current HDU header.
Doesn't check if the header has to be created.
| fits | the psFits object |
| output | the psMetadata data in which to write |
| bool psFitsWriteImage | ( | psFits * | fits, | |
| const psMetadata * | header, | |||
| const psImage * | input, | |||
| int | depth, | |||
| const char * | extname | |||
| ) |
Writes an image, given the desired region and z-plane.
| fits | the psFits object |
| header | header items for the new HDU. Can be NULL. |
| input | the image to output |
| depth | the number of z-planes of the FITS image data cube |
| extname | FITS extension name |
| bool psFitsWriteImageCube | ( | psFits * | fits, | |
| psMetadata * | header, | |||
| const psArray * | input, | |||
| const char * | extname | |||
| ) |
| bool psFitsWriteTable | ( | psFits * | fits, | |
| const psMetadata * | header, | |||
| const psArray * | table, | |||
| const char * | extname | |||
| ) |
Writes a whole FITS table.
A new HDU of the type BINTABLE is appended to the file.
| fits | the psFits object |
| header | header items for the new HDU. Can be NULL. |
| table | Array of psMetadata items, which contains the output data items of each row. |
| extname | Extension name |
| bool psImageJpeg | ( | const psImageJpegColormap * | map, | |
| const psImage * | image, | |||
| const char * | filename, | |||
| float | min, | |||
| float | max | |||
| ) |
| psImageJpegColormap* psImageJpegColormapAlloc | ( | ) |
| psImageJpegColormap* psImageJpegColormapSet | ( | psImageJpegColormap * | map, | |
| const char * | name | |||
| ) |
| bool psMemCheckFits | ( | psPtr | ptr | ) |
Checks the type of a particular pointer.
Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
| ptr | the pointer whose type to check |
| psString psSlurpFD | ( | int | fd | ) |
| psString psSlurpFile | ( | FILE * | stream | ) |
1.5.1