next up previous contents Back To Software Index
Next: Write Column Data Up: FITS ASCII and Previous: Low-Level Table Access

Insert or Delete Rows and Columns Routines

1
Insert blank rows into an existing ASCII or binary table (in the CDU). All the rows FOLLOWING row FROW are shifted down by NROWS rows. If FROW = 0 then the blank rows are inserted at the beginning of the table. This routine modifies the NAXIS2 keyword to reflect the new number of rows in the table.

  int fits_insert_rows / ffirow
      (fitsfile *fptr, long firstrow, long nrows, > int *status)

2
Delete rows from an existing ASCII or binary table (in the CDU). The NROWS number of rows are deleted, starting with row FROW, and any remaining rows in the table are shifted up to fill in the space. This routine modifies the NAXIS2 keyword to reflect the new number of rows in the table. Note that the physical size of the FITS file will not be reduced by this operation, and the empty FITS blocks if any at the end of the file will be padded with zeros.

  int fits_delete_rows / ffdrow
      (fitsfile *fptr, long firstrow, long nrows, > int *status)

3
Insert a blank column (or columns) into an existing ASCII or binary table (in the CDU). COLNUM specifies the column number that the (first) new column should occupy in the table. NCOLS specifies how many columns are to be inserted. Any existing columns from this position and higher are moved over to allow room for the new column(s). The index number on all the following keywords will be incremented if necessary to reflect the new position of the column(s) in the table: TBCOLn, TFORMn, TTYPEn, TUNITn, TNULLn, TSCALn, TZEROn, TDISPn, TDIMn, TLMINn, TLMAXn, TDMINn, TDMAXn, TCTYPn, TCRPXn, TCRVLn, TCDLTn, TCROTn, and TCUNIn.

  int fits_insert_col / fficol
      (fitsfile *fptr, int colnum, char *ttype, char *tform,
       > int *status)

  int fits_insert_cols / fficls
      (fitsfile *fptr, int colnum, int ncols, char **ttype,
       char **tform, > int *status)

4
Delete a column from an existing ASCII or binary table (in the CDU). The index number of all the keywords listed above (for fficol) will be decremented if necessary to reflect the new position of the column(s) in the table. Those index keywords that refer to the deleted column will also be deleted. Note that the physical size of the FITS file will not be reduced by this operation, and the empty FITS blocks if any at the end of the file will be padded with zeros.

  int fits_delete_col / ffdcol(fitsfile *fptr, int colnum, > int *status)



next up previous contents Back To Software Index
Next: Write Column Data Up: FITS ASCII and Previous: Low-Level Table Access