~ubuntu-branches/ubuntu/wily/pyfits/wily-proposed

« back to all changes in this revision

Viewing changes to CHANGES.txt

  • Committer: Package Import Robot
  • Author(s): Aurelien Jarno
  • Date: 2012-12-30 15:03:07 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20121230150307-ltycp0zrtyh53gd8
Tags: 1:3.1-1
* New upstream version.
  - Refreshed 01-zlib.diff.
  - Added 02-disable-version-setup-hook.diff to prevent version.py to
    be regenerated with a timestamp at clean time.
* Compress source and .deb with xz.
* Bump Standards-Version to 3.9.4.0 (no changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
Changelog
2
2
===========
3
3
 
 
4
3.1 (2012-08-08)
 
5
----------------
 
6
 
 
7
Highlights
 
8
^^^^^^^^^^
 
9
 
 
10
- The ``Header`` object has been significantly reworked, and ``CardList``
 
11
  objects are now deprecated (their functionality folded into the ``Header``
 
12
  class).  See API Changes below for more details.
 
13
 
 
14
- Memory maps are now used by default to access HDU data.  See API Changes
 
15
  below for more details.
 
16
 
 
17
- Now includes a new version of the ``fitsdiff`` program for comparing two
 
18
  FITS files, and a new FITS comparison API used by ``fitsdiff``.  See New
 
19
  Features below.
 
20
 
 
21
API Changes
 
22
^^^^^^^^^^^
 
23
 
 
24
- The ``Header`` class has been rewritten, and the ``CardList`` class is
 
25
  deprecated.  Most of the basic details of working with FITS headers are
 
26
  unchanged, and will not be noticed by most users.  But there are differences
 
27
  in some areas that will be of interest to advanced users, and to application
 
28
  developers.  For full details of the changes, see the "Header Interface
 
29
  Transition Guide" section in the PyFITS documentation.  See ticket #64 on
 
30
  the PyFITS Trac for futher details and background. Some highlights are
 
31
  listed below:
 
32
 
 
33
  * The Header class now fully implements the Python dict interface, and can
 
34
    be used interchangably with a dict, where the keys are header keywords.
 
35
 
 
36
  * New keywords can be added to the header using normal keyword assignment
 
37
    (previously it was necessary to use ``Header.update`` to add new
 
38
    keywords).  For example::
 
39
 
 
40
        >>> header['NAXIS'] = 2
 
41
 
 
42
    will update the existing 'FOO' keyword if it already exists, or add a new
 
43
    one if it doesn't exist, just like a dict.
 
44
 
 
45
  * It is possible to assign both a value and a comment at the same time using
 
46
    a tuple::
 
47
 
 
48
        >>> header['NAXIS'] = (2, 'Number of axes')
 
49
 
 
50
  * To add/update a new card and ensure it's added in a specific location, use
 
51
    ``Header.set()``::
 
52
 
 
53
        >>> header.set('NAXIS', 2, 'Number of axes', after='BITPIX')
 
54
 
 
55
    This works the same as the old ``Header.update()``.  ``Header.update()``
 
56
    still works in the old way too, but is deprecated.
 
57
 
 
58
  * Although ``Card`` objects still exist, it generally is not necessary to
 
59
    work with them directly.  ``Header.ascardlist()``/``Header.ascard`` are
 
60
    deprecated and should not be used.  To directly access the ``Card``
 
61
    objects in a header, use ``Header.cards``.
 
62
 
 
63
  * To access card comments, it is still possible to either go through the
 
64
    card itself, or through ``Header.comments``.  For example::
 
65
 
 
66
       >>> header.cards['NAXIS'].comment
 
67
       Number of axes
 
68
       >>> header.comments['NAXIS']
 
69
       Number of axes
 
70
 
 
71
  * ``Card`` objects can now be used interchangeably with
 
72
    ``(keyword, value, comment)`` 3-tuples.  They still have ``.value`` and
 
73
    ``.comment`` attributes as well.  The ``.key`` attribute has been renamed
 
74
    to ``.keyword`` for consistency, though ``.key`` is still supported (but
 
75
    deprecated).
 
76
 
 
77
- Memory mapping is now used by default to access HDU data.  That is,
 
78
  ``pyfits.open()`` uses ``memmap=True`` as the default.  This provides better
 
79
  performance in the majority of use cases--there are only some I/O intensive
 
80
  applications where it might not be desirable.  Enabling mmap by default also
 
81
  enabled finding and fixing a large number of bugs in PyFITS' handling of
 
82
  memory-mapped data (most of these bug fixes were backported to PyFITS
 
83
  3.0.5). (#85)
 
84
 
 
85
  * A new ``pyfits.USE_MEMMAP`` global variable was added.  Set
 
86
    ``pyfits.USE_MEMMAP = False`` to change the default memmap setting for
 
87
    opening files.  This is especially useful for controlling the behavior in
 
88
    applications where pyfits is deeply embedded.
 
89
 
 
90
  * Likewise, a new ``PYFITS_USE_MEMMAP`` environment variable is supported.
 
91
    Set ``PYFITS_USE_MEMMAP = 0`` in your environment to change the default
 
92
    behavior.
 
93
 
 
94
- The ``size()`` method on HDU objects is now a ``.size`` property--this
 
95
  returns the size in bytes of the data portion of the HDU, and in most cases
 
96
  is equivalent to ``hdu.data.nbytes`` (#83)
 
97
 
 
98
- ``BinTableHDU.tdump`` and ``BinTableHDU.tcreate`` are deprecated--use
 
99
  ``BinTableHDU.dump`` and ``BinTableHDU.load`` instead.  The new methods
 
100
  output the table data in a slightly different format from previous versions,
 
101
  which places quotes around each value.  This format is compatible with data
 
102
  dumps from previous versions of PyFITS, but not vice-versa due to a parsing
 
103
  bug in older versions.
 
104
 
 
105
- Likewise the ``pyfits.tdump`` and ``pyfits.tcreate`` convenience function
 
106
  versions of these methods have been renamed ``pyfits.tabledump`` and
 
107
  ``pyfits.tableload``.  The old deprecated, but currently retained for
 
108
  backwards compatibility. (r1125)
 
109
 
 
110
- A new global variable ``pyfits.EXTENSION_NAME_CASE_SENSITIVE`` was added.
 
111
  This serves as a replacement for ``pyfits.setExtensionNameCaseSensitive``
 
112
  which is not deprecated and may be removed in a future version.  To enable
 
113
  case-sensitivity of extension names (i.e. treat 'sci' as distict from 'SCI')
 
114
  set ``pyfits.EXTENSION_NAME_CASE_SENSITIVE = True``.  The default is
 
115
  ``False``. (r1139)
 
116
 
 
117
- A new global configuration variable ``pyfits.STRIP_HEADER_WHITESPACE`` was
 
118
  added.  By default, if a string value in a header contains trailing
 
119
  whitespace, that whitespace is automatically removed when the value is read.
 
120
  Now if you set ``pyfits.STRIP_HEADER_WHITESPACE = False`` all whitespace is
 
121
  preserved. (#146)
 
122
 
 
123
- The old ``classExtensions`` extension mechanism (which was deprecated in
 
124
  PyFITS 3.0) is removed outright.  To our knowledge it was no longer used
 
125
  anywhere. (r1309)
 
126
 
 
127
- Warning messages from PyFITS issued through the Python warnings API are now
 
128
  output to stderr instead of stdout, as is the default.  PyFITS no longer
 
129
  modifies the default behavior of the warnings module with respect to which
 
130
  stream it outputs to. (r1319)
 
131
 
 
132
- The ``checksum`` argument to ``pyfits.open()`` now accepts a value of
 
133
  'remove', which causes any existing CHECKSUM/DATASUM keywords to be ignored,
 
134
  and removed when the file is saved.
 
135
 
 
136
New Features
 
137
^^^^^^^^^^^^
 
138
 
 
139
- Added support for the proposed "FITS" extension HDU type.  See
 
140
  http://listmgr.cv.nrao.edu/pipermail/fitsbits/2002-April/001094.html.  FITS
 
141
  HDUs contain an entire FITS file embedded in their data section.  `FitsHDU`
 
142
  objects work like other HDU types in PyFITS.  Their ``.data`` attribute
 
143
  returns the raw data array.  However, they have a special ``.hdulist``
 
144
  attribute which processes the data as a FITS file and returns it as an
 
145
  in-memory HDUList object.  FitsHDU objects also support a
 
146
  ``FitsHDU.fromhdulist()`` classmethod which returns a new `FitsHDU` object
 
147
  that embeds the supplied HDUList. (#80)
 
148
 
 
149
- Added a new ``.is_image`` attribute on HDU objects, which is True if the HDU
 
150
  data is an 'image' as opposed to a table or something else.  Here the
 
151
  meaning of 'image' is fairly loose, and mostly just means a Primary or Image
 
152
  extension HDU, or possibly a compressed image HDU (#71)
 
153
 
 
154
- Added an ``HDUList.fromstring`` classmethod which can parse a FITS file
 
155
  already in memory and instantiate and ``HDUList`` object from it.  This
 
156
  could be useful for integrating PyFITS with other libraries that work on
 
157
  FITS file, such as CFITSIO.  It may also be useful in streaming
 
158
  applications.  The name is a slight misnomer, in that it actually accepts
 
159
  any Python object that implements the buffer interface, which includes
 
160
  ``bytes``, ``bytearray``, ``memoryview``, ``numpy.ndarray``, etc. (#90)
 
161
 
 
162
- Added a new ``pyfits.diff`` module which contains facilities for comparing
 
163
  FITS files.  One can use the ``pyfits.diff.FITSDiff`` class to compare two
 
164
  FITS files in their entirety.  There is also a ``pyfits.diff.HeaderDiff``
 
165
  class for just comparing two FITS headers, and other similar interfaces.
 
166
  See the PyFITS Documentation for more details on this interface.  The
 
167
  ``pyfits.diff`` module powers the new ``fitsdiff`` program installed with
 
168
  PyFITS.  After installing PyFITS, run ``fitsdiff --help`` for usage details.
 
169
 
 
170
- ``pyfits.open()`` now accepts a ``scale_back`` argument.  If set to
 
171
  ``True``, this automatically scales the data using the original BZERO and
 
172
  BSCALE parameters the file had when it was first opened, if any, as well as
 
173
  the original BITPIX.  For example, if the original BITPIX were 16, this
 
174
  would be equivalent to calling ``hdu.scale('int16', 'old')`` just before
 
175
  calling ``flush()`` or ``close()`` on the file.  This option applies to all
 
176
  HDUs in the file. (#120)
 
177
 
 
178
- ``pyfits.open()`` now accepts a ``save_backup`` argument.  If set to
 
179
  ``True``, this automatically saves a backup of the original file before
 
180
  flushing any changes to it (this of course only applies to update and append
 
181
  mode).  This may be especially useful when working with scaled image data.
 
182
  (#121)
 
183
 
 
184
Changes in Behavior
 
185
^^^^^^^^^^^^^^^^^^^
 
186
 
 
187
- Warnings from PyFITS are not output to stderr by default, instead of stdout
 
188
  as it has been for some time.  This is contrary to most users' expectations
 
189
  and makes it more difficult for them to separate output from PyFITS from the
 
190
  desired output for their scripts. (r1319)
 
191
 
 
192
Bug Fixes
 
193
^^^^^^^^^
 
194
 
 
195
- Fixed ``pyfits.tcreate()`` (now ``pyfits.tableload()``) to be more robust
 
196
  when encountering blank lines in a column definition file (#14)
 
197
 
 
198
- Fixed a fairly rare crash that could occur in the handling of CONTINUE cards
 
199
  when using Numpy 1.4 or lower (though 1.4 is the oldest version supported by
 
200
  PyFITS). (r1330)
 
201
 
 
202
- Fixed ``_BaseHDU.fromstring`` to actually correctly instantiate an HDU
 
203
  object from a string/buffer containing the header and data of that HDU.
 
204
  This allowed for the implementation of ``HDUList.fromstring`` described
 
205
  above. (#90)
 
206
 
 
207
- Fixed a rare corner case where, in some use cases, (mildly, recoverably)
 
208
  malformatted float values in headers were not properly returned as floats.
 
209
  (#137)
 
210
 
 
211
- Fixed a corollary to the previous bug where float values with a leading zero
 
212
  before the decimal point had the leading zero unnecessarily removed when
 
213
  saving changes to the file (eg. "0.001" would be written back as ".001" even
 
214
  if no changes were otherwise made to the file). (#137)
 
215
 
 
216
- When opening a file containing CHECKSUM and/or DATASUM keywords in update
 
217
  mode, the CHECKSUM/DATASUM are updated and preserved even if the file was
 
218
  opened with checksum=False.  This change in behavior prevents checksums from
 
219
  being unintentionally removed. (#148)
 
220
 
 
221
- Fixed a bug where ``ImageHDU.scale(option='old')`` wasn't working at all--it
 
222
  was not restoring the image to its original BSCALE and BZERO values. (#162)
 
223
 
 
224
- Fixed a bug when writing out files containing zero-width table columns,
 
225
  where the TFIELDS keyword would be updated incorrectly, leaving the table
 
226
  largely unreadable.  This fix will be backported to the 3.0.x series in
 
227
  version 3.0.10.  (#174)
 
228
 
 
229
 
 
230
3.0.9 (2012-08-06)
 
231
------------------
 
232
 
 
233
This is a bug fix release for the 3.0.x series.
 
234
 
 
235
Bug Fixes
 
236
^^^^^^^^^
 
237
 
 
238
- Fixed ``Header.values()``/``Header.itervalues()`` and ``Header.items()``/
 
239
  ``Header.iteritems()`` to correctly return the different values for
 
240
  duplicate keywords (particularly commentary keywords like HISTORY and
 
241
  COMMENT).  This makes the old Header implementation slightly more compatible
 
242
  with the new implementation in PyFITS 3.1. (#127)
 
243
 
 
244
  .. note::
 
245
      This fix did not change the existing behavior from earlier PyFITS
 
246
      versions where ``Header.keys()`` returns all keywords in the header with
 
247
      duplicates removed.  PyFITS 3.1 changes that behavior, so that
 
248
      ``Header.keys()`` includes duplicates.
 
249
 
 
250
- Fixed a bug where ``ImageHDU.scale(option='old')`` wasn't working at all--it
 
251
  was not restoring the image to its original BSCALE and BZERO values. (#162)
 
252
 
 
253
- Fixed a bug where opening a file containing compressed image HDUs in
 
254
  'update' mode and then immediately closing it without making any changes
 
255
  caused the file to be rewritten unncessarily. (#167)
 
256
 
 
257
- Fixed two memory leaks that could occur when writing compressed image data,
 
258
  or in some cases when opening files containing compressed image HDUs in
 
259
  'update' mode. (#168)
 
260
 
 
261
 
4
262
3.0.8 (2012-06-04)
5
 
------------------
 
263
---------------------
6
264
 
7
265
Changes in Behavior
8
 
+++++++++++++++++++
 
266
^^^^^^^^^^^^^^^^^^^
9
267
 
10
268
- Prior to this release, image data sections did not work with scaled
11
269
  data--that is, images with non-trivial BSCALE and/or BZERO values.
15
273
  extends that support for general BSCALE+BZERO values.
16
274
 
17
275
Bug Fixes
18
 
+++++++++
 
276
^^^^^^^^^
19
277
 
20
278
- Fixed a bug that prevented updates to values in boolean table columns from
21
279
  being saved.  This turned out to be a symptom of a deeper problem that could
56
314
 
57
315
 
58
316
3.0.7 (2012-04-10)
59
 
------------------
 
317
----------------------
60
318
 
61
319
Changes in Behavior
62
 
+++++++++++++++++++
 
320
^^^^^^^^^^^^^^^^^^^
63
321
 
64
322
- Slices of GroupData objects now return new GroupData objects instead of
65
323
  extended multi-row _Group objects. This is analogous to how PyFITS 3.0 fixed
78
336
  HDUs.  It was unnecessary to modify this value.
79
337
 
80
338
Bug Fixes
81
 
+++++++++
 
339
^^^^^^^^^
82
340
 
83
341
- Fixed GroupData objects to return new GroupData objects when sliced instead
84
342
  of _Group record objects.  See "Changes in behavior" above for more details.
116
374
------------------
117
375
 
118
376
Highlights
119
 
++++++++++
 
377
^^^^^^^^^^
120
378
 
121
379
The main reason for this release is to fix an issue that was introduced in
122
380
PyFITS 3.0.5 where merely opening a file containing scaled data (that is, with
132
390
extensive Windows testing, and other miscellaneous bugs.
133
391
 
134
392
Bug Fixes
135
 
+++++++++
 
393
^^^^^^^^^
136
394
 
137
395
- More accurate error messages when opening files containing invalid header
138
396
  cards. (#109)
587
845
    >>> print table.field('c2') # this is the data for column 2
588
846
    ['abc' 'xy']
589
847
    >>> print table['c2'] # this is also the data for column 2
590
 
    array(['abc', 'xy '],
591
 
    dtype='|S3')
 
848
    array(['abc', 'xy '], dtype='\|S3')
592
849
    >>> print table[1] # this is the data for row 1
593
850
    (2, 'xy', 6.6999997138977054, True)
594
851
 
1950
2207
 
1951
2208
 
1952
2209
0.7.6 (2002-11-22)
 
2210
------------------
1953
2211
 
1954
2212
**NOTE:** This version will only work with numarray Version 0.4.
1955
2213