astropy v4.0.2 Release Notes
Release Date: 2020-10-10 // over 3 years ago-
๐ New Features
astropy.utils ^
๐
astropy.utils.data.download_file
now supports FTPS/FTP over TLS. [#9964]๐
astropy.utils.data
now uses a lock-free mechanism for caching. This new mechanism uses a new cache layout and so ignores caches created using earlier mechanisms (which were causing lockups on clusters). The two cache formats can coexist but do not share any files. [#10437]astropy.utils.data
now ignores the config itemastropy.utils.data.conf.download_cache_lock_attempts
since no locking is done. [#10437]astropy.utils.data.download_file
and related functions now interpret the parameter or config file settingtimeout=0
to mean they should make no attempt to download files. [#10437]astropy.utils.import_file_to_cache
now accepts a keyword-only argumentreplace
, defaulting to True, to determine whether it should replace existing files in the cache, in a way as close to atomic as possible. [#10437]astropy.utils.data.download_file
and related functions now treathttp://example.com
andhttp://example.com/
as equivalent. [#10631]
astropy.wcs ^
The new auxiliary WCS parameters added in WCSLIB 7.1 are now exposed as the
aux
attribute ofWcsprm
. [#10333]โก๏ธ Updated bundled version of
WCSLIB
to v7.3. [#10433]
๐ Bug fixes
astropy.config ^
- โ Added an extra fallback to
os.expanduser('~')
when trying to find the user home directory. [#10570]
astropy.constants
- ๐ Corrected definition of parsec to 648 000 / pi AU following IAU 2015 B2 [#10569]
astropy.convolution
- ๐ Fixed a bug where a float-typed integers in the argument
x_range
ofastropy.convolution.utils.discretize_oversample_1D
(and the 2D version as well) fails because it usesnumpy.linspace
, which requires anint
. [#10696]
astropy.coordinates
Ensure that for size-1 array
SkyCoord
and coordinate frames the attributes also properly become scalars when indexed with 0. [#10113]๐ Fixed a bug where
SkyCoord.separation()
andSkyCoord.separation_3d
were not accepting a frame object. [#10332]Ensure that the
lon
values inSkyOffsetFrame
are wrapped correctly at 180 degree regardless of how the underlying data is represented. [#10163]๐ Fixed an error in the obliquity of the ecliptic when transforming to/from the
*TrueEcliptic
coordinate frames. The error would primarily result in an inaccuracy in the ecliptic latitude on the order of arcseconds. [#10129]๐ Fixed an error in the computation of the location of solar system bodies where the Earth location of the observer was ignored during the correction for light travel time. [#10292]
Ensure that coordinates with proper motion that are transformed to other coordinate frames still can be represented properly. [#10276]
๐ Improve the error message given when trying to get a cartesian representation for coordinates that have both proper motion and radial velocity, but no distance. [#10276]
Fixed an error where
SkyCoord.apply_space_motion
would return incorrect results when no distance is set and proper motion is high. [#10296]๐ Make the parsing of angles thread-safe so that
Angle
can be used in Python multithreading. [#10556]๐ Fixed reporting of
EarthLocation.info
which previously raised an exception. [#10592]
astropy.cosmology
astropy.extern ^
astropy.io.ascii ^
- ๐ Fixed a bug with the C
fast_reader
not correctly parsing newlines whendelimiter
was also set to\n
or\r
; ensured consistent handling of input strings without newline characters. [#9929]
astropy.io.fits ^
๐ Fix integer formats of
TFORMn=Iw
columns in ASCII tables to correctly read values exceeding int32 - setting int16, int32 or int64 according tow
. [#9901]๐ Fix unclosed memory-mapped FITS files in
FITSDiff
when difference found. [#10159]๐ Fix crash when reading an invalid table file. [#10171]
๐ Fix duplication issue when setting a keyword ending with space. [#10482]
๐ Fix ResourceWarning with
fits.writeto
andpathlib.Path
object. [#10599]๐ Fix repr for commentary cards and strip spaces for commentary keywords. [#10640]
๐ Fix compilation of cfitsio with Xcode 12. [#10772]
๐ Fix handling of 1-dimensional arrays with a single element in
BinTableHDU
[#10768]
astropy.io.misc ^
๐ Fix id URL in
baseframe-1.0.0
ASDF schema. [#10223]Write keys to ASDF only if the value is present, to account for a change in behavior in asdf 2.8. [#10674]
astropy.io.registry
- ๐ Fix
Table.(read|write).help
when reader or writer has no docstring. [#10460]
astropy.io.votable
- ๐ Fixed parsing failure of VOTable with no fields. When detecting a non-empty table with no fields, the following warning/exception is issued: E25 "No FIELDs are defined; DATA section will be ignored." [#10192]
astropy.modeling ^
Fixed a problem with mapping
input_units
andreturn_units
of aCompoundModel
to the units of the constituent models. [#10158]โ Removed hard-coded names of inputs and outputs. [#10174]
๐ Fixed a problem where slicing a
CompoundModel
by name will crash if therefix_inputs
operators are present. [#10224]โ Removed a limitation of fitting of data with units with compound models without units when the expression involves operators other than addition and subtraction. [#10415]
๐ Fixed a problem with fitting
Linear1D
andPlanar2D
in model sets. [#10623]๐ Fixed reported module name of
math_functions
model classes. [#10694]๐ Fixed reported module name of
tabular
model classes. [#10709]Do not create new
math_functions
models for ufuncs that are only aliases (divide and mod). [#10697]๐ Fix calculation of the
Moffat2D
derivative with respect to gamma. [#10784]
astropy.nddata ^
astropy.samp ^
astropy.stats ^
Fixed an API regression where
SigmaClip.__call__
would convert masked elements tonan
and upcast the dtype tofloat64
in its outputMaskedArray
when using theaxis
parameter along with the defaultsmasked=True
andcopy=True
. [#10610]๐ Fixed an issue where fully masked
MaskedArray
input tosigma_clipped_stats
gave incorrect results. [#10099]Fixed an issue where
sigma_clip
andSigmaClip.__call__
would return a masked array instead of andarray
whenmasked=False
and the input was a full-maskedMaskedArray
. [#10099]Fixed bug with
funcs.poisson_conf_interval
where an integer for N withinterval='kraft-burrows-nousek'
would throw an error with mpmath backend. [#10427]Fixed bug in
funcs.poisson_conf_interval
withinterval='kraft-burrows-nousek'
where certain combinations of source and background count numbers led toValueError
due to the choice of starting value for numerical optimization. [#10618]
astropy.table ^
๐ Fixed a bug when writing a table with mixin columns to FITS, ECSV or HDF5. If one of the data attributes of the mixin (e.g.
skycoord.ra
) had the same name as one of the table column names (ra
), the column (ra
) would be dropped when reading the table back. [#10222]๐ Fixed a bug when sorting an indexed table on the indexed column after first sorting on another column. [#10103]
๐ Fixed a bug in table argsort when called with
reverse=True
for an indexed table. [#10103]๐ Fixed a performance regression introduced in #9048 when initializing a table from Python lists. Also fixed incorrect behavior (for data types other than float) when those lists contain
np.ma.masked
elements to indicate masked data. [#10636]Avoid modifying
.meta
when serializing columns to FITS. [#10485]Avoid crash when reading a FITS table that contains mixin info and PyYAML is missing. [#10485]
โ astropy.tests ^
astropy.time ^
- Ensure that for size-1 array
Time
, the location also properly becomes a scalar when indexed with 0. [#10113]
astropy.timeseries
astropy.uncertainty
astropy.units ^
- โ Refined test_parallax to resolve difference between 2012 and 2015 definitions. [#10569]
astropy.utils ^
โก๏ธ The default IERS server has been updated to use the FTPS server hosted by CDDIS. [#9964]
๐ Fixed memory allocation on 64-bit systems within
xml.iterparse
[#10076]๐ Fix case where
None
could be used in a numerical computation. [#10126]
astropy.visualization
๐ Fixed a bug where the
ImageNormalize
clip
keyword was ignored when used with calling the object on data. [#10098]๐ Fixed a bug where
axes.xlabel
/axes.ylabel
where not correctly set nor returned on anEllipticalFrame
classWCSAxes
plot. [#10446]
astropy.wcs ^
Handled WCS 360 -> 0 deg crossover in
fit_wcs_from_points
[#10155]โ Do not issue
DATREF
warning whenMJDREF
has default value. [#10440]๐ Fixed a bug due to which
naxis
argument was ignored ifheader
was supplied during the initialization of a WCS object. [#10532]
Other Changes and Additions
๐ Improved the speed of sorting a large
Table
on a single column by a factor of around 5. [#10103]Ensure that astropy can be used inside Application bundles built with pyinstaller. [#8795]
โก๏ธ Updated the bundled CFITSIO library to 3.49. See
cextern/cfitsio/docs/changes.txt
for additional information. [#10256, #10665]extract_array
raises aValueError
if the data type of the input array is inconsistent with thefill_value
. [#10602]