PyFITS release notes

PyFITS is being used within the STScI operations pipelines and is a supported product. Currently PyFITS takes a fairly strict interpretation of FITS files. There are likely to be problems with FITS data that do not strictly conform to the standard. Undoubtedly, use with a wider variety of files and uses will uncover problems; please contact help@stsci.edu when such problems are encountered.

We intend to accomodate such variances, particularly if they involve widely used or available data (so please let us know when such problems occur).

PyFITS requires numpy (or numarray) to be installed.


Version 2.2.2; October 12 2009


Version 2.2.1; October 6 2009


Version 2.2; September 23 2009


Version 2.1.1; April 22 2009


Version 2.1; April 14 2009


Version 2.0.1; February 3 2009


Version 2.0; January 30 2009


Version 1.4.1; November 4 2008


Version 1.4; July 7 2008


Version 1.3; February 22 2008


Version 1.1; June 15 2007


Version 1.0.1; March 24 2006

The changes to PyFITS were primarily to improve the docstrings and to reclassify some public functions and variables as private. Readgeis and fitsdiff which were distributed with PyFITS in previous releases were moved to pytools. This release of PyFITS is v1.0.1. The next release of PyFITS will support both numarray and numpy (and will be available separately from stsci_python, as are all the python packages contained within stsci_python). An alpha release for PyFITS numpy support will be made around the time of this stsci_python release.


Version 1.0; November 1 2005

Major Changes since v0.9.6:

Minor changes since v0.9.6:

PyFITS Version 1.0 REQUIRES Python 2.3 or later.


Version 0.9.6; 11 November 2004

Major changes since v0.9.3:

Some minor changes:


Version 0.9.3; 2 July 2004

Changes since v0.9.0:


Version 0.9; 27 April 2004

Changes since v0.8.0:

Version 0.8.0; August 19, 2003

NOTE: This version will only work with numarray Version 0.6. In addition, earlier versions of PyFITS will not work with numarray 0.6. Therefore, both must be updated simultaneously.

Changes since 0.7.6:

Version 0.7.6; November 22, 2002

NOTE: This version will only work with numarray Version 0.4.

Changes since 0.7.5:


Version 0.7.5; 16 August 2002

Changes since v0.7.3:

  1. Memory mapping now works for readonly mode, both for images and binary tables.
    Usage: pyfits.open('filename', memmap=1)
  2. Edit the field method in FITS_rec class to make the column scaling for numbers use less temporary memory. (does not work under 2.2, due to Python "bug" of array *=)
  3. Delete bscale/bzero in the ImageBaseHDU constructor.
  4. Update bitpix in BaseImageHDU.__getattr__ after deleting bscale/bzero. (bug fix)
  5. In BaseImageHDU.__getattr__ point self.data to raw_data if float and if not memmap. (bug fix).
  6. Change the function get_tbdata() to private: _get_tbdata().

Version 0.7.3; 12 July 2002

Changes since v0.7.2:
  1. It will scale all integer image data to Float32, if BSCALE/BZERO != 1/0. It will also expunge the BSCALE/BZERO keywords.
  2. Add the scale() method for ImageBaseHDU, so data can be scaled just before being written to the file. It has the following arguments:
    type:
    destination data type (string), e.g. Int32, Float32, UInt8, etc.
    option:
    scaling scheme. if 'old', use the old BSCALE/BZERO values. if 'minmax', use the data range to fit into the full range of specified integer type. Float destination data type will not be scaled for this option.
    bscale/bzero:
    user specifiable BSCALE/BZERO values. They overwrite the "option".
  3. Deal with data area resizing in 'update' mode.
  4. Make the data scaling (both input and output) faster and use less memory.
  5. Bug fix to make column name change takes effect for field.
  6. Bug fix to avoid exception if the key is not present in the header already. This affects (fixes) add_history(), add_comment(), and add_blank().
  7. Bug fix in __getattr__() in Card class. The change made in 0.7.2 to rstrip the comment must be string type to avoid exception.

  8. Version 0.7.2.1; June 25, 2002

    A couple of bugs were addressed in this version.


    Version 0.7.2; June 19, 2002

    The two major improvements from Version 0.6.2 are:

    This version of PyFITS requires numarray version 0.3.4.

    Other changes include:

    1. Implement the new HDU hierarchy proposed earlier this year. This in turn reduces some of the redundant methods common to several HDU classes.
    2. Add 3 new methods to the Header class: add_history, add_comment, and add_blank.
    3. The table attributes _columns are now .columns and the attributes in ColDefs are now all without the underscores. So, a user can get a list of column names by: hdu.columns.names.
    4. The "fill" argument in the new_table method now has a new meaning:
      If set to true (=1), it will fill the entire new table with zeros/blanks. Otherwise (=0), just the extra rows/cells are filled with zeros/blanks. Fill values other than zero/blank are now not possible.
    5. Add the argument output_verify to the open method and writeto method. Not in the flush or close methods yet, due to possible complication.
    6. A new copy method for tables, the copy is totally independent from the table it copies from.
    7. The tostring() call in writeHDUdata takes up extra space to store the string object. Use tofile() instead, to save space.
    8. Make changes from _byteswap to _byteorder, following corresponding changes in numarray and recarray.
    9. Insert(update) EXTEND in PrimaryHDU only when header is None.
    10. Strip the trailing blanks for the comment value of a card.
    11. Add seek(0) right after the __buildin__.open(0), because for the 'ab+' mode, the pointer is at the end after open in Linux, but it is at the beginning in Solaris.
    12. Add checking of data against header, update header keywords (NAXIS's, BITPIX) when they don't agree with the data.
    13. change version to __version__.
    There are also many other minor internal bug fixes and technical changes.


    Version 0.6.2; February 12, 2002

    This version requires numarray version 0.2.

    Things not yet supported but are part of future development:

    :w