Instrument Neutral Distributed Interface INDI
2.0.2
|
Modules | |
DSP API SDFITS Extension | |
DSP API FITSIDI Extension | |
Classes | |
struct | dsp_fits_format |
FITS format. More... | |
struct | dsp_fits_keyword |
FITS keyword. More... | |
struct | dsp_fits_column |
Binary table FITS extension column. More... | |
struct | dsp_fits_row |
Binary table FITS extension row. More... | |
struct | dsp_fits_axis |
Binary table FITS Matrix axis. More... | |
struct | dsp_fits_matrix |
Binary table FITS Matrix. More... | |
Macros | |
#define | its(x) #x |
Returns non-zero decimal conversion of integer into string. More... | |
#define | itostr(x) its(x) |
#define | EXTFITS_ELEMENT_STRING (dsp_fits_format){"A", TSTRING, 0, 0} |
FITS element types. More... | |
#define | EXTFITS_ELEMENT_LOGICAL (dsp_fits_format){"L", TLOGICAL, 0, 0} |
#define | EXTFITS_ELEMENT_BIT (dsp_fits_format){"X", TBIT, 0, 0} |
#define | EXTFITS_ELEMENT_BYTE (dsp_fits_format){"B", TBYTE, 0, 0} |
#define | EXTFITS_ELEMENT_SBYTE (dsp_fits_format){"S", TSBYTE, 0, 0} |
#define | EXTFITS_ELEMENT_SHORT (dsp_fits_format){"I", TSHORT, 0, 0} |
#define | EXTFITS_ELEMENT_USHORT (dsp_fits_format){"U", TUSHORT, 0, 0} |
#define | EXTFITS_ELEMENT_INT (dsp_fits_format){"J", TINT, 0, 0} |
#define | EXTFITS_ELEMENT_UINT (dsp_fits_format){"V", TUINT, 0, 0} |
#define | EXTFITS_ELEMENT_LONG (dsp_fits_format){"K", TLONG, 0, 0} |
#define | EXTFITS_ELEMENT_FLOAT (dsp_fits_format){"E", TFLOAT, 0, 0} |
#define | EXTFITS_ELEMENT_DOUBLE (dsp_fits_format){"D", TDOUBLE, 0, 0} |
#define | EXTFITS_ELEMENT_COMPLEX (dsp_fits_format){"C", TCOMPLEX, 0, 0} |
#define | EXTFITS_ELEMENT_DBLCOMPLEX (dsp_fits_format){"M", TDBLCOMPLEX, 0, 0} |
#define | EXTFITS_MEASURE_UNIT_HZ "Hz" |
FITS Measure units. More... | |
#define | EXTFITS_MEASURE_UNIT_SECOND "sec" |
#define | EXTFITS_MEASURE_UNIT_MINUTE "min" |
#define | EXTFITS_MEASURE_UNIT_HOUR "hour" |
#define | EXTFITS_MEASURE_UNIT_DAY "day" |
#define | EXTFITS_MEASURE_UNIT_MONTH "month" |
#define | EXTFITS_MEASURE_UNIT_YEAR "year" |
#define | EXTFITS_MEASURE_UNIT_JANSKY "Jy" |
#define | EXTFITS_MEASURE_UNIT_KELVIN "K" |
#define | EXTFITS_MEASURE_UNIT_ANGSTROM "Angstrom" |
#define | EXTFITS_MEASURE_UNIT_ARCSEC "arcsec" |
#define | EXTFITS_MEASURE_UNIT_ARCMIN "arcmin" |
#define | EXTFITS_MEASURE_UNIT_DEGREE "degree" |
#define | EXTFITS_MEASURE_UNIT_PERCENT "percent" |
#define | EXTFITS_MEASURE_UNIT_METER "meter" |
#define | EXTFITS_MEASURE_UNIT_MILLIBAR "millibar" |
#define | EXTFITS_KEYWORD_TTYPE(n) (dsp_fits_keyword){"TTYPE" itostr(n), "8A", "", "", "Set to 'FLUX'", (char*[]){"FLUX", "DATA", ""}} |
Set to 'FLUX' or 'DATA' for matrix buffers. More... | |
#define | EXTFITS_KEYWORD_TUNIT(n) (dsp_fits_keyword){"TUNIT" itostr(n), "8A", "", "", "Shall have the value 'JY' or 'UNCALIB'", (char*[]){""}} |
shall have the value 'K', 'JY' or 'UNCALIB' More... | |
#define | EXTFITS_KEYWORD_TDIM(n) (dsp_fits_keyword){"TDIM" itostr(n), "8A", "", "", "Size in pixels of data buffer", (char*[]){""}} |
Size in pixels of data buffer. More... | |
#define | EXTFITS_KEYWORD_TFORM(n) (dsp_fits_keyword){"TFORM" itostr(n), "8A", "", "", "Shall be a character string", (char*[]){""}} |
shall have the format of the column More... | |
#define | EXTFITS_KEYWORD_CTYPE(m) (dsp_fits_keyword){"CTYPE" itostr(m), EXTFITS_ELEMENT_STRING.typestr, "", "", "Name of regular axis m = 1 to M", (char*[]){""}} |
Name of regular axis m = 1 to M. More... | |
#define | EXTFITS_KEYWORD_CDELT(m) (dsp_fits_keyword){"CDELT" itostr(m), EXTFITS_ELEMENT_FLOAT.typestr, "", "", "Coordinate increment on axis m = 1 to M", (char*[]){""}} |
Coordinate increment on axis m = 1 to M. More... | |
#define | EXTFITS_KEYWORD_CRPIX(m) (dsp_fits_keyword){"CRPIX" itostr(m), EXTFITS_ELEMENT_FLOAT.typestr, "", "", "Reference pixel on axis m = 1 to M", (char*[]){""}} |
Reference pixel on axis m = 1 to M. More... | |
#define | EXTFITS_KEYWORD_CRVAL(m) (dsp_fits_keyword){"CRVAL" itostr(m), EXTFITS_ELEMENT_FLOAT.typestr, "", "", "Coordinate value at reference pixel on axis m = 1 to M", (char*[]){""}} |
Coordinate value at reference pixel on axis m = 1 to M. More... | |
#define | EXTFITS_KEYWORD_NMATRIX (dsp_fits_keyword){"NMATRIX", EXTFITS_ELEMENT_SHORT.typestr, "", "1", "NMATRIX shall be present with the value 1", (char*[]){"1", ""}} |
NMATRIX shall be present with the value 1. More... | |
#define | EXTFITS_KEYWORD_TMATX(n) (dsp_fits_matrix){"TMATX" itostr(n), "8A", "T", "Set to 'T'", {EXTFITS_KEYWORD_TTYPE(n), EXTFITS_KEYWORD_TFORM(n), EXTFITS_KEYWORD_TUNIT(n), EXTFITS_KEYWORD_TDIM(n)}} |
Set to 'T' — column n contains the visibility matrix. More... | |
#define | EXTFITS_KEYWORD_MAXIS(m) (dsp_fits_axis){"MAXIS" itostr(m), EXTFITS_ELEMENT_SHORT.typestr, "", "", "M = number axes in regular matrix, Number pixels on axis m = 1 to M", {EXTFITS_KEYWORD_CTYPE(m), EXTFITS_KEYWORD_CDELT(m), EXTFITS_KEYWORD_CRPIX(m), EXTFITS_KEYWORD_CRVAL(m)}} |
M = number axes in regular matrix, Number pixels on axis m = 1 to M. More... | |
#define | EXTFITS_KEYWORD_OBJCTRA (dsp_fits_column){"OBJCTRA", EXTFITS_ELEMENT_STRING.typestr, EXTFITS_MEASURE_UNIT_DEGREE, "", "Target right ascension coordinate", (char*[]){""}} |
Target right ascension coordinate. More... | |
#define | EXTFITS_KEYWORD_OBJCTDEC (dsp_fits_column){"OBJCTDEC", EXTFITS_ELEMENT_STRING.typestr, EXTFITS_MEASURE_UNIT_DEGREE, "", "Target declination coordinate", (char*[]){""}} |
Target declination coordinate. More... | |
#define | FITS_KEYWORD_EXTEND (dsp_fits_keyword){"EXTEND", "A", "", "T", "", (char*[]){""}} |
#define | FITS_KEYWORD_EXTNAME (dsp_fits_keyword){"EXTNAME", "", "", "", "", (char*[]){""}} |
Functions | |
void | dsp_fits_update_fits_key (fitsfile *fptr, int type, char *name, void *value, char *comment, int *status) |
Create or update a new fits header key. More... | |
long | dsp_fits_alloc_fits_rows (fitsfile *fptr, unsigned long num_rows) |
Convert an RGB color dsp_t array into a dsp_stream_p array each element containing the single components. More... | |
int | dsp_fits_fill_fits_col (fitsfile *fptr, char *name, unsigned char *buf, int typecode, long num_elements, unsigned long rown) |
Fill a column at the given row position with the valued buffer. More... | |
int | dsp_fits_append_fits_col (fitsfile *fptr, char *name, char *format) |
Add a column to the binary table. More... | |
void | dsp_fits_delete_fits_col (fitsfile *fptr, char *name) |
Delete a column from the binary table. More... | |
size_t | dsp_fits_get_element_size (int typecode) |
Obtain the single element size in bytes. More... | |
int | dsp_fits_read_typecode (char *typestr, int *typecode, long *width, long *repeat) |
Decode a typecode format string. More... | |
int | dsp_fits_get_value (fitsfile *fptr, char *column, long rown, void **retval) |
Obtain the value of the specified field. More... | |
int | dsp_fits_check_column (fitsfile *fptr, char *column, char **expected, long rown) |
Check if the value of the specified field corresponds to a subset of values. More... | |
fitsfile * | dsp_fits_create_fits (size_t *size, void **buf) |
Create an open fits file pointer to be updated later. More... | |
int | dsp_fits_add_table (fitsfile *fptr, dsp_fits_column *columns, int ncols, const char *tablename) |
Add a binary table extension into a fits file. More... | |
int | dsp_fits_close_fits (fitsfile *fptr) |
Close a fits file pointer. More... | |
#define EXTFITS_ELEMENT_BIT (dsp_fits_format){"X", TBIT, 0, 0} |
#define EXTFITS_ELEMENT_BYTE (dsp_fits_format){"B", TBYTE, 0, 0} |
#define EXTFITS_ELEMENT_COMPLEX (dsp_fits_format){"C", TCOMPLEX, 0, 0} |
#define EXTFITS_ELEMENT_DBLCOMPLEX (dsp_fits_format){"M", TDBLCOMPLEX, 0, 0} |
#define EXTFITS_ELEMENT_DOUBLE (dsp_fits_format){"D", TDOUBLE, 0, 0} |
#define EXTFITS_ELEMENT_FLOAT (dsp_fits_format){"E", TFLOAT, 0, 0} |
#define EXTFITS_ELEMENT_INT (dsp_fits_format){"J", TINT, 0, 0} |
#define EXTFITS_ELEMENT_LOGICAL (dsp_fits_format){"L", TLOGICAL, 0, 0} |
#define EXTFITS_ELEMENT_LONG (dsp_fits_format){"K", TLONG, 0, 0} |
#define EXTFITS_ELEMENT_SBYTE (dsp_fits_format){"S", TSBYTE, 0, 0} |
#define EXTFITS_ELEMENT_SHORT (dsp_fits_format){"I", TSHORT, 0, 0} |
#define EXTFITS_ELEMENT_STRING (dsp_fits_format){"A", TSTRING, 0, 0} |
#define EXTFITS_ELEMENT_UINT (dsp_fits_format){"V", TUINT, 0, 0} |
#define EXTFITS_ELEMENT_USHORT (dsp_fits_format){"U", TUSHORT, 0, 0} |
#define EXTFITS_KEYWORD_CDELT | ( | m | ) | (dsp_fits_keyword){"CDELT" itostr(m), EXTFITS_ELEMENT_FLOAT.typestr, "", "", "Coordinate increment on axis m = 1 to M", (char*[]){""}} |
#define EXTFITS_KEYWORD_CRPIX | ( | m | ) | (dsp_fits_keyword){"CRPIX" itostr(m), EXTFITS_ELEMENT_FLOAT.typestr, "", "", "Reference pixel on axis m = 1 to M", (char*[]){""}} |
#define EXTFITS_KEYWORD_CRVAL | ( | m | ) | (dsp_fits_keyword){"CRVAL" itostr(m), EXTFITS_ELEMENT_FLOAT.typestr, "", "", "Coordinate value at reference pixel on axis m = 1 to M", (char*[]){""}} |
#define EXTFITS_KEYWORD_CTYPE | ( | m | ) | (dsp_fits_keyword){"CTYPE" itostr(m), EXTFITS_ELEMENT_STRING.typestr, "", "", "Name of regular axis m = 1 to M", (char*[]){""}} |
#define EXTFITS_KEYWORD_MAXIS | ( | m | ) | (dsp_fits_axis){"MAXIS" itostr(m), EXTFITS_ELEMENT_SHORT.typestr, "", "", "M = number axes in regular matrix, Number pixels on axis m = 1 to M", {EXTFITS_KEYWORD_CTYPE(m), EXTFITS_KEYWORD_CDELT(m), EXTFITS_KEYWORD_CRPIX(m), EXTFITS_KEYWORD_CRVAL(m)}} |
#define EXTFITS_KEYWORD_NMATRIX (dsp_fits_keyword){"NMATRIX", EXTFITS_ELEMENT_SHORT.typestr, "", "1", "NMATRIX shall be present with the value 1", (char*[]){"1", ""}} |
#define EXTFITS_KEYWORD_OBJCTDEC (dsp_fits_column){"OBJCTDEC", EXTFITS_ELEMENT_STRING.typestr, EXTFITS_MEASURE_UNIT_DEGREE, "", "Target declination coordinate", (char*[]){""}} |
#define EXTFITS_KEYWORD_OBJCTRA (dsp_fits_column){"OBJCTRA", EXTFITS_ELEMENT_STRING.typestr, EXTFITS_MEASURE_UNIT_DEGREE, "", "Target right ascension coordinate", (char*[]){""}} |
#define EXTFITS_KEYWORD_TDIM | ( | n | ) | (dsp_fits_keyword){"TDIM" itostr(n), "8A", "", "", "Size in pixels of data buffer", (char*[]){""}} |
#define EXTFITS_KEYWORD_TFORM | ( | n | ) | (dsp_fits_keyword){"TFORM" itostr(n), "8A", "", "", "Shall be a character string", (char*[]){""}} |
#define EXTFITS_KEYWORD_TMATX | ( | n | ) | (dsp_fits_matrix){"TMATX" itostr(n), "8A", "T", "Set to 'T'", {EXTFITS_KEYWORD_TTYPE(n), EXTFITS_KEYWORD_TFORM(n), EXTFITS_KEYWORD_TUNIT(n), EXTFITS_KEYWORD_TDIM(n)}} |
#define EXTFITS_KEYWORD_TTYPE | ( | n | ) | (dsp_fits_keyword){"TTYPE" itostr(n), "8A", "", "", "Set to 'FLUX'", (char*[]){"FLUX", "DATA", ""}} |
#define EXTFITS_KEYWORD_TUNIT | ( | n | ) | (dsp_fits_keyword){"TUNIT" itostr(n), "8A", "", "", "Shall have the value 'JY' or 'UNCALIB'", (char*[]){""}} |
#define FITS_KEYWORD_EXTEND (dsp_fits_keyword){"EXTEND", "A", "", "T", "", (char*[]){""}} |
#define FITS_KEYWORD_EXTNAME (dsp_fits_keyword){"EXTNAME", "", "", "", "", (char*[]){""}} |
#define its | ( | x | ) | #x |
int dsp_fits_add_table | ( | fitsfile * | fptr, |
dsp_fits_column * | columns, | ||
int | ncols, | ||
const char * | tablename | ||
) |
Add a binary table extension into a fits file.
fptr | Pointer to a fits file |
columns | An array of dsp_fits_column structs |
ncols | The dsp_fits_column array length |
tablename | The extension table name |
long dsp_fits_alloc_fits_rows | ( | fitsfile * | fptr, |
unsigned long | num_rows | ||
) |
Convert an RGB color dsp_t array into a dsp_stream_p array each element containing the single components.
fptr | The fits file pointer created by dsp_fits_create_fits |
num_rows | The number of rows to be allocated |
int dsp_fits_append_fits_col | ( | fitsfile * | fptr, |
char * | name, | ||
char * | format | ||
) |
Add a column to the binary table.
fptr | The fits file pointer created by dsp_fits_create_fits |
name | The name of the column |
format | This field should indicate the element size, width of each element and repetition eventually |
int dsp_fits_check_column | ( | fitsfile * | fptr, |
char * | column, | ||
char ** | expected, | ||
long | rown | ||
) |
Check if the value of the specified field corresponds to a subset of values.
fptr | The fits file pointer created by dsp_fits_create_fits |
column | The column name of the selected field |
expected | A buffer array containing expected values, terminating with an empty value |
rown | The row position of the field |
int dsp_fits_close_fits | ( | fitsfile * | fptr | ) |
fitsfile* dsp_fits_create_fits | ( | size_t * | size, |
void ** | buf | ||
) |
void dsp_fits_delete_fits_col | ( | fitsfile * | fptr, |
char * | name | ||
) |
int dsp_fits_fill_fits_col | ( | fitsfile * | fptr, |
char * | name, | ||
unsigned char * | buf, | ||
int | typecode, | ||
long | num_elements, | ||
unsigned long | rown | ||
) |
Fill a column at the given row position with the valued buffer.
fptr | The fits file pointer created by dsp_fits_create_fits |
name | The name of the column |
buf | The buffer that will be copied into the selected field. |
typecode | The element type size |
num_elements | The total field size in elements, this should take into account the width and repeat multipliers |
rown | The row number where the field is located |
size_t dsp_fits_get_element_size | ( | int | typecode | ) |
int dsp_fits_get_value | ( | fitsfile * | fptr, |
char * | column, | ||
long | rown, | ||
void ** | retval | ||
) |
Obtain the value of the specified field.
fptr | The fits file pointer created by dsp_fits_create_fits |
column | The column name of the selected field |
rown | The row position of the field |
retval | A preallocated buffer where the field value will be stored into |
int dsp_fits_read_typecode | ( | char * | typestr, |
int * | typecode, | ||
long * | width, | ||
long * | repeat | ||
) |
Decode a typecode format string.
typestr | The element format string |
typecode | This function will return the typecode to this variable |
width | This function will return the width to this variable |
repeat | This function will return the repeatition count to this variable |
void dsp_fits_update_fits_key | ( | fitsfile * | fptr, |
int | type, | ||
char * | name, | ||
void * | value, | ||
char * | comment, | ||
int * | status | ||
) |
Create or update a new fits header key.
fptr | The fits file pointer created by dsp_fits_create_fits |
type | The typecode of the value |
name | The keyword to be updated |
value | The new value of the specified keyword |
comment | The keyword or assigned value description or explanation |
status | This variable will be updated with the status of the update operation |