Download latest PDF - Read the Docs

Transcript
PyFITS Documentation, Release 3.4.dev
1.3 (2008-02-22)
Updates described in this release are only supported in the NUMPY version of pyfits.
The following enhancements were made:
• Provided support for a new extension to pyfits called stpyfits.
– The stpyfits module is a wrapper around pyfits. It provides all of the features and functions of pyfits along
with some STScI specific features. Currently, the only new feature supported by stpyfits is the ability to
read and write fits files that contain image data quality extensions with constant data value arrays. See
stpyfits [2] for more details on stpyfits.
• Added a new feature to allow trailing HDUs to be deleted from a fits file without actually reading the data from
the file.
– This supports a JWST requirement to delete a trailing HDU from a file whose primary Image HDU is too
large to be read on a 32 bit machine.
• Updated pyfits to use the warnings module to issue warnings. All warnings will still be issued to stdout, exactly
as they were before, however, you may now suppress warnings with the -Wignore command line option. For
example, to run a script that will ignore warnings use the following command line syntax:
python -Wignore yourscript.py
• Updated the open convenience function to allow the input of an already opened file object in place of a file name
when opening a fits file.
• Updated the writeto convenience function to allow it to accept the output_verify option.
– In this way, the user can use the argument output_verify=’fix’ to allow pyfits to correct any errors it
encounters in the provided header before writing the data to the file.
• Updated the verification code to provide additional detail with a VerifyError exception.
• Added the capability to create a binary table HDU directly from a numpy.ndarray. This may be done using either
the new_table convenience function or the BinTableHDU constructor.
The following performance improvements were made:
• Modified the import logic to dramatically decrease the time it takes to import pyfits.
• Modified the code to provide performance improvements when copying and examining header cards.
The following bugs were fixed:
• Corrected a bug that occurs when reading the data from a fits file that includes BZERO/BSCALE scaling. When
the data is read in from the file, pyfits automatically scales the data using the BZERO/BSCALE values in the
header. In the previous release, pyfits created a 32 bit floating point array to hold the scaled data. This could
cause a problem when the value of BZERO is so large that the scaled value will not fit into the float 32. For this
release, when the input data is 32 bit integer, a 64 bit floating point array is used for the scaled data.
• Corrected a bug that caused an exception to be raised when attempting to scale image data using the ImageHDU.scale method.
• Corrected a bug in the new_table convenience function that occurred when a binary table was created using a
ColDefs object as input and supplying an nrows argument for a number of rows that is greater than the number of
rows present in the input ColDefs object. The previous version of pyfits failed to allocate the necessary memory
for the additional rows.
• Corrected a bug in the new_table convenience function that caused an exception to be thrown when creating an
ASCII table.
• Corrected a bug in the new_table convenience function that will allow the input of a ColDefs object that was
read from a file as a binary table with a data value equal to None.
1.8. Other Information
93