[Python-modules-commits] [pyfits] 01/10: Import pyfits_3.4.orig.tar.gz

Aurelien Jarno aurel32 at moszumanska.debian.org
Tue Feb 2 22:04:58 UTC 2016


This is an automated email from the git hooks/post-receive script.

aurel32 pushed a commit to branch master
in repository pyfits.

commit fc71929135ce8db757eac89a965beb176b28c08b
Author: Aurelien Jarno <aurelien at aurel32.net>
Date:   Tue Feb 2 22:20:56 2016 +0100

    Import pyfits_3.4.orig.tar.gz
---
 CHANGES.txt                                        | 292 ++++++-
 FAQ.txt                                            |  79 +-
 LICENSE.txt                                        |   2 +-
 MANIFEST.in                                        |   6 +-
 PKG-INFO                                           | 294 ++++++-
 .../{api_docs/api_headers.rst => api/cards.rst}    |  12 +-
 .../source/{api_docs/api_diff.rst => api/diff.rst} |   0
 .../{api_docs/api_files.rst => api/files.rst}      |   0
 .../api_hdulists.rst => api/hdulists.rst}          |   0
 .../source/{api_docs/api_hdus.rst => api/hdus.rst} |   0
 .../{api_docs/api_headers.rst => api/headers.rst}  |   0
 .../{api_docs/api_images.rst => api/images.rst}    |   0
 .../{api_docs/api_tables.rst => api/tables.rst}    |   0
 .../api_verification.rst => api/verification.rst}  |   4 +-
 docs/source/api_docs/api_cards.rst                 |  36 +-
 docs/source/api_docs/api_diff.rst                  |  52 +-
 docs/source/api_docs/api_files.rst                 |  49 +-
 docs/source/api_docs/api_hdulists.rst              |  19 +-
 docs/source/api_docs/api_hdus.rst                  |  48 +-
 docs/source/api_docs/api_headers.rst               |  18 +-
 docs/source/api_docs/api_images.rst                |  35 +-
 docs/source/api_docs/api_tables.rst                |  68 +-
 docs/source/api_docs/api_verification.rst          |  77 +-
 docs/source/appendix/header_transition.rst         |  30 +-
 docs/source/conf.py                                |   6 +-
 docs/source/developers_guide/developers_guide.rst  |  10 +-
 docs/source/index.rst                              | 825 ++++++++++++++++++-
 .../users_reference.rst => usage/examples.rst}     |   0
 .../users_headers.rst => usage/headers.rst}        |   6 +-
 .../users_image.rst => usage/image.rst}            |   0
 .../{users_guide/users_misc.rst => usage/misc.rst} |   0
 .../users_scripts.rst => usage/scripts.rst}        |  10 +
 .../users_table.rst => usage/table.rst}            |   6 +-
 .../users_unfamiliar.rst => usage/unfamiliar.rst}  |  42 +-
 .../verification.rst}                              |   8 +-
 docs/source/users_guide/users_headers.rst          | 434 +---------
 docs/source/users_guide/users_image.rst            | 212 +----
 docs/source/users_guide/users_intro.rst            |  66 +-
 docs/source/users_guide/users_misc.rst             |  81 +-
 docs/source/users_guide/users_reference.rst        |  80 +-
 docs/source/users_guide/users_scripts.rst          |  28 +-
 docs/source/users_guide/users_table.rst            | 351 +--------
 docs/source/users_guide/users_tutorial.rst         | 668 +---------------
 docs/source/users_guide/users_unfamiliar.rst       | 536 +------------
 docs/source/users_guide/users_verification.rst     | 351 +--------
 ez_setup.py                                        | 415 ++++++++++
 lib/pyfits.egg-info/requires.txt                   |   1 -
 lib/pyfits/tests/util.py                           | 159 ----
 {lib/pyfits.egg-info => pyfits.egg-info}/PKG-INFO  | 294 ++++++-
 .../SOURCES.txt                                    | 157 ++--
 .../dependency_links.txt                           |   0
 .../entry_points.txt                               |   3 +-
 .../not-zip-safe                                   |   0
 pyfits.egg-info/requires.txt                       |   1 +
 .../top_level.txt                                  |   0
 {lib/pyfits => pyfits}/__init__.py                 |   8 +-
 pyfits/_compat/__init__.py                         |  40 +
 pyfits/_compat/_odict_py2/__init__.py              | 190 +++++
 pyfits/_compat/_weakset_py2/__init__.py            | 219 ++++++
 pyfits/_compat/odict.py                            |   7 +
 pyfits/_compat/weakref.py                          |   6 +
 pyfits/_numpy_hacks.py                             |  73 ++
 {lib/pyfits => pyfits}/_release.py                 |   3 +-
 {lib/pyfits => pyfits}/card.py                     | 340 +-------
 {lib/pyfits => pyfits}/column.py                   | 526 ++++++++++---
 {lib/pyfits => pyfits}/convenience.py              |  35 +-
 {lib/pyfits => pyfits}/core.py                     |  40 +-
 {lib/pyfits => pyfits}/diff.py                     |  96 ++-
 {lib/pyfits => pyfits}/extern/__init__.py          |   0
 {lib/pyfits => pyfits}/extern/six.py               |   0
 {lib/pyfits => pyfits}/file.py                     | 235 +++---
 {lib/pyfits => pyfits}/fitsrec.py                  | 874 ++++++++++++++-------
 {lib/pyfits => pyfits}/hdu/__init__.py             |   6 +-
 {lib/pyfits => pyfits}/hdu/base.py                 | 122 ++-
 {lib/pyfits => pyfits}/hdu/compressed.py           | 133 ++--
 {lib/pyfits => pyfits}/hdu/groups.py               | 127 +--
 {lib/pyfits => pyfits}/hdu/hdulist.py              | 145 ++--
 {lib/pyfits => pyfits}/hdu/image.py                | 444 ++++++-----
 {lib/pyfits => pyfits}/hdu/nonstandard.py          |   0
 {lib/pyfits => pyfits}/hdu/streaming.py            |  52 +-
 {lib/pyfits => pyfits}/hdu/table.py                | 491 ++++++++----
 {lib/pyfits => pyfits}/header.py                   | 447 ++---------
 {lib/pyfits => pyfits}/py3compat.py                | 164 ++--
 {lib/pyfits => pyfits}/scripts/__init__.py         |   4 -
 {lib/pyfits => pyfits}/scripts/fitscheck.py        |  10 +-
 {lib/pyfits => pyfits}/scripts/fitsdiff.py         |  52 +-
 pyfits/scripts/fitsheader.py                       | 255 ++++++
 pyfits/scripts/fitsinfo.py                         |  64 ++
 {lib/pyfits => pyfits}/tests/__init__.py           |   0
 {lib/pyfits => pyfits}/tests/data/arange.fits      | Bin
 {lib/pyfits => pyfits}/tests/data/ascii.fits       |   0
 .../table.fits => pyfits/tests/data/blank.fits     | Bin 8640 -> 5760 bytes
 {lib/pyfits => pyfits}/tests/data/checksum.fits    |   0
 {lib/pyfits => pyfits}/tests/data/comp.fits        |   0
 {lib/pyfits => pyfits}/tests/data/fixed-1890.fits  |   0
 pyfits/tests/data/memtest.fits                     |   1 +
 .../tests/data/o4sp040b0_raw.fits                  |   0
 .../tests/data/random_groups.fits                  |   0
 {lib/pyfits => pyfits}/tests/data/scale.fits       | Bin
 {lib/pyfits => pyfits}/tests/data/stddata.fits     | Bin
 {lib/pyfits => pyfits}/tests/data/table.fits       | Bin
 {lib/pyfits => pyfits}/tests/data/tb.fits          | Bin
 .../data/table.fits => pyfits/tests/data/tdim.fits | Bin 8640 -> 8640 bytes
 {lib/pyfits => pyfits}/tests/data/test0.fits       |   0
 {lib/pyfits => pyfits}/tests/data/zerowidth.fits   |   0
 {lib/pyfits => pyfits}/tests/test_checksum.py      |  72 +-
 {lib/pyfits => pyfits}/tests/test_core.py          | 319 ++++++--
 {lib/pyfits => pyfits}/tests/test_diff.py          |  49 ++
 {lib/pyfits => pyfits}/tests/test_division.py      |   3 +-
 {lib/pyfits => pyfits}/tests/test_groups.py        |  13 +
 {lib/pyfits => pyfits}/tests/test_hdulist.py       |  33 +-
 {lib/pyfits => pyfits}/tests/test_header.py        | 340 ++++----
 {lib/pyfits => pyfits}/tests/test_image.py         | 307 ++++++--
 {lib/pyfits => pyfits}/tests/test_nonstandard.py   |   0
 {lib/pyfits => pyfits}/tests/test_structured.py    |   0
 {lib/pyfits => pyfits}/tests/test_table.py         | 524 +++++++++++-
 {lib/pyfits => pyfits}/tests/test_uint.py          |   0
 {lib/pyfits => pyfits}/tests/test_util.py          |   2 +-
 pyfits/tests/util.py                               |  71 ++
 {lib/pyfits => pyfits}/util.py                     | 593 +++++++++-----
 {lib/pyfits => pyfits}/verify.py                   |   1 -
 {lib/pyfits => pyfits}/version.py                  |   6 +-
 scripts/fitshead                                   |   8 +
 setup.cfg                                          |  12 +-
 setup.py                                           |   2 +-
 setup_hooks.py                                     |  16 +
 src/compressionmodule.c                            |  53 +-
 tox.ini                                            |   2 +-
 128 files changed, 7431 insertions(+), 6075 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 383b0c5..7834daf 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,6 +1,242 @@
 Changelog
 ===========
 
