My Project
 All Classes Files Functions Variables Enumerations Enumerator Friends Macros Pages
fitsio.h
1 /* The FITSIO software was written by William Pence at the High Energy */
2 /* Astrophysic Science Archive Research Center (HEASARC) at the NASA */
3 /* Goddard Space Flight Center. */
4 /*
5 
6 Copyright (Unpublished--all rights reserved under the copyright laws of
7 the United States), U.S. Government as represented by the Administrator
8 of the National Aeronautics and Space Administration. No copyright is
9 claimed in the United States under Title 17, U.S. Code.
10 
11 Permission to freely use, copy, modify, and distribute this software
12 and its documentation without fee is hereby granted, provided that this
13 copyright notice and disclaimer of warranty appears in all copies.
14 
15 DISCLAIMER:
16 
17 THE SOFTWARE IS PROVIDED 'AS IS' WITHOUT ANY WARRANTY OF ANY KIND,
18 EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO,
19 ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY
20 IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
21 PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE
22 DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE
23 SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NASA BE LIABLE FOR ANY
24 DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR
25 CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY
26 CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY,
27 CONTRACT, TORT , OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY
28 PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED
29 FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR
30 SERVICES PROVIDED HEREUNDER."
31 
32 */
33 
34 #ifndef _FITSIO_H
35 #define _FITSIO_H
36 
37 #include <stdio.h>
38 /* stddef.h is apparently needed to define size_t */
39 #include <stddef.h>
40 
41 /* The following exclusion if __CINT__ is defined is needed for ROOT */
42 #ifndef __CINT__
43 #include "longnam.h"
44 #endif
45 
46 /* global variables */
47 
48 #define FLEN_FILENAME 1025 /* max length of a filename */
49 #define FLEN_KEYWORD 72 /* max length of a keyword (HIERARCH convention) */
50 #define FLEN_CARD 81 /* length of a FITS header card */
51 #define FLEN_VALUE 71 /* max length of a keyword value string */
52 #define FLEN_COMMENT 73 /* max length of a keyword comment string */
53 #define FLEN_ERRMSG 81 /* max length of a FITSIO error message */
54 #define FLEN_STATUS 31 /* max length of a FITSIO status text string */
55 
56 #define TBIT 1 /* codes for FITS table data types */
57 #define TBYTE 11
58 #define TLOGICAL 14
59 #define TSTRING 16
60 #define TUSHORT 20
61 #define TSHORT 21
62 #define TUINT 30
63 #define TINT 31
64 #define TULONG 40
65 #define TLONG 41
66 #define TINT32BIT 41 /* used when returning datatype of a column */
67 #define TFLOAT 42
68 #define TDOUBLE 82
69 #define TCOMPLEX 83
70 #define TDBLCOMPLEX 163
71 
72 #define TYP_STRUC_KEY 10
73 #define TYP_CMPRS_KEY 20
74 #define TYP_SCAL_KEY 30
75 #define TYP_NULL_KEY 40
76 #define TYP_DIM_KEY 50
77 #define TYP_RANG_KEY 60
78 #define TYP_UNIT_KEY 70
79 #define TYP_DISP_KEY 80
80 #define TYP_HDUID_KEY 90
81 #define TYP_CKSUM_KEY 100
82 #define TYP_WCS_KEY 110
83 #define TYP_REFSYS_KEY 120
84 #define TYP_COMM_KEY 130
85 #define TYP_CONT_KEY 140
86 #define TYP_USER_KEY 150
87 
88 /* Define the datatype for variables which store file offset values. */
89 /* The new 'off_t' datatype should be used for this purpose, but */
90 /* some older compilers do not recognize this type, in which case we */
91 /* use 'long' instead. */
92 
93 #if defined(_FILE_OFFSET_BITS) || defined(_MIPS_SZLONG)
94 # define OFF_T off_t
95 #else
96 # define OFF_T long
97 #endif
98 
99 
100 #define INT32BIT int /* 32-bit integer datatype. Currently this */
101  /* datatype is an 'int' on all useful platforms */
102  /* however, it is possible that that are cases */
103  /* where 'int' is a 2-byte integer, in which case */
104  /* INT32BIT would need to be defined as 'long'. */
105 
106 #define BYTE_IMG 8 /* BITPIX code values for FITS image types */
107 #define SHORT_IMG 16
108 #define LONG_IMG 32
109 #define FLOAT_IMG -32
110 #define DOUBLE_IMG -64
111  /* The following 2 codes are not true FITS */
112  /* datatypes; these codes are only used internally */
113  /* within cfitsio to make it easier for users */
114  /* to deal with unsigned integers. */
115 #define USHORT_IMG 20
116 #define ULONG_IMG 40
117 
118 #define IMAGE_HDU 0 /* Primary Array or IMAGE HDU */
119 #define ASCII_TBL 1 /* ASCII table HDU */
120 #define BINARY_TBL 2 /* Binary table HDU */
121 #define ANY_HDU -1 /* matches any HDU type */
122 
123 #define READONLY 0 /* options when opening a file */
124 #define READWRITE 1
125 
126 /* adopt a hopefully obscure number to use as a null value flag */
127 /* could be problems if the FITS files contain data with these values */
128 #define FLOATNULLVALUE -9.11912E-36F
129 #define DOUBLENULLVALUE -9.1191291391491E-36
130 
131 /* Image compression algorithm types */
132 #define MAX_COMPRESS_DIM 6
133 #define RICE_1 11
134 #define GZIP_1 21
135 #define PLIO_1 31
136 #define HCOMPRESS_1 41
137 
138 #ifndef TRUE
139 #define TRUE 1
140 #endif
141 
142 #ifndef FALSE
143 #define FALSE 0
144 #endif
145 
146 #define CASESEN 1 /* do case-sensitive string match */
147 #define CASEINSEN 0 /* do case-insensitive string match */
148 
149 #define MAXHDU 1000 /* maximum number of extensions allowed in a FITS file */
150 
151 #define GT_ID_ALL_URI 0 /* hierarchical grouping parameters */
152 #define GT_ID_REF 1
153 #define GT_ID_POS 2
154 #define GT_ID_ALL 3
155 #define GT_ID_REF_URI 11
156 #define GT_ID_POS_URI 12
157 
158 #define OPT_RM_GPT 0
159 #define OPT_RM_ENTRY 1
160 #define OPT_RM_MBR 2
161 #define OPT_RM_ALL 3
162 
163 #define OPT_GCP_GPT 0
164 #define OPT_GCP_MBR 1
165 #define OPT_GCP_ALL 2
166 
167 #define OPT_MCP_ADD 0
168 #define OPT_MCP_NADD 1
169 #define OPT_MCP_REPL 2
170 #define OPT_MCP_MOV 3
171 
172 #define OPT_MRG_COPY 0
173 #define OPT_MRG_MOV 1
174 
175 #define OPT_CMT_MBR 1
176 #define OPT_CMT_MBR_DEL 11
177 
178 typedef struct /* structure used to store table column information */
179 {
180  char ttype[70]; /* column name = FITS TTYPEn keyword; */
181  long tbcol; /* offset in row to first byte of each column */
182  int tdatatype; /* datatype code of each column */
183  OFF_T trepeat; /* repeat count of column; number of elements */
184  double tscale; /* FITS TSCALn linear scaling factor */
185  double tzero; /* FITS TZEROn linear scaling zero point */
186  long tnull; /* FITS null value for int image or binary table cols */
187  char strnull[20]; /* FITS null value string for ASCII table columns */
188  char tform[10]; /* FITS tform keyword value */
189  long twidth; /* width of each ASCII table column */
190 }tcolumn;
191 
192 #define VALIDSTRUC 555 /* magic value used to identify if structure is valid */
193 
194 typedef struct /* structure used to store basic FITS file information */
195 {
196  int filehandle; /* handle returned by the file open function */
197  int driver; /* defines which set of I/O drivers should be used */
198  int open_count; /* number of opened 'fitsfiles' using this structure */
199  char *filename; /* file name */
200  int validcode; /* magic value used to verify that structure is valid */
201  OFF_T filesize; /* current size of the physical disk file in bytes */
202  OFF_T logfilesize; /* logical size of file, including unflushed buffers */
203  int lasthdu; /* is this the last HDU in the file? 0 = no, else yes */
204  OFF_T bytepos; /* current logical I/O pointer position in file */
205  OFF_T io_pos; /* current I/O pointer position in the physical file */
206  int curbuf; /* number of I/O buffer currently in use */
207  int curhdu; /* current HDU number; 0 = primary array */
208  int hdutype; /* 0 = primary array, 1 = ASCII table, 2 = binary table */
209  int writemode; /* 0 = readonly, 1 = readwrite */
210  int maxhdu; /* highest numbered HDU known to exist in the file */
211  OFF_T headstart[MAXHDU + 1]; /* byte offset in file to start of each HDU */
212  OFF_T headend; /* byte offest in file to end of the current HDU header */
213  OFF_T nextkey; /* byte offset in file to beginning of next keyword */
214  OFF_T datastart;/* byte offset in file to start of the current data unit */
215  int tfield; /* number of fields in the table (primary array has 2 */
216  long origrows; /* original number of rows (value of NAXIS2 keyword) */
217  long numrows; /* number of rows in the table (dynamically updated) */
218  OFF_T rowlength; /* length of a table row or image size (bytes) */
219  tcolumn *tableptr; /* pointer to the table structure */
220  OFF_T heapstart; /* heap start byte relative to start of data unit */
221  long heapsize; /* size of the heap, in bytes */
222 
223  /* the following elements are related to compressed images */
224  int compressimg; /* 1 if HDU contains a compressed image, else 0 */
225  char zcmptype[12]; /* compression type string */
226  int compress_type; /* type of compression algorithm */
227  int zbitpix; /* FITS data type of image (BITPIX) */
228  int zndim; /* dimension of image */
229  long znaxis[MAX_COMPRESS_DIM]; /* length of each axis */
230  long tilesize[MAX_COMPRESS_DIM]; /* size of compression tiles */
231  long maxtilelen; /* max number of pixels in each image tile */
232  long maxelem; /* maximum length of variable length arrays */
233 
234  int cn_compressed; /* column number for COMPRESSED_DATA column */
235  int cn_uncompressed; /* column number for UNCOMPRESSED_DATA column */
236  int cn_zscale; /* column number for ZSCALE column */
237  int cn_zzero; /* column number for ZZERO column */
238  int cn_zblank; /* column number for the ZBLANK column */
239 
240  double zscale; /* scaling value, if same for all tiles */
241  double zzero; /* zero pt, if same for all tiles */
242  int zblank; /* value for null pixels, if not a column */
243 
244  int rice_blocksize; /* first compression parameter */
245  int rice_nbits; /* second compression parameter */
246 } FITSfile;
247 
248 typedef struct /* structure used to store basic HDU information */
249 {
250  int HDUposition; /* HDU position in file; 0 = first HDU */
251  FITSfile *Fptr; /* pointer to FITS file structure */
252 }fitsfile;
253 
254 typedef struct /* structure for the iterator function column information */
255 {
256  /* elements required as input to fits_iterate_data: */
257 
258  fitsfile *fptr; /* pointer to the HDU containing the column */
259  int colnum; /* column number in the table (use name if < 1) */
260  char colname[70]; /* name (= TTYPEn value) of the column (optional) */
261  int datatype; /* output datatype (converted if necessary */
262  int iotype; /* = InputCol, InputOutputCol, or OutputCol */
263 
264  /* output elements that may be useful for the work function: */
265 
266  void *array; /* pointer to the array (and the null value) */
267  long repeat; /* binary table vector repeat value */
268  long tlmin; /* legal minimum data value */
269  long tlmax; /* legal maximum data value */
270  char tunit[70]; /* physical unit string */
271  char tdisp[70]; /* suggested display format */
272 
273 } iteratorCol;
274 
275 #define InputCol 0 /* flag for input only iterator column */
276 #define InputOutputCol 1 /* flag for input and output iterator column */
277 #define OutputCol 2 /* flag for output only iterator column */
278 
279 /* error status codes */
280 
281 #define USE_MEM_BUFF -101 /* use memory buffer when opening file */
282 #define OVERFLOW_ERR -11 /* overflow during datatype conversion */
283 #define SAME_FILE 101 /* input and output files are the same */
284 #define TOO_MANY_FILES 103 /* tried to open too many FITS files */
285 #define FILE_NOT_OPENED 104 /* could not open the named file */
286 #define FILE_NOT_CREATED 105 /* could not create the named file */
287 #define WRITE_ERROR 106 /* error writing to FITS file */
288 #define END_OF_FILE 107 /* tried to move past end of file */
289 #define READ_ERROR 108 /* error reading from FITS file */
290 #define FILE_NOT_CLOSED 110 /* could not close the file */
291 #define ARRAY_TOO_BIG 111 /* array dimensions exceed internal limit */
292 #define READONLY_FILE 112 /* Cannot write to readonly file */
293 #define MEMORY_ALLOCATION 113 /* Could not allocate memory */
294 #define BAD_FILEPTR 114 /* invalid fitsfile pointer */
295 #define NULL_INPUT_PTR 115 /* NULL input pointer to routine */
296 #define SEEK_ERROR 116 /* error seeking position in file */
297 
298 #define BAD_URL_PREFIX 121 /* invalid URL prefix on file name */
299 #define TOO_MANY_DRIVERS 122 /* tried to register too many IO drivers */
300 #define DRIVER_INIT_FAILED 123 /* driver initialization failed */
301 #define NO_MATCHING_DRIVER 124 /* matching driver is not registered */
302 #define URL_PARSE_ERROR 125 /* failed to parse input file URL */
303 
304 #define SHARED_ERRBASE (150)
305 #define SHARED_BADARG (SHARED_ERRBASE + 1)
306 #define SHARED_NULPTR (SHARED_ERRBASE + 2)
307 #define SHARED_TABFULL (SHARED_ERRBASE + 3)
308 #define SHARED_NOTINIT (SHARED_ERRBASE + 4)
309 #define SHARED_IPCERR (SHARED_ERRBASE + 5)
310 #define SHARED_NOMEM (SHARED_ERRBASE + 6)
311 #define SHARED_AGAIN (SHARED_ERRBASE + 7)
312 #define SHARED_NOFILE (SHARED_ERRBASE + 8)
313 #define SHARED_NORESIZE (SHARED_ERRBASE + 9)
314 
315 #define HEADER_NOT_EMPTY 201 /* header already contains keywords */
316 #define KEY_NO_EXIST 202 /* keyword not found in header */
317 #define KEY_OUT_BOUNDS 203 /* keyword record number is out of bounds */
318 #define VALUE_UNDEFINED 204 /* keyword value field is blank */
319 #define NO_QUOTE 205 /* string is missing the closing quote */
320 #define BAD_KEYCHAR 207 /* illegal character in keyword name or card */
321 #define BAD_ORDER 208 /* required keywords out of order */
322 #define NOT_POS_INT 209 /* keyword value is not a positive integer */
323 #define NO_END 210 /* couldn't find END keyword */
324 #define BAD_BITPIX 211 /* illegal BITPIX keyword value*/
325 #define BAD_NAXIS 212 /* illegal NAXIS keyword value */
326 #define BAD_NAXES 213 /* illegal NAXISn keyword value */
327 #define BAD_PCOUNT 214 /* illegal PCOUNT keyword value */
328 #define BAD_GCOUNT 215 /* illegal GCOUNT keyword value */
329 #define BAD_TFIELDS 216 /* illegal TFIELDS keyword value */
330 #define NEG_WIDTH 217 /* negative table row size */
331 #define NEG_ROWS 218 /* negative number of rows in table */
332 #define COL_NOT_FOUND 219 /* column with this name not found in table */
333 #define BAD_SIMPLE 220 /* illegal value of SIMPLE keyword */
334 #define NO_SIMPLE 221 /* Primary array doesn't start with SIMPLE */
335 #define NO_BITPIX 222 /* Second keyword not BITPIX */
336 #define NO_NAXIS 223 /* Third keyword not NAXIS */
337 #define NO_NAXES 224 /* Couldn't find all the NAXISn keywords */
338 #define NO_XTENSION 225 /* HDU doesn't start with XTENSION keyword */
339 #define NOT_ATABLE 226 /* the CHDU is not an ASCII table extension */
340 #define NOT_BTABLE 227 /* the CHDU is not a binary table extension */
341 #define NO_PCOUNT 228 /* couldn't find PCOUNT keyword */
342 #define NO_GCOUNT 229 /* couldn't find GCOUNT keyword */
343 #define NO_TFIELDS 230 /* couldn't find TFIELDS keyword */
344 #define NO_TBCOL 231 /* couldn't find TBCOLn keyword */
345 #define NO_TFORM 232 /* couldn't find TFORMn keyword */
346 #define NOT_IMAGE 233 /* the CHDU is not an IMAGE extension */
347 #define BAD_TBCOL 234 /* TBCOLn keyword value < 0 or > rowlength */
348 #define NOT_TABLE 235 /* the CHDU is not a table */
349 #define COL_TOO_WIDE 236 /* column is too wide to fit in table */
350 #define COL_NOT_UNIQUE 237 /* more than 1 column name matches template */
351 #define BAD_ROW_WIDTH 241 /* sum of column widths not = NAXIS1 */
352 #define UNKNOWN_EXT 251 /* unrecognizable FITS extension type */
353 #define UNKNOWN_REC 252 /* unrecognizable FITS record */
354 #define END_JUNK 253 /* END keyword is not blank */
355 #define BAD_HEADER_FILL 254 /* Header fill area not blank */
356 #define BAD_DATA_FILL 255 /* Data fill area not blank or zero */
357 #define BAD_TFORM 261 /* illegal TFORM format code */
358 #define BAD_TFORM_DTYPE 262 /* unrecognizable TFORM datatype code */
359 #define BAD_TDIM 263 /* illegal TDIMn keyword value */
360 
361 #define BAD_HDU_NUM 301 /* HDU number < 1 or > MAXHDU */
362 #define BAD_COL_NUM 302 /* column number < 1 or > tfields */
363 #define NEG_FILE_POS 304 /* tried to move before beginning of file */
364 #define NEG_BYTES 306 /* tried to read or write negative bytes */
365 #define BAD_ROW_NUM 307 /* illegal starting row number in table */
366 #define BAD_ELEM_NUM 308 /* illegal starting element number in vector */
367 #define NOT_ASCII_COL 309 /* this is not an ASCII string column */
368 #define NOT_LOGICAL_COL 310 /* this is not a logical datatype column */
369 #define BAD_ATABLE_FORMAT 311 /* ASCII table column has wrong format */
370 #define BAD_BTABLE_FORMAT 312 /* Binary table column has wrong format */
371 #define NO_NULL 314 /* null value has not been defined */
372 #define NOT_VARI_LEN 317 /* this is not a variable length column */
373 #define BAD_DIMEN 320 /* illegal number of dimensions in array */
374 #define BAD_PIX_NUM 321 /* first pixel number greater than last pixel */
375 #define ZERO_SCALE 322 /* illegal BSCALE or TSCALn keyword = 0 */
376 #define NEG_AXIS 323 /* illegal axis length < 1 */
377 
378 #define NOT_GROUP_TABLE 340
379 #define HDU_ALREADY_MEMBER 341
380 #define MEMBER_NOT_FOUND 342
381 #define GROUP_NOT_FOUND 343
382 #define BAD_GROUP_ID 344
383 #define TOO_MANY_HDUS_TRACKED 345
384 #define HDU_ALREADY_TRACKED 346
385 #define BAD_OPTION 347
386 #define IDENTICAL_POINTERS 348
387 
388 #define BAD_I2C 401 /* bad int to formatted string conversion */
389 #define BAD_F2C 402 /* bad float to formatted string conversion */
390 #define BAD_INTKEY 403 /* can't interprete keyword value as integer */
391 #define BAD_LOGICALKEY 404 /* can't interprete keyword value as logical */
392 #define BAD_FLOATKEY 405 /* can't interprete keyword value as float */
393 #define BAD_DOUBLEKEY 406 /* can't interprete keyword value as double */
394 #define BAD_C2I 407 /* bad formatted string to int conversion */
395 #define BAD_C2F 408 /* bad formatted string to float conversion */
396 #define BAD_C2D 409 /* bad formatted string to double conversion */
397 #define BAD_DATATYPE 410 /* bad keyword datatype code */
398 #define BAD_DECIM 411 /* bad number of decimal places specified */
399 #define NUM_OVERFLOW 412 /* overflow during datatype conversion */
400 
401 # define DATA_COMPRESSION_ERR 413 /* error in imcompress routines */
402 # define DATA_DECOMPRESSION_ERR 414 /* error in imcompress routines */
403 
404 #define BAD_DATE 420 /* error in date or time conversion */
405 
406 #define PARSE_SYNTAX_ERR 431 /* syntax error in parser expression */
407 #define PARSE_BAD_TYPE 432 /* expression did not evaluate to desired type */
408 #define PARSE_LRG_VECTOR 433 /* vector result too large to return in array */
409 #define PARSE_NO_OUTPUT 434 /* data parser failed not sent an out column */
410 #define PARSE_BAD_COL 435 /* bad data encounter while parsing column */
411 #define PARSE_BAD_OUTPUT 436 /* Output file not of proper type */
412 
413 #define ANGLE_TOO_BIG 501 /* celestial angle too large for projection */
414 #define BAD_WCS_VAL 502 /* bad celestial coordinate or pixel value */
415 #define WCS_ERROR 503 /* error in celestial coordinate calculation */
416 #define BAD_WCS_PROJ 504 /* unsupported type of celestial projection */
417 #define NO_WCS_KEY 505 /* celestial coordinate keywords not found */
418 #define APPROX_WCS_KEY 506 /* approximate WCS keywords were calculated */
419 
420 /*------- following error codes are used in the grparser.c file -----------*/
421 #define NGP_ERRBASE (360) /* base chosen so not to interfere with CFITSIO */
422 #define NGP_OK (0)
423 #define NGP_NO_MEMORY (NGP_ERRBASE + 0) /* malloc failed */
424 #define NGP_READ_ERR (NGP_ERRBASE + 1) /* read error from file */
425 #define NGP_NUL_PTR (NGP_ERRBASE + 2) /* null pointer passed as argument */
426 #define NGP_EMPTY_CURLINE (NGP_ERRBASE + 3) /* line read seems to be empty */
427 #define NGP_UNREAD_QUEUE_FULL (NGP_ERRBASE + 4) /* cannot unread more then 1 line (or single line twice) */
428 #define NGP_INC_NESTING (NGP_ERRBASE + 5) /* too deep include file nesting (inf. loop ?) */
429 #define NGP_ERR_FOPEN (NGP_ERRBASE + 6) /* fopen() failed, cannot open file */
430 #define NGP_EOF (NGP_ERRBASE + 7) /* end of file encountered */
431 #define NGP_BAD_ARG (NGP_ERRBASE + 8) /* bad arguments passed */
432 #define NGP_TOKEN_NOT_EXPECT (NGP_ERRBASE + 9) /* token not expected here */
433 
434 /* The following exclusion if __CINT__ is defined is needed for ROOT */
435 #ifndef __CINT__
436 /* the following 3 lines are needed to support C++ compilers */
437 #ifdef __cplusplus
438 extern "C" {
439 #endif
440 #endif
441 
442 /*---------------- FITS file URL parsing routines -------------*/
443 int fits_get_token(char **ptr, char *delimiter, char *token, int *isanumber);
444 int ffiurl(char *url, char *urltype, char *infile,
445  char *outfile, char *extspec, char *rowfilter,
446  char *binspec, char *colspec, int *status);
447 int ffrtnm(char *url, char *rootname, int *status);
448 int ffourl(char *url, char *urltype, char *outfile, char *tmplfile,
449  int *status);
450 int ffexts(char *extspec, int *extnum, char *extname, int *extvers,
451  int *hdutype, char *colname, char *rowexpress, int *status);
452 int ffextn(char *url, int *extension_num, int *status);
453 int ffurlt(fitsfile *fptr, char *urlType, int *status);
454 int ffbins(char *binspec, int *imagetype, int *haxis,
455  char colname[4][FLEN_VALUE], double *minin,
456  double *maxin, double *binsizein,
457  char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE],
458  char binname[4][FLEN_VALUE], double *weight, char *wtname,
459  int *recip, int *status);
460 int ffbinr(char **binspec, char *colname, double *minin,
461  double *maxin, double *binsizein, char *minname,
462  char *maxname, char *binname, int *status);
463 int ffimport_file( char *filename, char **contents, int *status );
464 
465 /*---------------- FITS file I/O routines -------------*/
466 int ffomem(fitsfile **fptr, const char *name, int mode, void **buffptr,
467  size_t *buffsize, size_t deltasize,
468  void *(*mem_realloc)(void *p, size_t newsize),
469  int *status);
470 int ffopen(fitsfile **fptr, const char *filename, int iomode, int *status);
471 int ffreopen(fitsfile *openfptr, fitsfile **newfptr, int *status);
472 int ffinit(fitsfile **fptr, const char *filename, int *status);
473 int ffimem(fitsfile **fptr, void **buffptr,
474  size_t *buffsize, size_t deltasize,
475  void *(*mem_realloc)(void *p, size_t newsize),
476  int *status);
477 int fftplt(fitsfile **fptr, const char *filename, const char *tempname,
478  int *status);
479 int ffflus(fitsfile *fptr, int *status);
480 int ffclos(fitsfile *fptr, int *status);
481 int ffdelt(fitsfile *fptr, int *status);
482 int ffflnm(fitsfile *fptr, char *filename, int *status);
483 int ffflmd(fitsfile *fptr, int *filemode, int *status);
484 
485 /*---------------- utility routines -------------*/
486 float ffvers(float *version);
487 void ffupch(char *string);
488 void ffgerr(int status, char *errtext);
489 void ffpmsg(const char *err_message);
490 int ffgmsg(char *err_message);
491 void ffcmsg(void);
492 void ffrprt(FILE *stream, int status);
493 void ffcmps(char *templt, char *colname, int casesen, int *match,
494  int *exact);
495 int fftkey(char *keyword, int *status);
496 int fftrec(char *card, int *status);
497 int ffnchk(fitsfile *fptr, int *status);
498 int ffkeyn(char *keyroot, int value, char *keyname, int *status);
499 int ffnkey(int value, char *keyroot, char *keyname, int *status);
500 int ffgkcl(char *card);
501 int ffdtyp(char *cval, char *dtype, int *status);
502 int ffpsvc(char *card, char *value, char *comm, int *status);
503 int ffgknm(char *card, char *name, int *length, int *status);
504 int ffgthd(char *tmplt, char *card, int *hdtype, int *status);
505 int ffasfm(char *tform, int *datacode, long *width, int *decim, int *status);
506 int ffbnfm(char *tform, int *datacode, long *repeat, long *width, int *status);
507 int ffgabc(int tfields, char **tform, int space, long *rowlen, long *tbcol,
508  int *status);
509 
510 /*----------------- write single keywords --------------*/
511 int ffpky(fitsfile *fptr, int datatype, char *keyname, void *value,
512  char *comm, int *status);
513 int ffprec(fitsfile *fptr, const char *card, int *status);
514 int ffpcom(fitsfile *fptr, const char *comm, int *status);
515 int ffpunt(fitsfile *fptr, char *keyname, char *unit, int *status);
516 int ffphis(fitsfile *fptr, const char *history, int *status);
517 int ffpdat(fitsfile *fptr, int *status);
518 int ffgstm(char *timestr, int *timeref, int *status);
519 int ffgsdt(int *day, int *month, int *year, int *status);
520 int ffdt2s(int year, int month, int day, char *datestr, int *status);
521 int fftm2s(int year, int month, int day, int hour, int minute, double second,
522  int decimals, char *datestr, int *status);
523 int ffs2dt(char *datestr, int *year, int *month, int *day, int *status);
524 int ffs2tm(char *datestr, int *year, int *month, int *day, int *hour,
525  int *minute, double *second, int *status);
526 int ffpkyu(fitsfile *fptr, char *keyname, char *comm, int *status);
527 int ffpkys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
528 int ffpkls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
529 int ffplsw(fitsfile *fptr, int *status);
530 int ffpkyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
531 int ffpkyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
532 int ffpkyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
533  int *status);
534 int ffpkye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
535  int *status);
536 int ffpkyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
537  int *status);
538 int ffpkyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
539  int *status);
540 int ffpkyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
541  int *status);
542 int ffpkym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
543  int *status);
544 int ffpkfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
545  int *status);
546 int ffpkfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
547  int *status);
548 int ffpkyt(fitsfile *fptr, char *keyname, long intval, double frac, char *comm,
549  int *status);
550 int ffptdm( fitsfile *fptr, int colnum, int naxis, long naxes[], int *status);
551 
552 /*----------------- write array of keywords --------------*/
553 int ffpkns(fitsfile *fptr, char *keyroot, int nstart, int nkey, char *value[],
554  char *comm[], int *status);
555 int ffpknl(fitsfile *fptr, char *keyroot, int nstart, int nkey, int *value,
556  char *comm[], int *status);
557 int ffpknj(fitsfile *fptr, char *keyroot, int nstart, int nkey, long *value,
558  char *comm[], int *status);
559 int ffpknf(fitsfile *fptr, char *keyroot, int nstart, int nkey, float *value,
560  int decim, char *comm[], int *status);
561 int ffpkne(fitsfile *fptr, char *keyroot, int nstart, int nkey, float *value,
562  int decim, char *comm[], int *status);
563 int ffpkng(fitsfile *fptr, char *keyroot, int nstart, int nkey, double *value,
564  int decim, char *comm[], int *status);
565 int ffpknd(fitsfile *fptr, char *keyroot, int nstart, int nkey, double *value,
566  int decim, char *comm[], int *status);
567 int ffcpky(fitsfile *infptr,fitsfile *outfptr,int incol,int outcol,
568  char *rootname, int *status);
569 
570 /*----------------- write required header keywords --------------*/
571 int ffphps( fitsfile *fptr, int bitpix, int naxis, long naxes[], int *status);
572 int ffphpr( fitsfile *fptr, int simple, int bitpix, int naxis, long naxes[],
573  long pcount, long gcount, int extend, int *status);
574 int ffphtb(fitsfile *fptr, long naxis1, long naxis2, int tfields, char **ttype,
575  long *tbcol, char **tform, char **tunit, char *extname, int *status);
576 int ffphbn(fitsfile *fptr, long naxis2, int tfields, char **ttype,
577  char **tform, char **tunit, char *extname, long pcount, int *status);
578 
579 /*----------------- write template keywords --------------*/
580 int ffpktp(fitsfile *fptr, const char *filename, int *status);
581 
582 /*------------------ get header information --------------*/
583 int ffghsp(fitsfile *fptr, int *nexist, int *nmore, int *status);
584 int ffghps(fitsfile *fptr, int *nexist, int *position, int *status);
585 
586 /*------------------ move position in header -------------*/
587 int ffmaky(fitsfile *fptr, int nrec, int *status);
588 int ffmrky(fitsfile *fptr, int nrec, int *status);
589 
590 /*------------------ read single keywords -----------------*/
591 int ffgnxk(fitsfile *fptr, char **inclist, int ninc, char **exclist,
592  int nexc, char *card, int *status);
593 int ffgrec(fitsfile *fptr, int nrec, char *card, int *status);
594 int ffgcrd(fitsfile *fptr, char *keyname, char *card, int *status);
595 int ffgunt(fitsfile *fptr, char *keyname, char *unit, int *status);
596 int ffgkyn(fitsfile *fptr, int nkey, char *keyname, char *keyval, char *comm,
597  int *status);
598 int ffgkey(fitsfile *fptr, char *keyname, char *keyval, char *comm,
599  int *status);
600 
601 int ffgky( fitsfile *fptr, int datatype, char *keyname, void *value,
602  char *comm, int *status);
603 int ffgkys(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
604 int ffgkls(fitsfile *fptr, char *keyname, char **value, char *comm, int *status)
605 ;
606 int ffgkyl(fitsfile *fptr, char *keyname, int *value, char *comm, int *status);
607 int ffgkyj(fitsfile *fptr, char *keyname, long *value, char *comm, int *status);
608 int ffgkye(fitsfile *fptr, char *keyname, float *value, char *comm,int *status);
609 int ffgkyd(fitsfile *fptr, char *keyname, double *value,char *comm,int *status);
610 int ffgkyc(fitsfile *fptr, char *keyname, float *value, char *comm,int *status);
611 int ffgkym(fitsfile *fptr, char *keyname, double *value,char *comm,int *status);
612 int ffgkyt(fitsfile *fptr, char *keyname, long *ivalue, double *dvalue,
613  char *comm, int *status);
614 int ffgtdm(fitsfile *fptr, int colnum, int maxdim, int *naxis, long naxes[],
615  int *status);
616 int ffdtdm(fitsfile *fptr, char *tdimstr, int colnum, int maxdim,
617  int *naxis, long naxes[], int *status);
618 
619 /*------------------ read array of keywords -----------------*/
620 int ffgkns(fitsfile *fptr, char *keyname, int nstart, int nmax, char *value[],
621  int *nfound, int *status);
622 int ffgknl(fitsfile *fptr, char *keyname, int nstart, int nmax, int *value,
623  int *nfound, int *status);
624 int ffgknj(fitsfile *fptr, char *keyname, int nstart, int nmax, long *value,
625  int *nfound, int *status);
626 int ffgkne(fitsfile *fptr, char *keyname, int nstart, int nmax, float *value,
627  int *nfound, int *status);
628 int ffgknd(fitsfile *fptr, char *keyname, int nstart, int nmax, double *value,
629  int *nfound, int *status);
630 int ffh2st(fitsfile *fptr, char **header, int *status);
631 
632 /*----------------- read required header keywords --------------*/
633 int ffghpr(fitsfile *fptr, int maxdim, int *simple, int *bitpix, int *naxis,
634  long naxes[], long *pcount, long *gcount, int *extend, int *status);
635 
636 int ffghtb(fitsfile *fptr,int maxfield, long *naxis1, long *naxis2,
637  int *tfields, char **ttype, long *tbcol, char **tform, char **tunit,
638  char *extname, int *status);
639 
640 int ffghbn(fitsfile *fptr, int maxfield, long *naxis2, int *tfields,
641  char **ttype, char **tform, char **tunit, char *extname,
642  long *pcount, int *status);
643 
644 /*--------------------- update keywords ---------------*/
645 int ffuky(fitsfile *fptr, int datatype, char *keyname, void *value,
646  char *comm, int *status);
647 int ffucrd(fitsfile *fptr, char *keyname, char *card, int *status);
648 int ffukyu(fitsfile *fptr, char *keyname, char *comm, int *status);
649 int ffukys(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
650 int ffukls(fitsfile *fptr, char *keyname, char *value, char *comm, int *status);
651 int ffukyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
652 int ffukyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
653 int ffukyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
654  int *status);
655 int ffukye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
656  int *status);
657 int ffukyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
658  int *status);
659 int ffukyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
660  int *status);
661 int ffukyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
662  int *status);
663 int ffukym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
664  int *status);
665 int ffukfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
666  int *status);
667 int ffukfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
668  int *status);
669 
670 /*--------------------- modify keywords ---------------*/
671 int ffmrec(fitsfile *fptr, int nkey, char *card, int *status);
672 int ffmcrd(fitsfile *fptr, char *keyname, char *card, int *status);
673 int ffmnam(fitsfile *fptr, char *oldname, char *newname, int *status);
674 int ffmcom(fitsfile *fptr, char *keyname, char *comm, int *status);
675 int ffmkyu(fitsfile *fptr, char *keyname, char *comm, int *status);
676 int ffmkys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
677 int ffmkls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
678 int ffmkyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
679 int ffmkyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
680 int ffmkyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
681  int *status);
682 int ffmkye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
683  int *status);
684 int ffmkyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
685  int *status);
686 int ffmkyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
687  int *status);
688 int ffmkyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
689  int *status);
690 int ffmkym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
691  int *status);
692 int ffmkfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
693  int *status);
694 int ffmkfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
695  int *status);
696 
697 /*--------------------- insert keywords ---------------*/
698 int ffirec(fitsfile *fptr, int nkey, char *card, int *status);
699 int ffikyu(fitsfile *fptr, char *keyname, char *comm, int *status);
700 int ffikys(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
701 int ffikls(fitsfile *fptr, char *keyname, char *value, char *comm,int *status);
702 int ffikyl(fitsfile *fptr, char *keyname, int value, char *comm, int *status);
703 int ffikyj(fitsfile *fptr, char *keyname, long value, char *comm, int *status);
704 int ffikyf(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
705  int *status);
706 int ffikye(fitsfile *fptr, char *keyname, float value, int decim, char *comm,
707  int *status);
708 int ffikyg(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
709  int *status);
710 int ffikyd(fitsfile *fptr, char *keyname, double value, int decim, char *comm,
711  int *status);
712 int ffikyc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
713  int *status);
714 int ffikym(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
715  int *status);
716 int ffikfc(fitsfile *fptr, char *keyname, float *value, int decim, char *comm,
717  int *status);
718 int ffikfm(fitsfile *fptr, char *keyname, double *value, int decim, char *comm,
719  int *status);
720 
721 /*--------------------- delete keywords ---------------*/
722 int ffdkey(fitsfile *fptr, char *keyname, int *status);
723 int ffdrec(fitsfile *fptr, int keypos, int *status);
724 
725 /*--------------------- get HDU information -------------*/
726 int ffghdn(fitsfile *fptr, int *chdunum);
727 int ffghdt(fitsfile *fptr, int *exttype, int *status);
728 int ffghad(fitsfile *fptr, long *headstart, long *datastart, long *dataend,
729  int *status);
730 int ffghof(fitsfile *fptr, OFF_T *headstart, OFF_T *datastart, OFF_T *dataend,
731  int *status);
732 int ffgipr(fitsfile *fptr, int maxaxis, int *imgtype, int *naxis,
733  long *naxes, int *status);
734 int ffgidt(fitsfile *fptr, int *imgtype, int *status);
735 int ffgidm(fitsfile *fptr, int *naxis, int *status);
736 int ffgisz(fitsfile *fptr, int nlen, long *naxes, int *status);
737 
738 /*--------------------- HDU operations -------------*/
739 int ffmahd(fitsfile *fptr, int hdunum, int *exttype, int *status);
740 int ffmrhd(fitsfile *fptr, int hdumov, int *exttype, int *status);
741 int ffmnhd(fitsfile *fptr, int exttype, char *hduname, int hduvers,
742  int *status);
743 int ffthdu(fitsfile *fptr, int *nhdu, int *status);
744 int ffcrhd(fitsfile *fptr, int *status);
745 int ffcrim(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
746 int ffcrtb(fitsfile *fptr, int tbltype, long naxis2, int tfields, char **ttype,
747  char **tform, char **tunit, char *extname, int *status);
748 int ffiimg(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
749 int ffitab(fitsfile *fptr, long naxis1, long naxis2, int tfields, char **ttype,
750  long *tbcol, char **tform, char **tunit, char *extname, int *status);
751 int ffibin(fitsfile *fptr,long naxis2, int tfields, char **ttype, char **tform,
752  char **tunit, char *extname, long pcount, int *status);
753 int ffrsim(fitsfile *fptr, int bitpix, int naxis, long *naxes, int *status);
754 int ffdhdu(fitsfile *fptr, int *hdutype, int *status);
755 int ffcopy(fitsfile *infptr, fitsfile *outfptr, int morekeys, int *status);
756 int ffcphd(fitsfile *infptr, fitsfile *outfptr, int *status);
757 int ffcpdt(fitsfile *infptr, fitsfile *outfptr, int *status);
758 int ffchfl(fitsfile *fptr, int *status);
759 int ffcdfl(fitsfile *fptr, int *status);
760 
761 int ffrdef(fitsfile *fptr, int *status);
762 int ffhdef(fitsfile *fptr, int morekeys, int *status);
763 int ffpthp(fitsfile *fptr, long theap, int *status);
764 
765 int ffcsum(fitsfile *fptr, long nrec, unsigned long *sum, int *status);
766 void ffesum(unsigned long sum, int complm, char *ascii);
767 unsigned long ffdsum(char *ascii, int complm, unsigned long *sum);
768 int ffpcks(fitsfile *fptr, int *status);
769 int ffupck(fitsfile *fptr, int *status);
770 int ffvcks(fitsfile *fptr, int *datastatus, int *hdustatus, int *status);
771 int ffgcks(fitsfile *fptr, unsigned long *datasum, unsigned long *hdusum,
772  int *status);
773 
774 /*--------------------- define scaling or null values -------------*/
775 int ffpscl(fitsfile *fptr, double scale, double zero, int *status);
776 int ffpnul(fitsfile *fptr, long nulvalue, int *status);
777 int fftscl(fitsfile *fptr, int colnum, double scale, double zero, int *status);
778 int fftnul(fitsfile *fptr, int colnum, long nulvalue, int *status);
779 int ffsnul(fitsfile *fptr, int colnum, char *nulstring, int *status);
780 
781 /*--------------------- get column information -------------*/
782 int ffgcno(fitsfile *fptr, int casesen, char *templt, int *colnum,
783  int *status);
784 int ffgcnn(fitsfile *fptr, int casesen, char *templt, char *colname,
785  int *colnum, int *status);
786 
787 int ffgtcl(fitsfile *fptr, int colnum, int *typecode, long *repeat,
788  long *width, int *status);
789 int ffgncl(fitsfile *fptr, int *ncols, int *status);
790 int ffgnrw(fitsfile *fptr, long *nrows, int *status);
791 int ffgacl(fitsfile *fptr, int colnum, char *ttype, long *tbcol,
792  char *tunit, char *tform, double *tscal, double *tzero,
793  char *tnull, char *tdisp, int *status);
794 int ffgbcl(fitsfile *fptr, int colnum, char *ttype, char *tunit,
795  char *dtype, long *repeat, double *tscal, double *tzero,
796  long *tnull, char *tdisp, int *status);
797 int ffgrsz(fitsfile *fptr, long *nrows, int *status);
798 int ffgcdw(fitsfile *fptr, int colnum, int *width, int *status);
799 
800 /*--------------------- read primary array or image elements -------------*/
801 int ffgpxv(fitsfile *fptr, int datatype, long *firstpix, long nelem,
802  void *nulval, void *array, int *anynul, int *status);
803 int ffgpxf(fitsfile *fptr, int datatype, long *firstpix, long nelem,
804  void *array, char *nullarray, int *anynul, int *status);
805 int ffgsv(fitsfile *fptr, int datatype, long *blc, long *trc, long *inc,
806  void *nulval, void *array, int *anynul, int *status);
807 int ffgpv(fitsfile *fptr, int datatype, long firstelem, long nelem,
808  void *nulval, void *array, int *anynul, int *status);
809 int ffgpf(fitsfile *fptr, int datatype, long firstelem, long nelem,
810  void *array, char *nullarray, int *anynul, int *status);
811 int ffgpvb(fitsfile *fptr, long group, long firstelem, long nelem, unsigned
812  char nulval, unsigned char *array, int *anynul, int *status);
813 int ffgpvui(fitsfile *fptr, long group, long firstelem, long nelem,
814  unsigned short nulval, unsigned short *array, int *anynul,
815  int *status);
816 int ffgpvi(fitsfile *fptr, long group, long firstelem, long nelem,
817  short nulval, short *array, int *anynul, int *status);
818 int ffgpvuj(fitsfile *fptr, long group, long firstelem, long nelem,
819  unsigned long nulval, unsigned long *array, int *anynul,
820  int *status);
821 int ffgpvj(fitsfile *fptr, long group, long firstelem, long nelem,
822  long nulval, long *array, int *anynul, int *status);
823 int ffgpvuk(fitsfile *fptr, long group, long firstelem, long nelem,
824  unsigned int nulval, unsigned int *array, int *anynul, int *status);
825 int ffgpvk(fitsfile *fptr, long group, long firstelem, long nelem,
826  int nulval, int *array, int *anynul, int *status);
827 int ffgpve(fitsfile *fptr, long group, long firstelem, long nelem,
828  float nulval, float *array, int *anynul, int *status);
829 int ffgpvd(fitsfile *fptr, long group, long firstelem, long nelem,
830  double nulval, double *array, int *anynul, int *status);
831 
832 int ffgpfb(fitsfile *fptr, long group, long firstelem, long nelem,
833  unsigned char *array, char *nularray, int *anynul, int *status);
834 int ffgpfui(fitsfile *fptr, long group, long firstelem, long nelem,
835  unsigned short *array, char *nularray, int *anynul, int *status);
836 int ffgpfi(fitsfile *fptr, long group, long firstelem, long nelem,
837  short *array, char *nularray, int *anynul, int *status);
838 int ffgpfuj(fitsfile *fptr, long group, long firstelem, long nelem,
839  unsigned long *array, char *nularray, int *anynul, int *status);
840 int ffgpfj(fitsfile *fptr, long group, long firstelem, long nelem,
841  long *array, char *nularray, int *anynul, int *status);
842 int ffgpfuk(fitsfile *fptr, long group, long firstelem, long nelem,
843  unsigned int *array, char *nularray, int *anynul, int *status);
844 int ffgpfk(fitsfile *fptr, long group, long firstelem, long nelem,
845  int *array, char *nularray, int *anynul, int *status);
846 int ffgpfe(fitsfile *fptr, long group, long firstelem, long nelem,
847  float *array, char *nularray, int *anynul, int *status);
848 int ffgpfd(fitsfile *fptr, long group, long firstelem, long nelem,
849  double *array, char *nularray, int *anynul, int *status);
850 
851 int ffg2db(fitsfile *fptr, long group, unsigned char nulval, long ncols,
852  long naxis1, long naxis2, unsigned char *array,
853  int *anynul, int *status);
854 int ffg2dui(fitsfile *fptr, long group, unsigned short nulval, long ncols,
855  long naxis1, long naxis2, unsigned short *array,
856  int *anynul, int *status);
857 int ffg2di(fitsfile *fptr, long group, short nulval, long ncols,
858  long naxis1, long naxis2, short *array,
859  int *anynul, int *status);
860 int ffg2duj(fitsfile *fptr, long group, unsigned long nulval, long ncols,
861  long naxis1, long naxis2, unsigned long *array,
862  int *anynul, int *status);
863 int ffg2dj(fitsfile *fptr, long group, long nulval, long ncols,
864  long naxis1, long naxis2, long *array,
865  int *anynul, int *status);
866 int ffg2duk(fitsfile *fptr, long group, unsigned int nulval, long ncols,
867  long naxis1, long naxis2, unsigned int *array,
868  int *anynul, int *status);
869 int ffg2dk(fitsfile *fptr, long group, int nulval, long ncols,
870  long naxis1, long naxis2, int *array,
871  int *anynul, int *status);
872 int ffg2de(fitsfile *fptr, long group, float nulval, long ncols,
873  long naxis1, long naxis2, float *array,
874  int *anynul, int *status);
875 int ffg2dd(fitsfile *fptr, long group, double nulval, long ncols,
876  long naxis1, long naxis2, double *array,
877  int *anynul, int *status);
878 
879 int ffg3db(fitsfile *fptr, long group, unsigned char nulval, long ncols,
880  long nrows, long naxis1, long naxis2, long naxis3,
881  unsigned char *array, int *anynul, int *status);
882 int ffg3dui(fitsfile *fptr, long group, unsigned short nulval, long ncols,
883  long nrows, long naxis1, long naxis2, long naxis3,
884  unsigned short *array, int *anynul, int *status);
885 int ffg3di(fitsfile *fptr, long group, short nulval, long ncols,
886  long nrows, long naxis1, long naxis2, long naxis3,
887  short *array, int *anynul, int *status);
888 int ffg3duj(fitsfile *fptr, long group, unsigned long nulval, long ncols,
889  long nrows, long naxis1, long naxis2, long naxis3,
890  unsigned long *array, int *anynul, int *status);
891 int ffg3dj(fitsfile *fptr, long group, long nulval, long ncols,
892  long nrows, long naxis1, long naxis2, long naxis3,
893  long *array, int *anynul, int *status);
894 int ffg3duk(fitsfile *fptr, long group, unsigned int nulval, long ncols,
895  long nrows, long naxis1, long naxis2, long naxis3,
896  unsigned int *array, int *anynul, int *status);
897 int ffg3dk(fitsfile *fptr, long group, int nulval, long ncols,
898  long nrows, long naxis1, long naxis2, long naxis3,
899  int *array, int *anynul, int *status);
900 int ffg3de(fitsfile *fptr, long group, float nulval, long ncols,
901  long nrows, long naxis1, long naxis2, long naxis3,
902  float *array, int *anynul, int *status);
903 int ffg3dd(fitsfile *fptr, long group, double nulval, long ncols,
904  long nrows, long naxis1, long naxis2, long naxis3,
905  double *array, int *anynul, int *status);
906 
907 int ffgsvb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
908  long *trc, long *inc, unsigned char nulval, unsigned char *array,
909  int *anynul, int *status);
910 int ffgsvui(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
911  long *trc, long *inc, unsigned short nulval, unsigned short *array,
912  int *anynul, int *status);
913 int ffgsvi(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
914  long *trc, long *inc, short nulval, short *array, int *anynul, int *status);
915 int ffgsvuj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
916  long *trc, long *inc, unsigned long nulval, unsigned long *array,
917  int *anynul, int *status);
918 int ffgsvj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
919  long *trc, long *inc, long nulval, long *array, int *anynul, int *status);
920 int ffgsvuk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
921  long *trc, long *inc, unsigned int nulval, unsigned int *array,
922  int *anynul, int *status);
923 int ffgsvk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
924  long *trc, long *inc, int nulval, int *array, int *anynul, int *status);
925 int ffgsve(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
926  long *trc, long *inc, float nulval, float *array, int *anynul, int *status);
927 int ffgsvd(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
928  long *trc, long *inc, double nulval, double *array, int *anynul,
929  int *status);
930 
931 int ffgsfb(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
932  long *trc, long *inc, unsigned char *array, char *flagval,
933  int *anynul, int *status);
934 int ffgsfui(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
935  long *trc, long *inc, unsigned short *array, char *flagval, int *anynul,
936  int *status);
937 int ffgsfi(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
938  long *trc, long *inc, short *array, char *flagval, int *anynul, int *status);
939 int ffgsfuj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
940  long *trc, long *inc, unsigned long *array, char *flagval, int *anynul,
941  int *status);
942 int ffgsfj(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
943  long *trc, long *inc, long *array, char *flagval, int *anynul, int *status);
944 int ffgsfuk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
945  long *trc, long *inc, unsigned int *array, char *flagval, int *anynul,
946  int *status);
947 int ffgsfk(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
948  long *trc, long *inc, int *array, char *flagval, int *anynul, int *status);
949 int ffgsfe(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
950  long *trc, long *inc, float *array, char *flagval, int *anynul, int *status);
951 int ffgsfd(fitsfile *fptr, int colnum, int naxis, long *naxes, long *blc,
952  long *trc, long *inc, double *array, char *flagval, int *anynul,
953  int *status);
954 
955 int ffggpb(fitsfile *fptr, long group, long firstelem, long nelem,
956  unsigned char *array, int *status);
957 int ffggpui(fitsfile *fptr, long group, long firstelem, long nelem,
958  unsigned short *array, int *status);
959 int ffggpi(fitsfile *fptr, long group, long firstelem, long nelem,
960  short *array, int *status);
961 int ffggpuj(fitsfile *fptr, long group, long firstelem, long nelem,
962  unsigned long *array, int *status);
963 int ffggpj(fitsfile *fptr, long group, long firstelem, long nelem,
964  long *array, int *status);
965 int ffggpuk(fitsfile *fptr, long group, long firstelem, long nelem,
966  unsigned int *array, int *status);
967 int ffggpk(fitsfile *fptr, long group, long firstelem, long nelem,
968  int *array, int *status);
969 int ffggpe(fitsfile *fptr, long group, long firstelem, long nelem,
970  float *array, int *status);
971 int ffggpd(fitsfile *fptr, long group, long firstelem, long nelem,
972  double *array, int *status);
973 
974 /*--------------------- read column elements -------------*/
975 int ffgcv( fitsfile *fptr, int datatype, int colnum, long firstrow,
976  long firstelem, long nelem, void *nulval, void *array, int *anynul,
977  int *status);
978 int ffgcf( fitsfile *fptr, int datatype, int colnum, long firstrow,
979  long firstelem, long nelem, void *array, char *nullarray,
980  int *anynul, int *status);
981 int ffgcvs(fitsfile *fptr, int colnum, long firstrow, long firstelem,
982  long nelem, char *nulval, char **array, int *anynul, int *status);
983 int ffgcl (fitsfile *fptr, int colnum, long firstrow, long firstelem,
984  long nelem, char *array, int *status);
985 int ffgcvl (fitsfile *fptr, int colnum, long firstrow, long firstelem,
986  long nelem, char nulval, char *array, int *anynul, int *status);
987 int ffgcvb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
988  long nelem, unsigned char nulval, unsigned char *array,
989  int *anynul, int *status);
990 int ffgcvui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
991  long nelem, unsigned short nulval, unsigned short *array,
992  int *anynul, int *status);
993 int ffgcvi(fitsfile *fptr, int colnum, long firstrow, long firstelem,
994  long nelem, short nulval, short *array, int *anynul, int *status);
995 int ffgcvuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
996  long nelem, unsigned long nulval, unsigned long *array, int *anynul,
997  int *status);
998 int ffgcvj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
999  long nelem, long nulval, long *array, int *anynul, int *status);
1000 int ffgcvuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1001  long nelem, unsigned int nulval, unsigned int *array, int *anynul,
1002  int *status);
1003 int ffgcvk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1004  long nelem, int nulval, int *array, int *anynul, int *status);
1005 int ffgcve(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1006  long nelem, float nulval, float *array, int *anynul, int *status);
1007 int ffgcvd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1008  long nelem, double nulval, double *array, int *anynul, int *status);
1009 int ffgcvc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1010  long nelem, float nulval, float *array, int *anynul, int *status);
1011 int ffgcvm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1012  long nelem, double nulval, double *array, int *anynul, int *status);
1013 int ffgcx(fitsfile *fptr, int colnum, long firstrow, long firstbit,
1014  long nbits, char *larray, int *status);
1015 int ffgcxui(fitsfile *fptr, int colnum, long firstrow, long nrows,
1016  long firstbit, int nbits, unsigned short *array, int *status);
1017 int ffgcxuk(fitsfile *fptr, int colnum, long firstrow, long nrows,
1018  long firstbit, int nbits, unsigned int *array, int *status);
1019 
1020 int ffgcfs(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
1021  nelem, char **array, char *nularray, int *anynul, int *status);
1022 int ffgcfl(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
1023  nelem, char *array, char *nularray, int *anynul, int *status);
1024 int ffgcfb(fitsfile *fptr, int colnum, long firstrow, long firstelem, long
1025  nelem, unsigned char *array, char *nularray, int *anynul, int *status);
1026 int ffgcfui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1027  long nelem, unsigned short *array, char *nularray, int *anynul,
1028  int *status);
1029 int ffgcfi(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1030  long nelem, short *array, char *nularray, int *anynul, int *status);
1031 int ffgcfuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1032  long nelem, unsigned long *array, char *nularray, int *anynul,
1033  int *status);
1034 int ffgcfj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1035  long nelem, long *array, char *nularray, int *anynul, int *status);
1036 int ffgcfuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1037  long nelem, unsigned int *array, char *nularray, int *anynul,
1038  int *status);
1039 int ffgcfk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1040  long nelem, int *array, char *nularray, int *anynul, int *status);
1041 int ffgcfe(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1042  long nelem, float *array, char *nularray, int *anynul, int *status);
1043 int ffgcfd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1044  long nelem, double *array, char *nularray, int *anynul, int *status);
1045 int ffgcfc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1046  long nelem, float *array, char *nularray, int *anynul, int *status);
1047 int ffgcfm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1048  long nelem, double *array, char *nularray, int *anynul, int *status);
1049 
1050 int ffgdes(fitsfile *fptr, int colnum, long rownum, long *length,
1051  long *heapaddr, int *status);
1052 
1053 int ffgdess(fitsfile *fptr, int colnum, long firstrow, long nrows, long *length,
1054  long *heapaddr, int *status);
1055 
1056 int ffgtbb(fitsfile *fptr, long firstrow, long firstchar, long nchars,
1057  unsigned char *values, int *status);
1058 
1059 /*------------ write primary array or image elements -------------*/
1060 int ffppx(fitsfile *fptr, int datatype, long *firstpix, long nelem,
1061  void *array, int *status);
1062 int ffppxn(fitsfile *fptr, int datatype, long *firstpix, long nelem,
1063  void *array, void *nulval, int *status);
1064 int ffppr(fitsfile *fptr, int datatype, long firstelem, long nelem,
1065  void *array, int *status);
1066 int ffpprb(fitsfile *fptr, long group, long firstelem,
1067  long nelem, unsigned char *array, int *status);
1068 int ffpprui(fitsfile *fptr, long group, long firstelem,
1069  long nelem, unsigned short *array, int *status);
1070 int ffppri(fitsfile *fptr, long group, long firstelem,
1071  long nelem, short *array, int *status);
1072 int ffppruj(fitsfile *fptr, long group, long firstelem,
1073  long nelem, unsigned long *array, int *status);
1074 int ffpprj(fitsfile *fptr, long group, long firstelem,
1075  long nelem, long *array, int *status);
1076 int ffppruk(fitsfile *fptr, long group, long firstelem,
1077  long nelem, unsigned int *array, int *status);
1078 int ffpprk(fitsfile *fptr, long group, long firstelem,
1079  long nelem, int *array, int *status);
1080 int ffppre(fitsfile *fptr, long group, long firstelem,
1081  long nelem, float *array, int *status);
1082 int ffpprd(fitsfile *fptr, long group, long firstelem,
1083  long nelem, double *array, int *status);
1084 
1085 int ffppru(fitsfile *fptr, long group, long firstelem, long nelem,
1086  int *status);
1087 int ffpprn(fitsfile *fptr, long firstelem, long nelem, int *status);
1088 
1089 int ffppn(fitsfile *fptr, int datatype, long firstelem, long nelem,
1090  void *array, void *nulval, int *status);
1091 int ffppnb(fitsfile *fptr, long group, long firstelem, long nelem,
1092  unsigned char *array, unsigned char nulval, int *status);
1093 int ffppnui(fitsfile *fptr, long group, long firstelem,
1094  long nelem, unsigned short *array, unsigned short nulval,
1095  int *status);
1096 int ffppni(fitsfile *fptr, long group, long firstelem,
1097  long nelem, short *array, short nulval, int *status);
1098 int ffppnj(fitsfile *fptr, long group, long firstelem,
1099  long nelem, long *array, long nulval, int *status);
1100 int ffppnuj(fitsfile *fptr, long group, long firstelem, long nelem,
1101  unsigned long *array, unsigned long nulval, int *status);
1102 int ffppnuk(fitsfile *fptr, long group, long firstelem, long nelem,
1103  unsigned int *array, unsigned int nulval, int *status);
1104 int ffppnk(fitsfile *fptr, long group, long firstelem,
1105  long nelem, int *array, int nulval, int *status);
1106 int ffppne(fitsfile *fptr, long group, long firstelem,
1107  long nelem, float *array, float nulval, int *status);
1108 int ffppnd(fitsfile *fptr, long group, long firstelem,
1109  long nelem, double *array, double nulval, int *status);
1110 
1111 int ffp2db(fitsfile *fptr, long group, long ncols, long naxis1,
1112  long naxis2, unsigned char *array, int *status);
1113 int ffp2dui(fitsfile *fptr, long group, long ncols, long naxis1,
1114  long naxis2, unsigned short *array, int *status);
1115 int ffp2di(fitsfile *fptr, long group, long ncols, long naxis1,
1116  long naxis2, short *array, int *status);
1117 int ffp2duj(fitsfile *fptr, long group, long ncols, long naxis1,
1118  long naxis2, unsigned long *array, int *status);
1119 int ffp2dj(fitsfile *fptr, long group, long ncols, long naxis1,
1120  long naxis2, long *array, int *status);
1121 int ffp2duk(fitsfile *fptr, long group, long ncols, long naxis1,
1122  long naxis2, unsigned int *array, int *status);
1123 int ffp2dk(fitsfile *fptr, long group, long ncols, long naxis1,
1124  long naxis2, int *array, int *status);
1125 int ffp2de(fitsfile *fptr, long group, long ncols, long naxis1,
1126  long naxis2, float *array, int *status);
1127 int ffp2dd(fitsfile *fptr, long group, long ncols, long naxis1,
1128  long naxis2, double *array, int *status);
1129 
1130 int ffp3db(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
1131  long naxis2, long naxis3, unsigned char *array, int *status);
1132 int ffp3dui(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
1133  long naxis2, long naxis3, unsigned short *array, int *status);
1134 int ffp3di(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
1135  long naxis2, long naxis3, short *array, int *status);
1136 int ffp3duj(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
1137  long naxis2, long naxis3, unsigned long *array, int *status);
1138 int ffp3dj(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
1139  long naxis2, long naxis3, long *array, int *status);
1140 int ffp3duk(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
1141  long naxis2, long naxis3, unsigned int *array, int *status);
1142 int ffp3dk(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
1143  long naxis2, long naxis3, int *array, int *status);
1144 int ffp3de(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
1145  long naxis2, long naxis3, float *array, int *status);
1146 int ffp3dd(fitsfile *fptr, long group, long ncols, long nrows, long naxis1,
1147  long naxis2, long naxis3, double *array, int *status);
1148 
1149 int ffpssb(fitsfile *fptr, long group, long naxis, long *naxes,
1150  long *fpixel, long *lpixel, unsigned char *array, int *status);
1151 int ffpssui(fitsfile *fptr, long group, long naxis, long *naxes,
1152  long *fpixel, long *lpixel, unsigned short *array, int *status);
1153 int ffpssi(fitsfile *fptr, long group, long naxis, long *naxes,
1154  long *fpixel, long *lpixel, short *array, int *status);
1155 int ffpssuj(fitsfile *fptr, long group, long naxis, long *naxes,
1156  long *fpixel, long *lpixel, unsigned long *array, int *status);
1157 int ffpssj(fitsfile *fptr, long group, long naxis, long *naxes,
1158  long *fpixel, long *lpixel, long *array, int *status);
1159 int ffpssuk(fitsfile *fptr, long group, long naxis, long *naxes,
1160  long *fpixel, long *lpixel, unsigned int *array, int *status);
1161 int ffpssk(fitsfile *fptr, long group, long naxis, long *naxes,
1162  long *fpixel, long *lpixel, int *array, int *status);
1163 int ffpsse(fitsfile *fptr, long group, long naxis, long *naxes,
1164  long *fpixel, long *lpixel, float *array, int *status);
1165 int ffpssd(fitsfile *fptr, long group, long naxis, long *naxes,
1166  long *fpixel, long *lpixel, double *array, int *status);
1167 
1168 int ffpgpb(fitsfile *fptr, long group, long firstelem,
1169  long nelem, unsigned char *array, int *status);
1170 int ffpgpui(fitsfile *fptr, long group, long firstelem,
1171  long nelem, unsigned short *array, int *status);
1172 int ffpgpi(fitsfile *fptr, long group, long firstelem,
1173  long nelem, short *array, int *status);
1174 int ffpgpuj(fitsfile *fptr, long group, long firstelem,
1175  long nelem, unsigned long *array, int *status);
1176 int ffpgpj(fitsfile *fptr, long group, long firstelem,
1177  long nelem, long *array, int *status);
1178 int ffpgpuk(fitsfile *fptr, long group, long firstelem,
1179  long nelem, unsigned int *array, int *status);
1180 int ffpgpk(fitsfile *fptr, long group, long firstelem,
1181  long nelem, int *array, int *status);
1182 int ffpgpe(fitsfile *fptr, long group, long firstelem,
1183  long nelem, float *array, int *status);
1184 int ffpgpd(fitsfile *fptr, long group, long firstelem,
1185  long nelem, double *array, int *status);
1186 
1187 /*--------------------- iterator functions -------------*/
1188 int fits_iter_set_by_name(iteratorCol *col, fitsfile *fptr, char *colname,
1189  int datatype, int iotype);
1190 int fits_iter_set_by_num(iteratorCol *col, fitsfile *fptr, int colnum,
1191  int datatype, int iotype);
1192 int fits_iter_set_file(iteratorCol *col, fitsfile *fptr);
1193 int fits_iter_set_colname(iteratorCol *col, char *colname);
1194 int fits_iter_set_colnum(iteratorCol *col, int colnum);
1195 int fits_iter_set_datatype(iteratorCol *col, int datatype);
1196 int fits_iter_set_iotype(iteratorCol *col, int iotype);
1197 
1198 fitsfile * fits_iter_get_file(iteratorCol *col);
1199 char * fits_iter_get_colname(iteratorCol *col);
1200 int fits_iter_get_colnum(iteratorCol *col);
1201 int fits_iter_get_datatype(iteratorCol *col);
1202 int fits_iter_get_iotype(iteratorCol *col);
1203 void * fits_iter_get_array(iteratorCol *col);
1204 long fits_iter_get_tlmin(iteratorCol *col);
1205 long fits_iter_get_tlmax(iteratorCol *col);
1206 long fits_iter_get_repeat(iteratorCol *col);
1207 char * fits_iter_get_tunit(iteratorCol *col);
1208 char * fits_iter_get_tdisp(iteratorCol *col);
1209 
1210 int ffiter(int ncols, iteratorCol *data, long offset, long nPerLoop,
1211  int (*workFn)( long totaln, long offset, long firstn,
1212  long nvalues, int narrays, iteratorCol *data, void *userPointer),
1213  void *userPointer, int *status);
1214 
1215 /*--------------------- write column elements -------------*/
1216 int ffpcl(fitsfile *fptr, int datatype, int colnum, long firstrow,
1217  long firstelem, long nelem, void *array, int *status);
1218 int ffpcls(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1219  long nelem, char **array, int *status);
1220 int ffpcll(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1221  long nelem, char *array, int *status);
1222 int ffpclb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1223  long nelem, unsigned char *array, int *status);
1224 int ffpclui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1225  long nelem, unsigned short *array, int *status);
1226 int ffpcli(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1227  long nelem, short *array, int *status);
1228 int ffpcluj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1229  long nelem, unsigned long *array, int *status);
1230 int ffpclj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1231  long nelem, long *array, int *status);
1232 int ffpcluk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1233  long nelem, unsigned int *array, int *status);
1234 int ffpclk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1235  long nelem, int *array, int *status);
1236 int ffpcle(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1237  long nelem, float *array, int *status);
1238 int ffpcld(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1239  long nelem, double *array, int *status);
1240 int ffpclc(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1241  long nelem, float *array, int *status);
1242 int ffpclm(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1243  long nelem, double *array, int *status);
1244 int ffpclu(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1245  long nelem, int *status);
1246 int ffpclx(fitsfile *fptr, int colnum, long frow, long fbit, long nbit,
1247  char *larray, int *status);
1248 
1249 int ffpcn(fitsfile *fptr, int datatype, int colnum, long firstrow,
1250  long firstelem, long nelem, void *array, void *nulval, int *status);
1251 int ffpcns( fitsfile *fptr, int colnum, long firstrow, long firstelem,
1252  long nelem, char **array, char *nulvalue, int *status);
1253 int ffpcnl( fitsfile *fptr, int colnum, long firstrow, long firstelem,
1254  long nelem, char *array, char nulvalue, int *status);
1255 int ffpcnb(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1256  long nelem, unsigned char *array, unsigned char nulvalue,
1257  int *status);
1258 int ffpcnui(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1259  long nelem, unsigned short *array, unsigned short nulvalue,
1260  int *status);
1261 int ffpcni(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1262  long nelem, short *array, short nulvalue, int *status);
1263 int ffpcnuj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1264  long nelem, unsigned long *array, unsigned long nulvalue,
1265  int *status);
1266 int ffpcnj(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1267  long nelem, long *array, long nulvalue, int *status);
1268 int ffpcnuk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1269  long nelem, unsigned int *array, unsigned int nulvalue,
1270  int *status);
1271 int ffpcnk(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1272  long nelem, int *array, int nulvalue, int *status);
1273 int ffpcne(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1274  long nelem, float *array, float nulvalue, int *status);
1275 int ffpcnd(fitsfile *fptr, int colnum, long firstrow, long firstelem,
1276  long nelem, double *array, double nulvalue, int *status);
1277 
1278 int ffpdes(fitsfile *fptr, int colnum, long rownum, long length,
1279  long heapaddr, int *status);
1280 
1281 int ffptbb(fitsfile *fptr, long firstrow, long firstchar, long nchars,
1282  unsigned char *values, int *status);
1283 
1284 int ffirow(fitsfile *fptr, long firstrow, long nrows, int *status);
1285 int ffdrow(fitsfile *fptr, long firstrow, long nrows, int *status);
1286 int ffdrws(fitsfile *fptr, long *rownum, long nrows, int *status);
1287 int fficol(fitsfile *fptr, int numcol, char *ttype, char *tform, int *status);
1288 int fficls(fitsfile *fptr, int firstcol, int ncols, char **ttype,
1289  char **tform, int *status);
1290 int ffmvec(fitsfile *fptr, int colnum, long newveclen, int *status);
1291 int ffdcol(fitsfile *fptr, int numcol, int *status);
1292 int ffcpcl(fitsfile *infptr, fitsfile *outfptr, int incol, int outcol,
1293  int create_col, int *status);
1294 
1295 /*--------------------- WCS Utilities ------------------*/
1296 int ffgics(fitsfile *fptr, double *xrval, double *yrval, double *xrpix,
1297  double *yrpix, double *xinc, double *yinc, double *rot,
1298  char *type, int *status);
1299 int ffgtcs(fitsfile *fptr, int xcol, int ycol, double *xrval,
1300  double *yrval, double *xrpix, double *yrpix, double *xinc,
1301  double *yinc, double *rot, char *type, int *status);
1302 int ffwldp(double xpix, double ypix, double xref, double yref,
1303  double xrefpix, double yrefpix, double xinc, double yinc,
1304  double rot, char *type, double *xpos, double *ypos, int *status);
1305 int ffxypx(double xpos, double ypos, double xref, double yref,
1306  double xrefpix, double yrefpix, double xinc, double yinc,
1307  double rot, char *type, double *xpix, double *ypix, int *status);
1308 
1309 /* WCS support routines (provide interface to Doug Mink's WCS library */
1310 int ffgiwcs(fitsfile *fptr, char **header, int *status);
1311 int ffgtwcs(fitsfile *fptr, int xcol, int ycol, char **header, int *status);
1312 
1313 /*--------------------- lexical parsing routines ------------------*/
1314 int fftexp( fitsfile *fptr, char *expr, int maxdim,
1315  int *datatype, long *nelem, int *naxis,
1316  long *naxes, int *status );
1317 
1318 int fffrow( fitsfile *infptr, char *expr,
1319  long firstrow, long nrows,
1320  long *n_good_rows, char *row_status, int *status);
1321 
1322 int ffffrw( fitsfile *fptr, char *expr, long *rownum, int *status);
1323 
1324 int fffrwc( fitsfile *fptr, char *expr, char *timeCol,
1325  char *parCol, char *valCol, long ntimes,
1326  double *times, char *time_status, int *status );
1327 
1328 int ffsrow( fitsfile *infptr, fitsfile *outfptr, char *expr,
1329  int *status);
1330 
1331 int ffcrow( fitsfile *fptr, int datatype, char *expr,
1332  long firstrow, long nelements, void *nulval,
1333  void *array, int *anynul, int *status );
1334 
1335 int ffcalc_rng( fitsfile *infptr, char *expr, fitsfile *outfptr,
1336  char *parName, char *parInfo, int nRngs,
1337  long *start, long *end, int *status );
1338 
1339 int ffcalc( fitsfile *infptr, char *expr, fitsfile *outfptr,
1340  char *parName, char *parInfo, int *status );
1341 
1342  /* ffhist is not really intended as a user-callable routine */
1343  /* but it may be useful for some specialized applications */
1344 
1345 int ffhist(fitsfile **fptr, char *outfile, int imagetype, int naxis,
1346  char colname[4][FLEN_VALUE],
1347  double *minin, double *maxin, double *binsizein,
1348  char minname[4][FLEN_VALUE], char maxname[4][FLEN_VALUE],
1349  char binname[4][FLEN_VALUE],
1350  double weightin, char wtcol[FLEN_VALUE],
1351  int recip, char *rowselect, int *status);
1352 
1353 int fits_select_image_section(fitsfile **fptr, char *outfile,
1354  char *imagesection, int *status);
1355 int fits_select_section( fitsfile *infptr, fitsfile *outfptr,
1356  char *imagesection, int *status);
1357 
1358 /*--------------------- grouping routines ------------------*/
1359 
1360 int ffgtcr(fitsfile *fptr, char *grpname, int grouptype, int *status);
1361 int ffgtis(fitsfile *fptr, char *grpname, int grouptype, int *status);
1362 int ffgtch(fitsfile *gfptr, int grouptype, int *status);
1363 int ffgtrm(fitsfile *gfptr, int rmopt, int *status);
1364 int ffgtcp(fitsfile *infptr, fitsfile *outfptr, int cpopt, int *status);
1365 int ffgtmg(fitsfile *infptr, fitsfile *outfptr, int mgopt, int *status);
1366 int ffgtcm(fitsfile *gfptr, int cmopt, int *status);
1367 int ffgtvf(fitsfile *gfptr, long *firstfailed, int *status);
1368 int ffgtop(fitsfile *mfptr,int group,fitsfile **gfptr,int *status);
1369 int ffgtam(fitsfile *gfptr, fitsfile *mfptr, int hdupos, int *status);
1370 int ffgtnm(fitsfile *gfptr, long *nmembers, int *status);
1371 int ffgmng(fitsfile *mfptr, long *nmembers, int *status);
1372 int ffgmop(fitsfile *gfptr, long member, fitsfile **mfptr, int *status);
1373 int ffgmcp(fitsfile *gfptr, fitsfile *mfptr, long member, int cpopt,
1374  int *status);
1375 int ffgmtf(fitsfile *infptr, fitsfile *outfptr, long member, int tfopt,
1376  int *status);
1377 int ffgmrm(fitsfile *fptr, long member, int rmopt, int *status);
1378 
1379 /*--------------------- group template parser routines ------------------*/
1380 
1381 int fits_execute_template(fitsfile *ff, char *ngp_template, int *status);
1382 
1383 /*--------------------- image compression routines ------------------*/
1384 
1385 int fits_comp_img(fitsfile *infptr, fitsfile *outfptr, int compress_type,
1386  long *tilesize, int parm1, int parm2, int *status);
1387 int fits_is_compressed_image(fitsfile *fptr, int *status);
1388 int fits_decomp_img (fitsfile *infptr, fitsfile *outfptr, int *status);
1389 int fits_read_compressed_img(fitsfile *fptr,
1390  int datatype, long *fpixel,long *lpixel,long *inc,
1391  int nullcheck, void *nulval, void *array, char *nullarray,
1392  int *anynul, int *status);
1393 
1394 int fits_read_compressed_pixels(fitsfile *fptr,
1395  int datatype, long fpixel, long npixels,
1396  int nullcheck, void *nulval, void *array, char *nullarray,
1397  int *anynul, int *status);
1398 
1399 int fits_quantize_float (float fdata[], int nx, float in_null_value,
1400  int noise_bits, int idata[], double *bscale, double *bzero,
1401  int *iminval, int *imaxval);
1402 int fits_quantize_double (double fdata[], int nx, double in_null_value,
1403  int noise_bits, int idata[], double *bscale, double *bzero,
1404  int *iminval, int *imaxval);
1405 int fits_rcomp(int a[], int nx, unsigned char *c, int clen,int nblock);
1406 int fits_rdecomp (unsigned char *c, int clen, unsigned int array[], int nx,
1407  int nblock);
1408 
1409 /* The following exclusion if __CINT__ is defined is needed for ROOT */
1410 #ifndef __CINT__
1411 #ifdef __cplusplus
1412 }
1413 #endif
1414 #endif
1415 
1416 #endif
1417 
Definition: fitsio.h:194
Definition: fitsio.h:178
Definition: fitsio.h:254
Definition: fitsio.h:248