- NAME
TBDELCOL
- PURPOSE
Delete a column of data from a FITS binary table
- CALLING SEQUENCE
TBDELCOL, h, tab, name
- INPUTS-OUPUTS
h,tab - FITS binary table header and data array. H and TAB will
be updated with the specified column deleted
- INPUTS
name - Either (1) a string giving the name of the column to delete
or (2) a scalar giving the column number to delete
- EXAMPLE
Delete the column "FLUX" from FITS binary table test.fits
IDL> tab = readfits('test.fits',h,/ext) ;Read table
IDL> tbdelcol, h, tab, 'FLUX' ;Delete Flux column
IDL> modfits,'test.fits',tab,h,/ext ;Write back table
- PROCEDURES USED
SXADDPAR, TBINFO, TBSIZE
- REVISION HISTORY
Written W. Landsman STX Co. August, 1988
Use new structure returned by TBINFO, August, 1997
Use SIZE(/TNAME) instead of DATATYPE() October 2001
Use /NOSCALE in call to TBINFO, update TDISP W. Landsman March 2007
- Make sure column exists
- Eliminate relevant columns from TAB
- irst column
- ast column
- ll other columns
- Parse the header. Remove specified keyword from header. Lower
- the index of subsequent keywords. Update the TBCOL*** index of
- subsequent keywords
- oop over each element in header
- ubsequent field?
- educe number of fields by 1
- educe num. of columns by WIDTH