next up previous contents Back To Software Index
Next: Read Image Data Up: FITS Primary Array Previous: FITS Primary Array

Write Image Data Routines

1
Put elements into the data array. The datatype parameter specifies the datatype of the array of values and can have one of the following symbolic constant values: TBYTE, TSHORT, TUSHORT, TINT, TLONG, TULONG, TFLOAT, TDOUBLE.

  int fits_write_img / ffppr
      (fitsfile *fptr, int datatype, long firstelem, long nelements,
       DTYPE *array, int *status);

2
Put elements into the data array. The datatype is specified by the suffix of the name of the routine.

  int fits_write_img_[byt, sht, usht, lng, ulng, int, flt, dbl] /
      ffppr[b,i,ui,j,uj,k,e,d]
      (fitsfile *fptr, long group, long firstelem, long nelements,
       DTYPE *array, > int *status);

3
Put elements into the data array, substituting the appropriate FITS null value for all elements which are equal to the value of NULLVAL. For integer FITS arrays, the null value defined by the BLANK keyword or a previous call to ffpnul will be substituted; for floating point FITS arrays (BITPIX = -32 or -64) then the special IEEE NaN (Not-a-Number) value will be substituted.

  int fits_write_imgnull_[byt, sht, usht, lng, ulng, int, flt, dbl] /
      ffppn[b,i,ui,j,uj,k,e,d]
      (fitsfile *fptr, long group, long firstelem,
           long nelements, DTYPE *array, DTYPE nulval, > int *status);

4
Set data array elements as undefined.

  int fits_write_img_null / ffppru
      (fitsfile *fptr, long group, long firstelem, long nelements,
       > int *status)

5
Put values into group parameters. This routine only applies to the `Random Grouped' FITS format which has been used for applications in radio interferometry, but is offically deprecated for future use.

  int fits_write_grppar_[byt, sht, usht, int, lng, ulng, flt, dbl] /
      ffpgp[b,i,ui,j,uj,k,e,d]
      (fitsfile *fptr, long group, long firstelem, long nelements,
       > DTYPE *array, int *status)

6
Put 2-D image into the data array.

  int fits_write_2d_[byt, sht, usht, lng, ulng, flt, dbl] /
      ffp2d[b,i,ui,j,uj,k,e,d]
      (fitsfile *fptr, long group, long dim1, long naxis1,
       long naxis2, DTYPE *array, > int *status)

7
Put 3-D cube into the data array.

  int fits_write_3d_[byt, sht, usht, lng, ulng, flt, dbl] /
      ffp3d[b,i,ui,j,uj,k,e,d]
      (fitsfile *fptr, long group, long dim1, long dim2,
       long naxis1, long naxis2, long naxis3, DTYPE *array, > int *status)

8
Put an arbitrary data subsection into the data array.

  int fits_write_subset_[byt, sht, usht, lng, ulng, int, flt, dbl] /
      ffpss[b,i,ui,j,uj,k,e,d]
      (fitsfile *fptr, long group, long naxis, long *naxes,
       long *fpixel, long *lpixel, DTYPE *array, > int *status)