astropy.config
Fixed a bug where an unedited configuration file from astropy 0.3.2 would not be correctly identified as unedited. [#2772] This resulted in the warning:
WARNING: ConfigurationChangedWarning: The configuration options
in astropy 0.4 may have changed, your configuration file was not
updated in order to preserve local changes. A new configuration
template has been saved to
'~/.astropy/config/astropy.0.4.cfg'. [astropy.config.configuration]
Fixed the error message that is displayed when an old configuration item has moved. Before, the destination section was wrong. [#2772]
Added configuration settings for io.fits, io.votable and table.jsviewer that were missing from the configuration file template. [#2772]
The configuration template is no longer rewritten on every import of astropy, causing race conditions. [#2805]
astropy.constants
astropy.convolution
astropy.coordinates
astropy.cosmology
astropy.io.ascii
astropy.io.fits
astropy.io.misc
astropy.io.registry
astropy.io.votable
astropy.logger
astropy.modeling
astropy.nddata
astropy.stats
astropy.table
astropy.time
astropy.units
astropy.utils
astropy.vo
astropy.wcs
astropy.config
astropy.io.fits
The astropy.io.fits.new_table function is now fully deprecated (though will not be removed for a long time, considering how widely it is used).
Instead please use the more explicit BinTableHDU.from_columns to create a new binary table HDU, and the similar TableHDU.from_columns to create a new ASCII table. These otherwise accept the same arguments as new_table which is now just a wrapper for these.
The .fromstring classmethod of each HDU type has been simplified such that, true to its namesake, it only initializes an HDU from a string containing its header and data.
Fixed an issue where header wildcard matching (for example header['DATE*']) can be used to match any characters that might appear in a keyword. Previously this only matched keywords containing characters in the set [0-9A-Za-z_]. Now this can also match a hyphen - and any other characters, as some conventions like HIERARCH and record-valued keyword cards allow a wider range of valid characters than standard FITS keywords.
This will be the last release to support the following APIs that have been marked deprecated since Astropy v0.1/PyFITS v3.1:
These deprecated interfaces will be removed from the development version of Astropy following the v0.4 release (they will still be available in any v0.4.x bugfix releases, however).
astropy.modeling
The method computing the derivative of the model with respect to parameters was renamed from deriv to fit_deriv. [#1739]
ParametricModel and the associated Parametric1DModel and Parametric2DModel classes have been renamed FittableModel, Fittable1DModel, and Fittable2DModel respectively. The base Model class has subsumed the functionality of the old
ParametricModel class so that all models support parameter constraints. The only distinction of FittableModel is that anything which subclasses it is assumed “safe” to use with Astropy fitters. [#2276]
NonLinearLSQFitter has been renamed LevMarLSQFitter to emphasise that it uses the Levenberg-Marquardt optimization algorithm with a least squares statistic function. [#1914]
The SLSQPFitter class has been renamed SLSQPLSQFitter to emphasize that it uses the Sequential Least Squares Programming optimization algorithm with a least squares statistic function. [#1914]
The Fitter.errorfunc method has been renamed to the more general Fitter.objective_function. [#1914]
astropy.nddata
astropy.sphinx
astropy.table
astropy.time
astropy.units
astropy.wcs
Misc
astropy.config
astropy.convolution
astropy.coordinates
astropy.io.ascii
astropy.io.fits
astropy.io.misc
astropy.io.votable
astropy.modeling
astropy.sphinx
astropy.table
astropy.time
astropy.units
astropy.utils
astropy.wcs
astropy.wcs.WCS, astropy.wcs.WCS.fix and astropy.wcs.find_all_wcs now have a translate_units keyword argument that is passed down to astropy.wcs.Wcsprm.fix. This can be used to specify any unsafe translations of units from rarely used ones to more commonly used ones.
Although "S" is commonly used to represent seconds, its translation to "s" is potentially unsafe since the standard recognizes "S" formally as Siemens, however rarely that may be used. The same applies to "H" for hours (Henry), and "D" for days (Debye).
When these sorts of changes are performed, a warning is emitted. [#1854]
When a unit is “fixed” by astropy.wcs.WCS.fix or astropy.wcs.Wcsprm.unitfix, it now correctly reports the CUNIT field that was changed. [#1854]
astropy.wcs.Wcs.printwcs will no longer warn that cdelt is being ignored when none was present in the FITS file. [#1845]
astropy.wcs.Wcsprm.set is called from within the astropy.wcs.WCS constructor, therefore any invalid information in the keywords will be raised from the constructor, rather than on a subsequent call to a transformation method. [#1918]
Fix a memory corruption bug when using astropy.wcs.Wcs.sub with astropy.wcs.WCSSUB_CELESTIAL. [#1960]
Fixed the AttributeError exception that was raised when using astropy.wcs.WCS.footprint_to_file. [#1912]
Fixed a NameError exception that was raised when using astropy.wcs.validate or the wcslint script. [#2053]
Fixed a bug where named WCSes may be erroneously reported as ' ' when using astropy.wcs.validate or the wcslint script. [#2053]
Fixed a bug where error messages about incorrect header keywords may not be propagated correctly, resulting in a “NULL error object in wcslib” message. [#2106]
Misc
General
A top-level configuration item, unicode_output has been added to control whether the Unicode string representation of certain objects will contain Unicode characters. For example, when use_unicode is False (default):
>>> from astropy import units as u
>>> print(unicode(u.degree))
deg
When use_unicode is True:
>>> from astropy import units as u
>>> print(unicode(u.degree))
°
See handling-unicode for more information. [#1441]
astropy.convolution
astropy.coordinates
astropy.cosmology
astropy.io.ascii
astropy.io.fits
astropy.io.votable
astropy.modeling
astropy.stats
astropy.table
astropy.time
astropy.units
astropy.vo
astropy.wcs
astropy.utils
astropy.extern.six
Astropy now uses the ERFA library instead of the IAU SOFA library for fundamental time transformation routines. The ERFA library is derived, with permission, from the IAU SOFA library but is distributed under a BSD license. See license/ERFA.rst for details. [#1293]
astropy.logger
General
astropy.coordinates
astropy.cosmology
astropy.io.ascii
astropy.io.fits
astropy.io.registry
astropy.io.votable
astropy.nddata
astropy.stats.funcs
astropy.table
astropy.time
astropy.units
astropy.wcs
For those including the astropy.wcs C headers in their project, they should now include it as:
#include “astropy_wcs/astropy_wcs_api.h”
instead of:
#include “astropy_wcs_api.h”
[#1631]
The --enable-legacy option for setup.py has been removed. [#1493]
This is a brief overview of the new features included in Astropy 0.2–please see the “What’s New” section of the documentation for more details.
astropy.coordinates
astropy.cosmology
astropy.table I/O infrastructure for custom readers/writers implemented. [#305]
New astropy.time sub-package. [#332]
New astropy.units sub-package that includes a class for units (astropy.units.Unit) and scalar quantities that have units (astropy.units.Quantity). [#370, #445]
This has the following effects on other sub-packages:
astropy.io.ascii
Generalized I/O infrastructure so that astropy.nddata can also have custom readers/writers [#659]
astropy.wcs