+3.4 (2016-01-28)
+----------------
+
+This release removes support for Python 2.5, as well as Python 3.0 - 3.2.
+Supported Python versions are now Python 2.6, 2.7, and 3.3+.  This
+release incorporates new features and bug fixes made in the
+``astropy.io.fits`` module in Astropy, which is originally based on PyFITS
+and supersedes the stand-alone PyFITS module.
+
+This will likely be the last stand-alone release of PyFITS that does not
+depend on Astropy.  There are a few reasons for this:
+
+1) Development resources for PyFITS are limited, and better focused on
+   newer projects.
+
+2) Astropy incorporates all features of PyFITS, and has many new features
+   from which future development of the FITS reader/writer can benefit, such
+   as a better table interface, units, and datetime types.  Since the most
+   beneficial future development in ``astropy.io.fits`` depends on other
+   parts of Astropy there is less motivation to maintain an independent FITS
+   module.
+
+This release contains most changes to the ``astropy.io.fits`` module that
+have been made since the last release of PyFITS (v3.3), except for changes
+that depend explicitly on other parts of Astropy.  This brings PyFITS mostly
+to parity with the version of ``astropy.io.fits`` that will be in Astropy
+v1.1.2.
+
+Although an exhaustive list of changes is difficult, some of the highlights
+are below:
+
+New Features
+^^^^^^^^^^^^
+
+- Included a new command-line script called fitsheader to display the
+  header(s) of a FITS file from the command line. (astropy/astropy#2092)
+
+- Added support for a ``savecomment`` argument in the ``Header.set`` method,
+  equivalent to the argument of the same name to the old ``Header.update``
+  method. (Note: This change was never ported to Astropy due to lack of
+  demand.)
+
+- The ``fitsdiff`` script ignores some things by default when comparing fits
+  files (e.g. empty header lines). This adds a ``--exact`` option where
+  nothing is ignored. [#2782, #3110]
+
+- ``Section`` now supports all advanced indexing features ``ndarray`` does
+  (slices with any steps, integer arrays, boolean arrays, None, Ellipsis).
+  It also properly returns scalars when this is appropriate.
+  (astropy/astropy#3148)
+
+- Support reading and writing from bzip2 compressed files. i.e.
+  ``.fits.bz2`` files. (astropy/astropy#3789)
+
+API Changes
+^^^^^^^^^^^
+
+- Overwriting an existing file using the ``clobber=True`` option no longer
+  displays a warning message. (astropy/astropy#1963)
+
+- ``pyfits.open`` no longer catches ``OSError`` exceptions on missing or
+  unreadable files-- instead it raises the standard Python exceptions in
+  such cases. (astropy/astropy#2756)
+
+- The ``uint`` argument to ``pyfits.open`` is now True by default; that is,
+  arrays using the FITS unsigned integer convention will be detected, and
+  read as unsigned integers by default.  A new config option for ``pyfits``,
+  ``ENABLE_UINT``, can be changed to False to revert to the original
+  behavior of ignoring the ``uint`` convention unless it is explicitly
+  requested with ``uint=True``. (astropy/astropy#3916)
+
+- The ``ImageHDU.NumCode`` and ``ImageHDU.ImgCode`` attributes (and same for
+  other classes derived from ``_ImageBaseHDU``) are deprecated.  Instead,
+  the ``pyfits`` module-level constants ``BITPIX2DTYPE`` and
+  ``DTYPE2BITPIX`` can be used. (astropy/astropy#3916)
+
+Bug Fixes
+^^^^^^^^^
+
+- Fixes for checksums on 32-bit platforms. Results may be different if
+  writing or checking checksums in "nonstandard" mode.
+  (astropy/astropy#2484)
+
+- Fixed a crash when reading scaled float data out of a FITS file that was
+  loaded from a string (using ``HDUList.fromfile``) rather than from a file.
+  (astropy/astropy#2710)
+
+- Fixed a crash when reading data from an HDU whose header contained in
+  invalid value for the BLANK keyword (e.g., a string value instead of an
+  integer as required by the FITS Standard). Invalid BLANK keywords are now
+  warned about, but are otherwise ignored. (astropy/astropy#2711)
+
+- Fixed a crash when reading the header of a tile-compressed HDU if that
+  header contained invalid duplicate keywords resulting in a ``KeyError``
+  (astropy/astropy#2750)
+
+- Fixed corruption when writing new FITS files through to gzipped files.
+  (astropy/astropy#2794)
+
+- Fixed crash when writing HDUs made with non-contiguous data arrays to
+  file-like objects. (astropy/astropy#2794)
+
+- It is now possible to create ``pyfits.BinTableHDU`` objects with a table
+  with zero rows. (astropy/astropy#2916)
+
+- The ``in`` operator now works correctly for checking if an extension is in
+  an ``HDUList`` (as given via EXTNAME, (EXTNAME, EXTVER) tuples, etc.)
+  (astropy/astropy#3060)
+
+- Added workaround for bug in MacOS X <= 10.8 that caused np.fromfile to
+  fail. (astropy/astropy#3078)
+
+- Added support for the ``RICE_ONE`` compression type synonym.
+  (astropy/astropy#3115)
+
+- Fixed the problem in ``pyfits.open`` of some filenames with colon (``:``)
+  in the name being recognized as URLs instead of file names.
+  (astropy/astropy#3122)
+
+- Setting ``memmap=True`` in ``fits.open`` and related functions now raises
+  a ValueError if opening a file in memory-mapped mode is impossible.
+  (astropy/astropy#2298)
+
+- CONTINUE cards no longer end the value of the final card in the series
+  with an ampersand, per the specification of the CONTINUE card convention.
+  (astropy/astropy#3282)
+
+- Fixed a crash that occurred when reading an ASCII table containing
+  zero-precision floating point fields. (astropy/astropy#3422)
+
+- When a float field for an ASCII table has zero-precision a decimal point
+  (with no digits following it) is still written to the field as long as
+  there is space for it, as recommended by the FITS standard.  This makes it
+  less ambiguous that these columns should be interpreted as floats.
+  (astropy/astropy#3422)
+
+- Fixed a severe memory leak that occurred when reading tile compressed
+  images. (astropy/astropy#3680)
+
+- Fixed bug where column data could be unintentionally byte-swapped when
+  copying data from an existing FITS file to a new FITS table with a TDIMn
+  keyword for that column. (astropy/astropy#3561)
+
+- The ``ColDefs.change_attrib``, ``ColDefs.change_name``, and
+  ``ColDefs.change_unit`` methods now work as advertised.  It is also
+  possible (and preferable) to update attributes directly on ``Column``
+  objects (for example setting ``column.name``), and the change will be
+  accurately reflected in any associated table data and its FITS header.
+  (astropy/astropy#3283)
+
+- Fixes an issue with the ``FITS_rec`` interface to FITS table data, where a
+  ``FITS_rec`` created by copying an existing FITS table but adding new rows
+  could not be sliced or masked correctly.  (astropy/astropy#3641)
+
+- Fixed handling of BINTABLE with TDIMn of size 1. (astropy/astropy#3580)
+
+- Fixes to support Numpy 1.10. (astropy/astropy#3419)
+
+- Fixed crash when updating data in a random groups HDU opened in update
+  mode. (astropy/astropy#3730)
+
+- Fixed incorrect checksum / datasum being written when re-writing a scaled
+  HDU (i.e. non-trivial BSCALE and/or BZERO) with
+  ``do_not_scale_image_data=False``. (astropy/astropy#3883)
+
+- Fixed stray deprecation warning in ``BinTableHDU.copy()``. (astropy/astropy#3789)
+
+- Better handling of the ``BLANK`` keyword when auto-scaling scaled image
+  data.  The ``BLANK`` keyword is now removed from the header after
+  auto-scaling is applied, and it is restored properly (with floating point
+  NaNs replaced by the filler value) when updating a file opened with the
+  ``scale_back=True`` argument.  Invalid usage of the ``BLANK`` keyword is
+  also better warned about during validation. (astropy/astropy#3865)
+
+- Reading memmaped scaled images won't fail when
+  ``do_not_scale_image_data=True`` (that is, since we're just reading the
+  raw / physical data there is no reason mmap can't be used).
+  (astropy/astropy#3766)
+
+- Fixed a reference cycle that could sometimes cause FITS table-related
+  objects (``BinTableHDU``, ``ColDefs``, etc.) to hang around in memory
+  longer than expected. (astropy/astropy#4012)
+
+- Fix bug when extending one header (without comments) with another (with
+  comments). (astropy/astropy#3967)
+
+- Somewhat improved resource usage for FITS data--previously a new ``mmap``
+  was opened for each HDU of a FITS file accessed through an ``HDUList``.
+  Each ``mmap`` used up a single file descriptor, causing problems with
+  system resource limits for some users.  Now only a single ``mmap`` is
+  opened, and shared for the data of all HDUs.  Note: The problem still
+  persists with using the "convenience" functions.  For example using
+  ``fits.getdata`` will create one ``mmap`` per HDU read this way (as
+  opposed to opening the file with ``fits.open`` and accessing the HDUs
+  through the ``HDUList`` object). (astropy/astropy#4097)
+
+- Fix bug where reading a file without a newline failed with an unrelated /
+  unhelpful exception. (astropy/astropy#4160)
+
+- ``fitsdiff`` and related functions now do a better job reporting
+  differences between values that are different types but have the same
+  representation (ex: the string '0' versus the number 0).
+  (astropy/astropy#4122)
+
+- Miscellaneous fixes for supporting Numpy 1.10. (astropy/astropy#4228)
+
+- Fixed an issue where writing a column of unicode strings to a FITS table
+  resulted in a quadrupling of size of the column (i.e. the format of the
+  FITS column was 4 characters for every one in the original strings).
+  (astropy/astropy#4228)
+
+- Added support for an obscure case (but nonetheless allowed by the FITS
+  standard) where a column has some TDIMn keyword, but a repeat count in the
+  TFORMn column greater than the number of elements implied by the TDIMn.
+  For example TFORMn = 100I, but TDIMn = '(5,5)'.  In this case the TDIMn
+  implies 5x5 arrays in the column, but the TFORMn implies a 100 element 1-D
+  array in the column.  In this case the TDIM takes precedence, and the
+  remaining bytes in the column are ignored. (astropy/astropy#4228)
+
+- Fixed a regression that could cause writes of large FITS files to be
+  truncated. (astropy/astropy#4307)
+
+- Fixed possible segfault during error handling in FITS tile compression.
+  (astropy/astropy#4489)
+
+- Fixed crash on pickling of binary table columns with the 'X', 'P', or
+  'Q' format. (astropy/astropy#4514)
+
+- Fixed memory / reference leak that could occur when copying a ``FITS_rec``
+  object (the ``.data`` for table HDUs). (astropy/astropy#520)
+
+- Fixed a memory / reference leak in ``FITS_rec`` that occurred in a wide
+  range of cases, especially after writing FITS tables to a file, but in
+  other cases as well. (astropy/astropy#4539)
+
+
 3.3 (2014-07-17)
 ----------------
 
@@ -158,7 +394,7 @@ Bug Fixes
   (spacetelescope/PyFITS#53)
 
 - Improved behavior when writing large compressed images on OSX by removing an
-  unncessary check for platform architecture. (spacetelescope/PyFITS#57)
+  unnecessary check for platform architecture. (spacetelescope/PyFITS#57)
 
 - Allow reading FITS files from file-like objects that do not have a
   ``.closed`` attribute (and as such may not even have an "open" vs. "closed"
@@ -187,7 +423,7 @@ Bug Fixes
   (Backported from 3.2.3)
 
 - Improved behavior when writing large compressed images on OSX by removing an
-  unncessary check for platform architecture. (Backported from 3.2.3)
+  unnecessary check for platform architecture. (Backported from 3.2.3)
 
 - Allow reading FITS files from file-like objects that do not have a
   ``.closed`` attribute (and as such may not even have an "open" vs. "closed"
@@ -223,7 +459,7 @@ Bug Fixes
   accepting an integer index as the first argument, it also supports supplying
   a keyword name as the first argument for insertion relative to a specific
   keyword.  It also now supports an optional ``after`` argument.  If
-  ``after=True`` the the insertion is made below the insertion point instead
+  ``after=True`` the insertion is made below the insertion point instead
   of above it. (spacetelescope/PyFITS#12)
 
 - Fixed support for broadcasting of values assigned to table columns.
@@ -297,7 +533,7 @@ Bug Fixes
   accepting an integer index as the first argument, it also supports supplying
   a keyword name as the first argument for insertion relative to a specific
   keyword.  It also now supports an optional ``after`` argument.  If
-  ``after=True`` the the insertion is made below the insertion point instead
+  ``after=True`` the insertion is made below the insertion point instead
   of above it. (Backported from 3.2.1)
 
 - A grab bag of minor performance improvements in headers.
@@ -461,7 +697,7 @@ Other Changes and Additions
   no dithering is used, but the ``SUBTRACTIVE_DITHER_1`` and
   ``SUBTRACTIVE_DITHER_2`` methods can be enabled by passing the correct
   constants to the ``quantize_method`` argument to the ``CompImageHDU``
-  constuctor.  A seed can be manually specified, or automatically generated
+  constructor.  A seed can be manually specified, or automatically generated
   using either the system clock or checksum-based methods via the
   ``dither_seed`` argument.  See the documentation for ``CompImageHDU`` for
   more details. (#198) (spacetelescope/PYFITS#32)
@@ -570,7 +806,7 @@ Bug Fixes
 
 - Slightly refactored how tables containing variable-length array columns are
   handled to add two improvements: Fixes an issue where accessing the data
-  after a call to the `pyfits.getdata` convenience function caused an
+  after a call to the ``pyfits.getdata`` convenience function caused an
   exception, and allows the VLA data to be read from an existing mmap of the
   FITS file. (#200)
 
@@ -641,7 +877,7 @@ Bug Fixes
 
 - Slightly refactored how tables containing variable-length array columns are
   handled to add two improvements: Fixes an issue where accessing the data
-  after a call to the `pyfits.getdata` convenience function caused an
+  after a call to the ``pyfits.getdata`` convenience function caused an
   exception, and allows the VLA data to be read from an existing mmap of the
   FITS file. Backported from 3.1.2. (#200)
 
@@ -720,7 +956,7 @@ Bug Fixes
 - Fixed a crash when generating diff reports from diffs using the
   ``ignore_comments`` options. (#181)
 
-- Fixed some bugs with WCS Paper IV record-valued keyword cards:
+- Fixed some bugs with FITS WCS distortion paper record-valued keyword cards:
 
   - Cards that looked kind of like RVKCs but were not intended to be were
     over-permissively treated as such--commentary keywords like COMMENT and
@@ -900,7 +1136,7 @@ API Changes
 - A new global variable ``pyfits.EXTENSION_NAME_CASE_SENSITIVE`` was added.
   This serves as a replacement for ``pyfits.setExtensionNameCaseSensitive``
   which is not deprecated and may be removed in a future version.  To enable
-  case-sensitivity of extension names (i.e. treat 'sci' as distict from 'SCI')
+  case-sensitivity of extension names (i.e. treat 'sci' as distinct from 'SCI')
   set ``pyfits.EXTENSION_NAME_CASE_SENSITIVE = True``.  The default is
   ``False``. (r1139)
 
@@ -928,12 +1164,12 @@ New Features
 
 - Added support for the proposed "FITS" extension HDU type.  See
   http://listmgr.cv.nrao.edu/pipermail/fitsbits/2002-April/001094.html.  FITS
-  HDUs contain an entire FITS file embedded in their data section.  `FitsHDU`
+  HDUs contain an entire FITS file embedded in their data section.  ``FitsHDU``
   objects work like other HDU types in PyFITS.  Their ``.data`` attribute
   returns the raw data array.  However, they have a special ``.hdulist``
   attribute which processes the data as a FITS file and returns it as an
   in-memory HDUList object.  FitsHDU objects also support a
-  ``FitsHDU.fromhdulist()`` classmethod which returns a new `FitsHDU` object
+  ``FitsHDU.fromhdulist()`` classmethod which returns a new ``FitsHDU`` object
   that embeds the supplied HDUList. (#80)
 
 - Added a new ``.is_image`` attribute on HDU objects, which is True if the HDU
@@ -1042,7 +1278,7 @@ Bug Fixes
 
 - Fixed a bug where opening a file containing compressed image HDUs in
   'update' mode and then immediately closing it without making any changes
-  caused the file to be rewritten unncessarily. (#167)
+  caused the file to be rewritten unnecessarily. (#167)
 
 - Fixed two memory leaks that could occur when writing compressed image data,
   or in some cases when opening files containing compressed image HDUs in
@@ -1134,7 +1370,7 @@ Bug Fixes
 - Fixed slicing of Group objects--previously it was not possible to slice
   slice them at all.
 
-- Made it possible to assign `np.bool_` objects as header values. (#123)
+- Made it possible to assign ``np.bool_`` objects as header values. (#123)
 
 - Fixed overly strict handling of the EXTEND keyword; see "Changes in
   behavior" above. (#124)
@@ -1146,7 +1382,7 @@ Bug Fixes
 - Fixed a bug where the values of the PTYPEn keywords in a random groups HDU
   were forced to be all lower-case when saving the file. (#130)
 
-- Removed an unnecessary inline import in `ExtensionHDU.__setattr__` that was
+- Removed an unnecessary inline import in ``ExtensionHDU.__setattr__`` that was
   causing some slowdown when opening files containing a large number of
   extensions, plus a few other small (but not insignficant) performance
   improvements thanks to Julian Taylor. (#133)
@@ -1243,10 +1479,10 @@ Bug Fixes
 - Fixed a crash that could occur in Python 3 when opening files with checksum
   checking enabled. (r1336)
 
-- Fixed a small bug that could cause a crash in the `StreamingHDU` interface
+- Fixed a small bug that could cause a crash in the ``StreamingHDU`` interface
   when using Numpy below version 1.5.
 
-- Fixed a crash that could occur when creating a new `CompImageHDU` from an
+- Fixed a crash that could occur when creating a new ``CompImageHDU`` from an
   array of big-endian data. (#104)
 
 - Fixed a crash when opening a file with extra zero padding at the end.
@@ -1379,7 +1615,7 @@ Bug Fixes
 - Fixed a bug where writing a table with zero rows could fail in some cases
   (#72)
 
-- Miscellanous small bug fixes that were causing some tests to fail,
+- Miscellaneous small bug fixes that were causing some tests to fail,
   particularly on Python 3 (#74, #75)
 
 - Fixed a bug where creating a table column from an array in non-native byte
@@ -1441,7 +1677,7 @@ Bug Fixes
 
 - Calls to deprecated functions will display a Deprecation warning.  However,
   in Python 2.7 and up Deprecation warnings are ignored by default, so run
-  Python with the `-Wd` option to see if you're using any deprecated
+  Python with the ``-Wd`` option to see if you're using any deprecated
   functions.  If we get close to actually removing any functions, we might
   make the Deprecation warnings display by default.
 
@@ -1499,7 +1735,7 @@ The following enhancements were added:
 
 - Checksum support now correctly conforms to the FITS standard.  pyfits
   supports reading and writing both the old checksums and new
-  standard-compliant checksums.  The `fitscheck` command-line utility is
+  standard-compliant checksums.  The ``fitscheck`` command-line utility is
   provided to verify and update checksums.
 
 - Added a new optional keyword argument ``do_not_scale_image_data``
@@ -1922,7 +2158,7 @@ The following bugs were fixed:
   variable length format column from character data (PA format).
 
 - Modified installation code so that when installing on Windows, when a C++
-  compiler compatable with the Python binary is not found, the installation
+  compiler compatible with the Python binary is not found, the installation
   completes with a warning that all optional extension modules failed to
   build.  Previously, an Error was issued and the installation stopped.
 
@@ -2356,7 +2592,7 @@ The following enhancements were made:
     an underlying file object on which the function will be performed.
 
 - Added support for record-valued keyword cards as introduced in the "FITS WCS
-  Paper IV proposal for representing a more general distortion model".
+  proposal for representing a more general distortion model".
 
   - Record-valued keyword cards are string-valued cards where the string is
     interpreted as a definition giving a record field name, and its floating
@@ -2573,13 +2809,7 @@ The following enhancements were made:
       >>> del cl[0]
       >>> print cl['DP1.AXIS.1']
       Traceback (most recent call last):
-      File "<stdin>", line 1, in <module>
-      File "NP_pyfits.py", line 977, in __getitem__
-        return self.ascard[key].value
-      File "NP_pyfits.py", line 1258, in __getitem__
-        _key = self.index_of(key)
-      File "NP_pyfits.py", line 1403, in index_of
-        raise KeyError, 'Keyword %s not found.' % `key`
+      ...
       KeyError: "Keyword 'DP1.AXIS.1' not found."
       >>> hdr['DP1.AXIS.1']
       4.0
@@ -2875,10 +3105,10 @@ Minor changes since v0.9.6:
 
 - Add output verification in methods flush() and close().
 
-- Modify the the design of the open() function to remove the output_verify
+- Modify the design of the open() function to remove the output_verify
   argument.
 
-- Remove the groups argument in GroupsHDU's contructor.
+- Remove the groups argument in GroupsHDU's constructor.
 
 - Redesign the column definition class to make its column components more
   accessible.  Also to make it conducive for higher level functionalities,
@@ -3051,7 +3281,7 @@ Changes since 0.7.5:
   in order for pyfits to run under numarray 0.4.
 
 - edit _readblock to add the (optional) firstblock argument and raise IOError
-  if the the first 8 characters in the first block is not 'SIMPLE  ' or
+  if the first 8 characters in the first block is not 'SIMPLE  ' or
   'XTENSION'.  Edit the function open to check for IOError to skip the last
   null filled block(s).  Edit readHDU to add the firstblock argument.
 
diff --git a/FAQ.txt b/FAQ.txt
index 8e83563..38ae65f 100644
--- a/FAQ.txt
+++ b/FAQ.txt
@@ -53,12 +53,12 @@ further 3.0.x releases for bug fixes only where possible.  Older versions of
 PyFITS (2.4 and earlier) are no longer actively supported.
 
 PyFITS is also included as a major component of upcoming Astropy_ project as
-the `astropy.io.fits` module.  The goal is for Astropy to eventually serve as a
-drop-in replacement for PyFITS (it even includes a legacy-compatibility mode
-where the `astropy.io.fits` module can still be imported as `pyfits`.
-However, for the time being PyFITS will still be released as an independent
-product as well, until such time that the Astropy project proves successful and
-widely-adopted.
+the ``astropy.io.fits`` module.  The goal is for Astropy to eventually serve
+as a drop-in replacement for PyFITS (it even includes a legacy-compatibility
+mode where the ``astropy.io.fits`` module can still be imported as
+``pyfits``.  However, for the time being PyFITS will still be released as an
+independent product as well, until such time that the Astropy project proves
+successful and widely-adopted.
 
 .. _Space Telescope Science Institute: http://www.stsci.edu/
 .. _AURA: http://www.aura-astronomy.org/
@@ -363,12 +363,12 @@ documentation.  For this reason, it is a good idea to install Sphinx and
 PyFITS into a `virtualenv`_ in order to build the development version of the
 docs (see below).
 
-With all the requirements installed, change directories into the `docs/`
+With all the requirements installed, change directories into the ``docs/``
 directory in the PyFITS source code, and run::
 
     $ make html
 
-to build the HTML docs, which will be output to `build/html`.  To build the
+to build the HTML docs, which will be output to ``build/html``.  To build the
 docs in other formats, please refer to the Sphinx documentation.
 
 To summarize, assuming that you already have Numpy and Matplotlib on your
@@ -423,8 +423,8 @@ occurred and the path through the code that led to it.
 
 As PyFITS is meant to be used as a piece in other software projects, some
 exceptions raised by PyFITS are by design.  For example, one of the most
-common exceptions is a `KeyError` when an attempt is made to read the value of
-a non-existent keyword in a header::
+common exceptions is a `~.exceptions.KeyError` when an attempt is made to
+read the value of a non-existent keyword in a header::
 
     >>> import pyfits
     >>> h = pyfits.Header()
@@ -792,7 +792,7 @@ method::
 Alternatively, if a file is opened with ``mode='update'`` along with the
 ``scale_back=True`` argument, the original BSCALE and BZERO scaling will
 be automatically re-applied to the data before saving.  Usually this is
-not desireable, especially when converting from floating point back to
+not desirable, especially when converting from floating point back to
 unsigned integer values.  But this may be useful in cases where the raw
 data needs to be modified corresponding to changes in the physical values.
 
@@ -835,3 +835,60 @@ the card image::
 
 As long as you don't assign new values to 'FOO' via ``h['FOO'] = 123``, PyFITS
 will maintain the header value exactly as you formatted it.
+
+I'm opening many FITS files in a loop and getting OSError: Too many open files
+------------------------------------------------------------------------------
+
+Say you have some code like:
+
+    >>> import pyfits
+    >>> for filename in filenames:
+    ...     hdul = pyfits.open(filename)
+    ...     for hdu in hdul:
+    ...         hdu_data = hdul.data
+    ...         # Do some stuff with the data
+    ...     hdul.close()
+    ...
+
+The details may differ, but the qualitative point is that the data to many
+HDUs and/or FITS files are being accessed in a loop.  This may result in
+an exception like::
+
+    Traceback (most recent call last):
+      File "<stdin>", line 2, in <module>
+    OSError: [Errno 24] Too many open files: 'my_data.fits'
+
+As explained in the :ref:`note on working with large files <fits-large-files>`,
+because PyFITS uses mmap by default to read the data in a FITS file, even if
+you correctly close a file with `HDUList.close <pyfits.HDUList.close>`
+a handle is kept open to that file so that the memory-mapped data array can
+still be continued to be read transparently.
+
+The way Numpy supports mmap is such that the file mapping is not closed until
+the overlying `~numpy.ndarray` object has no references to it and is freed
+memory.  However, when looping over a large number of files (or even just HDUs)
+rapidly, this may not happen immediately.  Or in some cases if the HDU object
+persists, the data array attached to it may persist too.  The easiest
+workaround is to *manually* delete the ``.data`` attribute on the HDU object so
+that the `~numpy.ndarray` reference is freed and the mmap can be closed:
+
+    >>> for filename in filenames:
+    ...     hdul = pyfits.open(filename)
+    ...     for hdu in hdul:
+    ...         hdu_data = hdul.data
+    ...         # Do some stuff with the data
+    ...         # ...
+    ...         # Don't need the data anymore; delete all references to it
+    ...         # so that it can be garbage collected
+    ...         del hdu_data
+    ...         del hdu.data
+    ...     hdul.close()
+    ...
+
+In some extreme cases files are opened and closed fast enough that Python's
+garbage collector does not free them (and hence free the file handles) often
+enough.  To mitigate this your code can manually force a garbage collection
+by calling :func:`gc.collect` at the end of the loop.
+
+In a future release it will be easier to automatically perform this sort of
+cleanup when closing FITS files, where needed.
diff --git a/LICENSE.txt b/LICENSE.txt
index 4161e9f..ebda516 100644
--- a/LICENSE.txt
+++ b/LICENSE.txt
@@ -1,4 +1,4 @@
-Copyright (C) 2014 Association of Universities for Research in Astronomy (AURA)
+Copyright (C) 2015 Association of Universities for Research in Astronomy (AURA)
 
 Redistribution and use in source and binary forms, with or without
 modification, are permitted provided that the following conditions are met:
diff --git a/MANIFEST.in b/MANIFEST.in
index bbcdbb9..29199a8 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,9 +1,11 @@
-include distribute_setup.py
+include ez_setup.py
+include setup_hooks.py
 include *.txt *.ini
 recursive-include docs *
 recursive-include cextern README *.*
 recursive-include src *.c *.h
-recursive-include lib/pyfits/tests/data *.fits
+recursive-include pyfits/tests/data *.fits
+recursive-include pyfits/_compat *.py
 
 exclude *.pyc
 prune docs/build
diff --git a/PKG-INFO b/PKG-INFO
index 5b02965..532bb47 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pyfits
-Version: 3.3
+Version: 3.4
 Summary: Reads FITS images and tables into numpy arrays and manipulates FITS headers
 Home-page: http://www.stsci.edu/resources/software_hardware/pyfits
 Author: J. C. Hsu, Paul Barrett, Christopher Hanley, James Taylor,
@@ -64,6 +64,242 @@ Description: Documentation
         Changelog
         ===========
         
+        3.4 (2016-01-28)
+        ----------------
+        
+        This release removes support for Python 2.5, as well as Python 3.0 - 3.2.
+        Supported Python versions are now Python 2.6, 2.7, and 3.3+.  This
+        release incorporates new features and bug fixes made in the
+        ``astropy.io.fits`` module in Astropy, which is originally based on PyFITS
+        and supersedes the stand-alone PyFITS module.
+        
+        This will likely be the last stand-alone release of PyFITS that does not
+        depend on Astropy.  There are a few reasons for this:
+        
+        1) Development resources for PyFITS are limited, and better focused on
+           newer projects.
+        
+        2) Astropy incorporates all features of PyFITS, and has many new features
+           from which future development of the FITS reader/writer can benefit, such
+           as a better table interface, units, and datetime types.  Since the most
+           beneficial future development in ``astropy.io.fits`` depends on other
+           parts of Astropy there is less motivation to maintain an independent FITS
+           module.
+        
+        This release contains most changes to the ``astropy.io.fits`` module that
+        have been made since the last release of PyFITS (v3.3), except for changes
+        that depend explicitly on other parts of Astropy.  This brings PyFITS mostly
+        to parity with the version of ``astropy.io.fits`` that will be in Astropy
+        v1.1.2.
+        
+        Although an exhaustive list of changes is difficult, some of the highlights
+        are below:
+        
+        New Features
+        ^^^^^^^^^^^^
+        
+        - Included a new command-line script called fitsheader to display the
+          header(s) of a FITS file from the command line. (astropy/astropy#2092)
+        
+        - Added support for a ``savecomment`` argument in the ``Header.set`` method,
+          equivalent to the argument of the same name to the old ``Header.update``
+          method. (Note: This change was never ported to Astropy due to lack of
+          demand.)
+        
+        - The ``fitsdiff`` script ignores some things by default when comparing fits
+          files (e.g. empty header lines). This adds a ``--exact`` option where
+          nothing is ignored. [#2782, #3110]
+        
+        - ``Section`` now supports all advanced indexing features ``ndarray`` does
+          (slices with any steps, integer arrays, boolean arrays, None, Ellipsis).
+          It also properly returns scalars when this is appropriate.
+          (astropy/astropy#3148)
+        
+        - Support reading and writing from bzip2 compressed files. i.e.
+          ``.fits.bz2`` files. (astropy/astropy#3789)
+        
+        API Changes
+        ^^^^^^^^^^^
+        
+        - Overwriting an existing file using the ``clobber=True`` option no longer
+          displays a warning message. (astropy/astropy#1963)
+        
+        - ``pyfits.open`` no longer catches ``OSError`` exceptions on missing or
+          unreadable files-- instead it raises the standard Python exceptions in
+          such cases. (astropy/astropy#2756)
+        
+        - The ``uint`` argument to ``pyfits.open`` is now True by default; that is,
+          arrays using the FITS unsigned integer convention will be detected, and
+          read as unsigned integers by default.  A new config option for ``pyfits``,
+          ``ENABLE_UINT``, can be changed to False to revert to the original
+          behavior of ignoring the ``uint`` convention unless it is explicitly
+          requested with ``uint=True``. (astropy/astropy#3916)
+        
+        - The ``ImageHDU.NumCode`` and ``ImageHDU.ImgCode`` attributes (and same for
+          other classes derived from ``_ImageBaseHDU``) are deprecated.  Instead,
+          the ``pyfits`` module-level constants ``BITPIX2DTYPE`` and
+          ``DTYPE2BITPIX`` can be used. (astropy/astropy#3916)
+        
+        Bug Fixes
+        ^^^^^^^^^
+        
+        - Fixes for checksums on 32-bit platforms. Results may be different if
+          writing or checking checksums in "nonstandard" mode.
+          (astropy/astropy#2484)
+        
+        - Fixed a crash when reading scaled float data out of a FITS file that was
+          loaded from a string (using ``HDUList.fromfile``) rather than from a file.
+          (astropy/astropy#2710)
+        
+        - Fixed a crash when reading data from an HDU whose header contained in
+          invalid value for the BLANK keyword (e.g., a string value instead of an
+          integer as required by the FITS Standard). Invalid BLANK keywords are now
+          warned about, but are otherwise ignored. (astropy/astropy#2711)
+        
+        - Fixed a crash when reading the header of a tile-compressed HDU if that
+          header contained invalid duplicate keywords resulting in a ``KeyError``
+          (astropy/astropy#2750)
+        
+        - Fixed corruption when writing new FITS files through to gzipped files.
+          (astropy/astropy#2794)
+        
+        - Fixed crash when writing HDUs made with non-contiguous data arrays to
+          file-like objects. (astropy/astropy#2794)
+        
+        - It is now possible to create ``pyfits.BinTableHDU`` objects with a table
+          with zero rows. (astropy/astropy#2916)
+        
+        - The ``in`` operator now works correctly for checking if an extension is in
+          an ``HDUList`` (as given via EXTNAME, (EXTNAME, EXTVER) tuples, etc.)
+          (astropy/astropy#3060)
+        
+        - Added workaround for bug in MacOS X <= 10.8 that caused np.fromfile to
+          fail. (astropy/astropy#3078)
+        
+        - Added support for the ``RICE_ONE`` compression type synonym.
+          (astropy/astropy#3115)
+        
+        - Fixed the problem in ``pyfits.open`` of some filenames with colon (``:``)
+          in the name being recognized as URLs instead of file names.
+          (astropy/astropy#3122)
+        
+        - Setting ``memmap=True`` in ``fits.open`` and related functions now raises
+          a ValueError if opening a file in memory-mapped mode is impossible.
+          (astropy/astropy#2298)
+        
+        - CONTINUE cards no longer end the value of the final card in the series
+          with an ampersand, per the specification of the CONTINUE card convention.
+          (astropy/astropy#3282)
+        
+        - Fixed a crash that occurred when reading an ASCII table containing
+          zero-precision floating point fields. (astropy/astropy#3422)
+        
+        - When a float field for an ASCII table has zero-precision a decimal point
+          (with no digits following it) is still written to the field as long as
+          there is space for it, as recommended by the FITS standard.  This makes it
+          less ambiguous that these columns should be interpreted as floats.
+          (astropy/astropy#3422)
+        
+        - Fixed a severe memory leak that occurred when reading tile compressed
+          images. (astropy/astropy#3680)
+        
+        - Fixed bug where column data could be unintentionally byte-swapped when
+          copying data from an existing FITS file to a new FITS table with a TDIMn
+          keyword for that column. (astropy/astropy#3561)
+        
+        - The ``ColDefs.change_attrib``, ``ColDefs.change_name``, and
+          ``ColDefs.change_unit`` methods now work as advertised.  It is also
+          possible (and preferable) to update attributes directly on ``Column``
+          objects (for example setting ``column.name``), and the change will be
+          accurately reflected in any associated table data and its FITS header.
+          (astropy/astropy#3283)
+        
+        - Fixes an issue with the ``FITS_rec`` interface to FITS table data, where a
+          ``FITS_rec`` created by copying an existing FITS table but adding new rows
+          could not be sliced or masked correctly.  (astropy/astropy#3641)
+        
+        - Fixed handling of BINTABLE with TDIMn of size 1. (astropy/astropy#3580)
+        
+        - Fixes to support Numpy 1.10. (astropy/astropy#3419)
+        
+        - Fixed crash when updating data in a random groups HDU opened in update
+          mode. (astropy/astropy#3730)
+        
+        - Fixed incorrect checksum / datasum being written when re-writing a scaled
+          HDU (i.e. non-trivial BSCALE and/or BZERO) with
+          ``do_not_scale_image_data=False``. (astropy/astropy#3883)
+        
+        - Fixed stray deprecation warning in ``BinTableHDU.copy()``. (astropy/astropy#3789)
+        
+        - Better handling of the ``BLANK`` keyword when auto-scaling scaled image
+          data.  The ``BLANK`` keyword is now removed from the header after
+          auto-scaling is applied, and it is restored properly (with floating point
+          NaNs replaced by the filler value) when updating a file opened with the
+          ``scale_back=True`` argument.  Invalid usage of the ``BLANK`` keyword is
+          also better warned about during validation. (astropy/astropy#3865)
+        
+        - Reading memmaped scaled images won't fail when
+          ``do_not_scale_image_data=True`` (that is, since we're just reading the
+          raw / physical data there is no reason mmap can't be used).
+          (astropy/astropy#3766)
+        
+        - Fixed a reference cycle that could sometimes cause FITS table-related
+          objects (``BinTableHDU``, ``ColDefs``, etc.) to hang around in memory
+          longer than expected. (astropy/astropy#4012)
+        
+        - Fix bug when extending one header (without comments) with another (with
+          comments). (astropy/astropy#3967)
+        
+        - Somewhat improved resource usage for FITS data--previously a new ``mmap``
+          was opened for each HDU of a FITS file accessed through an ``HDUList``.
+          Each ``mmap`` used up a single file descriptor, causing problems with
+          system resource limits for some users.  Now only a single ``mmap`` is
+          opened, and shared for the data of all HDUs.  Note: The problem still
+          persists with using the "convenience" functions.  For example using
+          ``fits.getdata`` will create one ``mmap`` per HDU read this way (as
+          opposed to opening the file with ``fits.open`` and accessing the HDUs
+          through the ``HDUList`` object). (astropy/astropy#4097)
+        
+        - Fix bug where reading a file without a newline failed with an unrelated /
+          unhelpful exception. (astropy/astropy#4160)
+        
+        - ``fitsdiff`` and related functions now do a better job reporting
+          differences between values that are different types but have the same
+          representation (ex: the string '0' versus the number 0).
+          (astropy/astropy#4122)
+        
+        - Miscellaneous fixes for supporting Numpy 1.10. (astropy/astropy#4228)
+        
+        - Fixed an issue where writing a column of unicode strings to a FITS table
+          resulted in a quadrupling of size of the column (i.e. the format of the
+          FITS column was 4 characters for every one in the original strings).
+          (astropy/astropy#4228)
+        
+        - Added support for an obscure case (but nonetheless allowed by the FITS
+          standard) where a column has some TDIMn keyword, but a repeat count in the
+          TFORMn column greater than the number of elements implied by the TDIMn.
+          For example TFORMn = 100I, but TDIMn = '(5,5)'.  In this case the TDIMn
+          implies 5x5 arrays in the column, but the TFORMn implies a 100 element 1-D
+          array in the column.  In this case the TDIM takes precedence, and the
+          remaining bytes in the column are ignored. (astropy/astropy#4228)
+        
+        - Fixed a regression that could cause writes of large FITS files to be
+          truncated. (astropy/astropy#4307)
+        
+        - Fixed possible segfault during error handling in FITS tile compression.
+          (astropy/astropy#4489)
+        
+        - Fixed crash on pickling of binary table columns with the 'X', 'P', or
+          'Q' format. (astropy/astropy#4514)
+        
+        - Fixed memory / reference leak that could occur when copying a ``FITS_rec``
+          object (the ``.data`` for table HDUs). (astropy/astropy#520)
+        
+        - Fixed a memory / reference leak in ``FITS_rec`` that occurred in a wide
+          range of cases, especially after writing FITS tables to a file, but in
+          other cases as well. (astropy/astropy#4539)
+        
+        
... 18496 lines suppressed ...

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pyfits.git



More information about the Python-modules-commits mailing list