HEASARC Menu Bar

next up previous contents FITSIO Home
Next: Index of Routines Up: Specialized FITS ASCII and Previous: Specialized Write Column Data

Specialized Read Column Data Routines

Two types of routines are provided to get the column data which differ in the way undefined pixels are handled. The first set of routines (ffgcv) simply return an array of data elements in which undefined pixels are set equal to a value specified by the user in the 'nullval' parameter. An additional feature of these routines is that if the user sets nullval = 0, then no checks for undefined pixels will be performed, thus increasing the speed of the program. The second set of routines (ffgcf) returns the data element array and in addition a logical array of flags which defines whether the corresponding data pixel is undefined.

1
Read elements from an ASCII or binary table column (in the CDU). These routines return the values of the table column array elements. Undefined array elements will be returned with a value = nulval, unless nulval = 0 (or = ' ' for ffgcvs) in which case no checking for undefined values will be performed. The ANYF parameter is set to true if any of the returned elements are undefined.  
  int fits_read_col_str / ffgcvs
      (fitsfile *fptr, int colnum, long firstrow, long firstelem,
       long nelements, char *nulstr, > char **array, int *anynul,
       int *status)

  int fits_read_col_[log,byt,sht,usht,int,uint,lng,ulng, flt, dbl, cmp, dblcmp] /
      ffgcv[l,b,i,ui,k,uk,j,uj,e,d,c,m]
      (fitsfile *fptr, int colnum, long firstrow, long firstelem,
       long nelements, DTYPE nulval, > DTYPE *array, int *anynul,
       int *status)
2
Read elements and null flags from an ASCII or binary table column (in the CHDU). These routines return the values of the table column array elements. Any undefined array elements will have the corresponding nularray element set equal to TRUE. The anynul parameter is set to true if any of the returned elements are undefined.  
  int fits_read_colnull_str / ffgcfs
      (fitsfile *fptr, int colnum, long firstrow, long firstelem,
       long nelements, > char **array, char *nularray, int *anynul,
       int *status)

  int fits_read_colnull_[log,byt,sht,usht,int,uint,lng,ulng,flt,dbl,cmp,dblcmp] /
      ffgcf[l,b,i,ui,k,uk,j,uj,e,d,c,m]
      (fitsfile *fptr, int colnum, long firstrow,
       long firstelem, long nelements, > DTYPE *array,
       char *nularray, int *anynul, int *status)
3
Read an arbitrary data subsection from an N-dimensional array in a binary table vector column. Undefined pixels in the array will be set equal to the value of 'nulval', unless nulval=0 in which case no testing for undefined pixels will be performed. The first and last rows in the table to be read are specified by fpixels(naxis+1) and lpixels(naxis+1), and hence are treated as the next higher dimension of the FITS N-dimensional array. The INC parameter specifies the sampling interval in each dimension between the data elements that will be returned.  
  int fits_read_subset_[byt, sht, usht, int, uint, lng, ulng, flt, dbl] /
      ffgsv[b,i,ui,k,uk,j,uj,e,d]
      (fitsfile *fptr, int colnum, int naxis, long *naxes, long *fpixels,
       long *lpixels, long *inc, DTYPE nulval, > DTYPE *array, int *anynul,
       int *status)
4
Read an arbitrary data subsection from an N-dimensional array in a binary table vector column. Any Undefined pixels in the array will have the corresponding 'nularray' element set equal to TRUE. The first and last rows in the table to be read are specified by fpixels(naxis+1) and lpixels(naxis+1), and hence are treated as the next higher dimension of the FITS N-dimensional array. The INC parameter specifies the sampling interval in each dimension between the data elements that will be returned.  
  int fits_read_subsetnull_[byt, sht, usht, int, uint, lng, ulng, flt, dbl] /
      ffgsf[b,i,ui,k,uk,j,uj,e,d]
      (fitsfile *fptr, int colnum, int naxis, long *naxes,
       long *fpixels, long *lpixels, long *inc, > DTYPE *array,
       char *nularray, int *anynul, int *status)
5
Read bit values from a byte ('B') or bit (`X`) table column (in the CDU). Larray is an array of logical values corresponding to the sequence of bits to be read. If larray is true then the corresponding bit was set to 1, otherwise the bit was set to 0. Note that in the case of 'X' columns, CFITSIO can read all 8 bits of each byte whether they are formally valid or not. Thus if the column is defined as '4X', and one calls ffgcx with firstbit=1 and nbits=8, then all 8 bits will be read from the first byte (as opposed to reading the first 4 bits from the first row and then the first 4 bits from the next row), even though the last 4 bits of each byte are formally not defined.  
  int fits_read_col_bit / ffgcx
      (fitsfile *fptr, int colnum, long firstrow, long firstbit,
       long nbits, > char *larray, int *status)
6
Return the descriptor for a variable length column in a binary table. The descriptor consists of 2 integer parameters: the number of elements in the array and the starting offset relative to the start of the heap. The first routine returns a single descriptor whereas the second routine returns the descriptors for a range of rows in the table.  
  int fits_read_descript / ffgdes
      (fitsfile *fptr, int colnum, long rownum, > long *repeat,
           long *offset, int *status)

  int fits_read_descripts / ffgdess
      (fitsfile *fptr, int colnum, long firstrow, long nrows > long *repeat,
           long *offset, int *status)

next up previous contents FITSIO Home
Next: Index of Routines Up: Specialized FITS ASCII and Previous: Specialized Write Column Data