Package gavo :: Package formats :: Module fitstable
[frames] | no frames]

Module fitstable

source code

Writing data in FITS binary tables

Functions
 
makeFITSTable(dataSet, acquireSamples=False)
returns a hdulist containing extensions for the tables in dataSet.
source code
 
writeFITSTableFile(hdulist)
returns the name of a temporary file containing the FITS data for hdulist.
source code
 
makeFITSTableFile(dataSet, acquireSamples=True)
returns the name of a temporary file containing a fits file representing dataSet.
source code
 
writeDataAsFITS(data, outputFile, acquireSamples=False)
a formats.common compliant data writer.
source code
Variables
  __package__ = 'gavo.formats'
Function Details

makeFITSTable(dataSet, acquireSamples=False)

source code 

returns a hdulist containing extensions for the tables in dataSet.

This function may block basically forever. Never call this from the main server, always use threads or separate processes (until pyfits is fixed to be thread-safe).

This will add table parameters as header cards on the resulting FITS header.

makeFITSTableFile(dataSet, acquireSamples=True)

source code 

returns the name of a temporary file containing a fits file representing dataSet.

The caller is responsible to remove the file.

writeDataAsFITS(data, outputFile, acquireSamples=False)

source code 

a formats.common compliant data writer.

This will write out table params as header cards. To serialise those yourself (as is required for spectral data model compliant tables), set an attribute IgnoreTableParams (with an arbitrary value) on the table.