Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduled monthly dependency update for September #516

Merged
merged 12 commits into from
Sep 1, 2021

Conversation

pyup-bot
Copy link
Collaborator

@pyup-bot pyup-bot commented Sep 1, 2021

Update astropy from 4.0.2 to 4.3.1.

Changelog

4.3.1

==================

Bug Fixes
---------

astropy.io.fits
^^^^^^^^^^^^^^^

- In ``fits.io.getdata`` do not fall back to first non-primary extension when
user explicitly specifies an extension. [11860]

- Ensure multidimensional masked columns round-trip properly to FITS. [11911]

- Ensure masked times round-trip to FITS, even if multi-dimensional. [11913]

- Raise ``ValueError`` if an ``np.float32`` NaN/Inf value is assigned to a
header keyword. [11922]

astropy.modeling
^^^^^^^^^^^^^^^^

- Fixed bug in ``fix_inputs`` handling of bounding boxes. [11908]

astropy.table
^^^^^^^^^^^^^

- Fix an error when converting to pandas any ``Table`` subclass that
automatically adds a table index when the table is created. An example is a
binned ``TimeSeries`` table. [12018]

astropy.units
^^^^^^^^^^^^^

- Ensure that unpickling quantities and units in new sessions does not change
hashes and thus cause problems with (de)composition such as getting different
answers from the ``.si`` attribute. [11879]

- Fixed cannot import name imperial from astropy.units namespace. [11977]

astropy.utils
^^^^^^^^^^^^^

- Ensure any ``.info`` on ``Masked`` instances is propagated correctly when
viewing or slicing. As a consequence, ``MaskedQuantity`` can now be correctly
written to, e.g., ECSV format with ``serialize_method='data_mask'``. [11910]

4.3

================

New Features
------------

astropy.convolution
^^^^^^^^^^^^^^^^^^^

- Change padding sizes for ``fft_pad`` in ``convolve_fft`` from powers of
2 only to scipy-optimized numbers, applied separately to each dimension;
yielding some performance gains and avoiding potential large memory
impact for certain multi-dimensional inputs. [11533]

astropy.coordinates
^^^^^^^^^^^^^^^^^^^

- Adds the ability to create topocentric ``CIRS`` frames. Using these,
``AltAz`` calculations are now accurate down to the milli-arcsecond
level. [10994]

- Adds a direct transformation from ``ICRS`` to ``AltAz`` frames. This
provides a modest speedup of approximately 10 percent. [11079]

- Adds new ``WGS84GeodeticRepresentation``, ``WGS72GeodeticRepresentation``,
and ``GRS80GeodeticRepresentation``. These are mostly for use inside
``EarthLocation`` but can also be used to convert between geocentric
(cartesian) and different geodetic representations directly. [11086]

- ``SkyCoord.guess_from_table`` now also searches for differentials in the table.
In addition, multiple regex matches can be resolved when they are exact
component names, e.g. having both columns “dec” and “pm_dec” no longer errors
and will be included in the SkyCoord. [11417]

- All representations now have a ``transform`` method, which allows them to be
transformed by a 3x3 matrix in a Cartesian basis. By default, transformations
are routed through ``CartesianRepresentation``. ``SphericalRepresentation`` and
``PhysicssphericalRepresentation`` override this for speed and to prevent NaN
leakage from the distance to the angular components.
Also, the functions ``is_O3`` and ``is_rotation`` have been added to
``matrix_utities`` for checking whether a matrix is in the O(3) group or is a
rotation (proper or improper), respectively. [11444]

- Moved angle formatting and parsing utilities to
``astropy.coordinates.angle_formats``.
Added new functionality to ``astropy.coordinates.angle_utilities`` for
generating points on or in spherical surfaces, either randomly or on a grid. [11628]

- Added a new method to ``SkyCoord``, ``spherical_offsets_by()``, which is the
conceptual inverse of ``spherical_offsets_to()``: Given angular offsets in
longitude and latitude, this method returns a new coordinate with the offsets
applied. [11635]

- Refactor conversions between ``GCRS`` and ``CIRS,TETE`` for better accuracy
and substantially improved speed. [11069]

- Also refactor ``EarthLocation.get_gcrs`` for an increase in performance of
an order of magnitude, which enters as well in getting observed positions of
planets using ``get_body``. [11073]

- Refactored the usage of metaclasses in ``astropy.coordinates`` to instead use
``__init_subclass__`` where possible. [11090]

- Removed duplicate calls to transform_to from match_to_catalog_sky
and match_to_catalog_3d, improving their performance. [11449]

- The new DE440 and DE440s ephemerides are now available via shortcuts 'de440'
and 'de440s'.  The DE 440s ephemeris will probably become the default
ephemeris when chosing 'jpl' in 5.0. [11601]

astropy.cosmology
^^^^^^^^^^^^^^^^^

- Cosmology parameter dictionaries now also specify the Cosmology class to which
the parameters correspond. For example, the dictionary for
``astropy.cosmology.parameters.Planck18`` has the added key-value pair
("cosmology", "FlatLambdaCDM"). [11530]

astropy.io.ascii
^^^^^^^^^^^^^^^^

- Added support for reading and writing ASCII tables in QDP (Quick and Dandy
Plotter) format. [11256]

- Added support for reading and writing multidimensional column data (masked and
unmasked) to ECSV. Also added formal support for reading and writing object-type
column data which can contain items consisting of lists, dicts, and basic scalar
types. This can be used to store columns of variable-length arrays. Both of
these features use JSON to convert the object to a string that is stored in the
ECSV output. [11569, 11662, 11720]

astropy.io.fits
^^^^^^^^^^^^^^^

- Added ``append`` keyword to append table objects to an existing FITS file [2632, 11149]

- Check that the SIMPLE card is present when opening a file, to ensure that the
file is a valid FITS file and raise a better error when opening a non FITS
one. ``ignore_missing_simple`` can be used to skip this verification. [10895]

- Expose ``Header.strip`` as a public method, to remove the most common
structural keywords. [11174]

- Enable the use of ``os.PathLike`` objects when dealing with (mainly FITS) files. [11580]

astropy.io.registry
^^^^^^^^^^^^^^^^^^^

- Readers and writers can now set a priority, to assist with resolving which
format to use. [11214]

astropy.io.votable
^^^^^^^^^^^^^^^^^^

- Version 1.4 VOTables now use the VOUnit format specification. [11032]

- When reading VOTables using the Unified File Read/Write Interface (i.e. using
the ``Table.read()`` or ``QTable.read()`` functions) it is now possible to
specify all keyword arguments that are valid for
``astropy.io.votable.table.parse()``. [11643]

astropy.modeling
^^^^^^^^^^^^^^^^

- Added a state attribute to models to allow preventing the synching of
constraint values from the constituent models. This synching can
greatly slow down fitting if there are large numbers of fit parameters.
model.sync_constraints = True means check constituent model constraints
for compound models every time the constraint is accessed, False, do not.
Fitters that support constraints will set this to False on the model copy
and then set back to True when the fit is complete before returning. [11365]

- The ``convolve_models_fft`` function implements model convolution so that one
insures that the convolution remains consistent across multiple different
inputs. [11456]

astropy.nddata
^^^^^^^^^^^^^^

- Prevent unnecessary copies of the data during ``NDData`` arithmetic when units
need to be added. [11107]

- NDData str representations now show units, if present. [11553]

astropy.stats
^^^^^^^^^^^^^

- Added the ability to specify stdfunc='mad_std' when doing sigma clipping,
which will use a built-in function and lead to significant performance
improvements if cenfunc is 'mean' or 'median'. [11664]


- Significantly improved the performance of sigma clipping when cenfunc and
stdfunc are passed as strings and the ``grow`` option is not used. [11219]

- Improved performance of ``bayesian_blocks()`` by removing one ``np.log()``
call [11356]

astropy.table
^^^^^^^^^^^^^

- Add table attributes to include or exclude columns from the output when
printing a table. This functionality includes a context manager to
include/exclude columns temporarily. [11190]

- Improved the string representation of objects related to ``Table.indices`` so
they now indicate the object type and relevant attributes. [11333]

astropy.timeseries
^^^^^^^^^^^^^^^^^^

- An exception is raised when ``n_bins`` is passed as an argument while
any of the parameters ``time_bin_start`` or ``time_bin_size`` is not
scalar. [11463]

astropy.units
^^^^^^^^^^^^^

- The ``physical_type`` attributes of each unit are now objects of the (new)
``astropy.units.physical.PhysicalType`` class instead of strings and the
function ``astropy.units.physical.get_physical_type`` can now translate
strings to these objects. [11204]

-  The function ``astropy.units.physical.def_physical_type`` was created to
either define entirely new physical types, or to add more physical type
names to an existing physical types. [11204]

- ``PhysicalType``'s can be operated on using operations multiplication,
division, and exponentiation are to facilitate dimensional analysis. [11204]

- It is now possible to define aliases for units using
``astropy.units.set_enabled_aliases``. This can be used when reading files
that have misspelled units. [11258]

- Add a new "DN" unit, ``units.dn`` or ``units.DN``, representing data number
for a detector. [11591]

astropy.utils
^^^^^^^^^^^^^

- Added ``ssl_context`` and ``allow_insecure`` options to ``download_file``,
as well as the ability to optionally use the ``certifi`` package to provide
root CA certificates when downloading from sites secured with
TLS/SSL. [10434]

- ``astropy.utils.data.get_pkg_data_path`` is publicly scoped (previously the
private function ``_find_pkg_data_path``) for obtaining file paths without
checking if the file/directory exists, as long as the package and module
do. [11006]

- Deprecated ``astropy.utils.OrderedDescriptor`` and
``astropy.utils.OrderedDescriptorContainer``, as new features in Python 3
make their use less compelling. [11094, 11099]

- ``astropy.utils.masked`` provides a new ``Masked`` class/factory that can be
used to represent masked ``ndarray`` and all its subclasses, including
``Quantity`` and its subclasses.  These classes can be used inside
coordinates, but the mask is not yet exposed.  Generally, the interface should
be considered experimental. [11127, 11792]

- Add new ``utils.parsing`` module to with helper wrappers around
``ply``. [11227]

- Change the Time and IERS leap second handling so that the leap second table is
updated only when a Time transform involving UTC is performed. Previously this
update check was done the first time a ``Time`` object was created, which in
practice occured when importing common astropy subpackages like
``astropy.coordinates``. Now you can prevent querying internet resources (for
instance on a cluster) by setting ``iers.conf.auto_download = False``. This
can  be done after importing astropy but prior to performing any ``Time``
scale transformations related to UTC. [11638]


- Added a new module at ``astropy.utils.compat.optional_deps`` to consolidate
the definition of ``HAS_x`` optional dependency flag variables,
like ``HAS_SCIPY``. [11490]

astropy.wcs
^^^^^^^^^^^

- Add IVOA UCD mappings for some FITS WCS keywords commonly used in solar
physics. [10965]

- Add ``STOKES`` FITS WCS keyword to the IVOA UCD mapping. [11236]

- Updated bundled version of WCSLIB to version 7.6. See
https://www.atnf.csiro.au/people/mcalabre/WCS/CHANGES for a list of
included changes. [11549]


API Changes
-----------

astropy.coordinates
^^^^^^^^^^^^^^^^^^^

- For input to representations, subclasses of the class required for a
given attribute will now be allowed in. [11113]

- Except for ``UnitSphericalRepresentation``, shortcuts in representations now
allow for attached differentials. [11467]

- Allow coordinate name strings as input to
``SkyCoord.is_transformable_to``. [11552]

astropy.cosmology
^^^^^^^^^^^^^^^^^

- Change ``z_at_value`` to use ``scipy.optimize.minimize_scalar`` with default
method ``Brent`` (other options ``Bounded`` and ``Golden``) and accept
``bracket`` option to set initial search region. [11080]

- Clarified definition of inputs to ``angular_diameter_distance_z1z2``.
The function now emits ``AstropyUserWarning`` when ``z2`` is less than
``z1``. [11197]

- Split cosmology realizations from core classes, moving the former to new file
``realizations``. [11345]

- Since cosmologies are immutable, the initialization signature and values can
be stored, greatly simplifying cloning logic and extending it to user-defined
cosmology classes that do not have attributes with the same name as each
initialization argument.  [11515]

- Cloning a cosmology with changed parameter(s) now appends "(modified)" to the
new instance's name, unless a name is explicitly passed to ``clone``. [11536]

- Allow ``m_nu`` to be input as any quantity-like or array-like -- Quantity,
array, float, str, etc. Input is passed to the Quantity constructor and
converted to eV, still with the prior mass-energy equivalence
enabled. [11640]

astropy.io.fits
^^^^^^^^^^^^^^^

- For conversion between FITS tables and astropy ``Table``, the standard mask
values of ``NaN`` for float and null string for string are now properly
recognized, leading to a ``MaskedColumn`` with appropriately set mask
instead of a ``Column`` with those values exposed. Conversely, when writing
an astropy ``Table`` to a FITS tables, masked values are now consistently
converted to the standard FITS mask values of ``NaN`` for float and null
string for string (i.e., not just for tables with ``masked=True``, which no
longer is guaranteed to signal the presence of ``MaskedColumn``). [11222]

astropy.io.votable
^^^^^^^^^^^^^^^^^^

- The use of ``version='1.0'`` is now fully deprecated in constructing
a ``astropy.io.votable.tree.VOTableFile``. [11659]

astropy.modeling
^^^^^^^^^^^^^^^^

- Removed deprecated ``astropy.modeling.blackbody`` module. [10972]

astropy.table
^^^^^^^^^^^^^

- Added ``Column.value`` as an alias for the existing ``Column.data`` attribute.
This makes accessing a column's underlying data array consistent with the
``.value`` attribute available for ``Time`` and ``Quantity`` objects. [10962]

- In reading from a FITS tables, the standard mask values of ``NaN`` for float
and null string for string are properly recognized, leading to a
``MaskedColumn`` with appropriately set mask. [11222]

- Changed the implementation of the ``table.index.Index`` class so instantiating
from this class now returns an ``Index`` object as expected instead of a
``SlicedIndex`` object. [11333]

astropy.units
^^^^^^^^^^^^^

- The ``physical_type`` attribute of units now returns an instance of
``astropy.units.physical.PhysicalType`` instead of a string.  Because
``PhysicalType`` instances can be compared to strings, no code changes
should be necessary when making comparisons.  The string representations
of different physical types will differ from previous releases. [11204]

- Calling ``Unit()`` with no argument now returns a dimensionless unit,
as was documented but not implemented. [11295]

astropy.utils
^^^^^^^^^^^^^

- Removed deprecated ``utils.misc.InheritDocstrings`` and ``utils.timer``. [10281]

- Removed usage of deprecated ``ipython`` stream in ``utils.console``. [10942]

astropy.wcs
^^^^^^^^^^^

- Deprecate ``accuracy`` argument in ``all_world2pix`` which was mistakenly
*documented*, in the case ``accuracy`` was ever used. [11055]


Bug Fixes
---------

astropy.convolution
^^^^^^^^^^^^^^^^^^^

- Fixes for ``convolve_fft`` documentation examples. [11510]

astropy.coordinates
^^^^^^^^^^^^^^^^^^^

- Allow ``Distance`` instances with negative distance values as input for
``SphericalRepresentation``.  This was always noted as allowed in an
exception message when a negative ``Quantity`` with length units was
passed in, but was not actually possible to do. [11113]

- Makes the ``Angle.to_string`` method to follow the format described in the
docstring with up to 8 significant decimals instead of 4. [11153]

- Ensure that proper motions can be calculated when converting a ``SkyCoord``
with cartesian representation to unit-spherical, by fixing the conversion of
``CartesianDifferential`` to ``UnitSphericalDifferential``. [11469]

- When re-representing coordinates from spherical to unit-spherical and vice
versa, the type of differential will now be preserved. For instance, if only a
radial velocity was present, that will remain the case (previously, a zero
proper motion component was added). [11482]

- Ensure that wrapping of ``Angle`` does not raise a warning even if ``nan`` are
present.  Also try to make sure that the result is within the wrapped range
even in the presence of rounding errors. [11568]

- Comparing a non-SkyCoord object to a ``SkyCoord`` using ``==`` no longer
raises an error. [11666]

- Different ``SkyOffsetFrame`` classes no longer interfere with each other,
causing difficult to debug problems with the ``origin`` attribute. The
``origin`` attribute now no longer is propagated, so while it remains
available on a ``SkyCoord`` that is an offset, it no longer is available once
that coordinate is transformed to another frame. [11730] [11730]

astropy.cosmology
^^^^^^^^^^^^^^^^^

- Cosmology instance names are now immutable. [11535]

astropy.io.ascii
^^^^^^^^^^^^^^^^

- Fixed bug where writing a table that has comments defined (via
``tbl.meta['comments']``) with the 'csv' format was failing. Since the
formally defined CSV format does not support comments, the comments are now
just ignored unless ``comment=<comment prefix>`` is supplied to the
``write()`` call. [11475]

- Fixed the issue where the CDS reader failed to treat columns
as nullable if the ReadMe file contains a limits specifier. [11531]

- Made sure that the CDS reader does not ignore an order specifier that
may be present after the null specifier '?'. Also made sure that it
checks null values only when an '=' symbol is present and reads
description text even if there is no whitespace after '?'. [11593]

astropy.io.fits
^^^^^^^^^^^^^^^

- Fix ``ColDefs.add_col/del_col`` to allow in-place addition or removal of
a column. [11338]

- Fix indexing of ``fits.Header`` with Numpy integers. [11387]

- Do not delete ``EXTNAME`` for compressed image header if a default and
non-default ``EXTNAME`` are present. [11396]

- Prevent warnings about ``HIERARCH`` with ``CompImageHeader`` class. [11404]

- Fixed regression introduced in Astropy 4.0.5 and 4.2.1 with verification of
FITS headers with HISTORY or COMMENT cards with long (> 72 characters)
values. [11487]

- Fix reading variable-length arrays when there is a gap between the data and the
heap. [11688]

astropy.io.votable
^^^^^^^^^^^^^^^^^^

- ``NumericArray`` converter now properly broadcasts scalar mask to array. [11157]

- VOTables are now written with the correct namespace and schema location
attributes. [11659]

astropy.modeling
^^^^^^^^^^^^^^^^

- Fixes the improper propagation of ``bounding_box`` from
``astropy.modeling.models`` to their inverses. For cases in which the inverses
``bounding_box`` can be determined, the proper calculation has been
implemented. [11414]

- Bugfix to allow rotation models to accept arbitrarily-shaped inputs. [11435]

- Bugfixes for ``astropy.modeling`` to allow ``fix_inputs`` to accept empty
dictionaries and dictionaries with ``numpy`` integer keys. [11443]

- Bugfix for how ``SPECIAL_OPERATORS`` are handled. [11512]

- Fixes ``Model`` crashes when some inputs are scalars and during some types of
output reshaping. [11548]

- Fixed bug in ``LevMarLSQFitter`` when using weights and vector inputs. [11603]

astropy.stats
^^^^^^^^^^^^^

- Fixed a bug with the ``copy=False`` option when carrying out sigma
clipping - previously if ``masked=False`` this still copied the data,
but this will now change the array in-place. [11219]

astropy.table
^^^^^^^^^^^^^

- Ensure that adding a ``Quantity`` or other mixin column to a ``Table``
does not have side effects, such as creating an associated ``info``
instance (which would lead to slow-down of, e.g., slicing afterwards). [11077]

- When writing to a FITS tables, masked values are again always converted to
the standard FITS mask values of ``NaN`` for float and null string
for string, not just for table with ``masked=True``. [11222]

- Using ``Table.to_pandas()`` on an indexed ``Table`` with masked integer values
now correctly construct the ``pandas.DataFrame``. [11432]

- Fixed ``Table`` HTML representation in Jupyter notebooks so that it is
horizontally scrollable within Visual Studio Code. This was done by wrapping
the ``<table>`` in a ``<div>`` element. [11476]

- Fix a bug where a string-valued ``Column`` that happened to have a ``unit``
attribute could not be added to a ``QTable``.  Such columns are now simply
kept as ``Column`` instances (with a warning). [11585]

- Fix an issue in ``Table.to_pandas(index=<colname>)`` where the index column name
was not being set properly for the ``DataFrame`` index. This was introduced by
an API change in pandas version 1.3.0. Previously when creating a ``DataFrame``
with the index set to an astropy ``Column``, the ``DataFrame`` index name was
automatically set to the column name. [11921]

astropy.time
^^^^^^^^^^^^

- Fix a thread-safety issue with initialization of the leap-second table
(which is only an issue when ERFA's built-in table is out of date). [11234]

- Fixed converting a zero-length time object from UTC to
UT1 when an empty array is passed. [11516]

astropy.uncertainty
^^^^^^^^^^^^^^^^^^^

- ``Distribution`` instances can now be used as input to ``Quantity`` to
initialize ``QuantityDistribution``.  Hence, ``distribution * unit``
and ``distribution << unit`` will work too. [11210]

astropy.units
^^^^^^^^^^^^^

- Move non-astronomy units from astrophys.py to a new misc.py file. [11142]

- The physical type of ``astropy.units.mol / astropy.units.m ** 3`` is now
defined as molar concentration.  It was previously incorrectly defined
as molar volume. [11204]

- Make ufunc helper lookup thread-safe. [11226]

- Make ``Unit`` string parsing (as well as ``Angle`` parsing) thread-safe. [11227]

- Decorator ``astropy.units.decorators.quantity_input`` now only evaluates
return type annotations based on ``UnitBase`` or ``FunctionUnitBase`` types.
Other annotations are skipped over and are not attempted to convert to the
correct type. [11506]

astropy.utils
^^^^^^^^^^^^^

- Make ``lazyproperty`` and ``classdecorator`` thread-safe. This should fix a
number of thread safety issues. [11224]

astropy.visualization
^^^^^^^^^^^^^^^^^^^^^

- Fixed a bug that resulted in some parts of grid lines being visible when they
should have been hidden. [11380]

- Fixed a bug that resulted in ``time_support()`` failing for intervals of
a few months if one of the ticks was the month December. [11615]

astropy.wcs
^^^^^^^^^^^

- ``fit_wcs_from_points`` now produces a WCS with integer ``NAXIXn``
values. [10865]

- Updated bundled version of ``WCSLIB`` to v7.4, fixing a bug that caused
the coefficients of the TPD distortion function to not be written to the
header. [11260]

- Fixed a bug in assigning type when converting ``colsel`` to
``numpy.ndarray``. [11431]

- Added ``WCSCOMPARE_*`` constants to the list of WCSLIB constants
available/exposed through the ``astropy.wcs`` module. [11647]

- Fix a bug that caused APE 14 WCS transformations for FITS WCS with ZOPT, BETA,
VELO, VOPT, or VRAD CTYPE to not work correctly. [11781]


Other Changes and Additions
---------------------------

- The configuration file is no longer created by default when importing astropy
and its existence is no longer required. Affiliated packages should update their
``__init__.py`` module to remove the block using ``update_default_config`` and
``ConfigurationDefaultMissingWarning``. [10877]

- Replace ``pkg_resources`` (from setuptools) with ``importlib.metadata`` which
comes from the stdlib, except for Python 3.7 where the backport package is added
as a new dependency. [11091]

- Turn on numpydoc's ``numpydoc_xref_param_type``  to create cross-references
for the parameter types in the Parameters, Other Parameters, Returns and Yields
sections of the docstrings. [11118]

- Docstrings across the package are standardized to enable references.
Also added is an Astropy glossary-of-terms to define standard inputs,
e.g. ``quantity-like`` indicates an input that can be interpreted by
``astropy.units.Quantity``. [11118]

- Binary wheels are now built to the manylinux2010 specification. These wheels
should be supported on all versions of pip shipped with Python 3.7+. [11377]

- The name of the default branch for the astropy git repository has been renamed
to ``main``, and the documentation and tooling has been updated accordingly.
If you have made a local clone you may wish to update it following the
instructions in the repository's README. [11379]

- Sphinx cross-reference link targets are added for every ``PhysicalType``.
Now in the parameter types in the Parameters, Other Parameters, Returns and
Yields sections of the docstring, the physical type of a quantity can be
annotated in square brackets.
E.g. `` distance : `~astropy.units.Quantity` ['length'] `` [11595]

- The minimum supported version of ``ipython`` is now 4.2. [10942]

- The minimum supported version of ``pyerfa`` is now 1.7.3. [11637]

4.2.1

==================

Bug Fixes
---------

astropy.cosmology
^^^^^^^^^^^^^^^^^

- Fixed an issue where specializations of the comoving distance calculation
for certain cosmologies could not handle redshift arrays. [10980]

astropy.io.fits
^^^^^^^^^^^^^^^

- Fix bug where manual fixes to invalid header cards were not preserved when
saving a FITS file. [11108]

astropy.io.votable
^^^^^^^^^^^^^^^^^^

- ``NumericArray`` converter now properly broadcasts scalar mask to array.
[11157]

astropy.table
^^^^^^^^^^^^^

- Fix bug when initializing a ``Table`` subclass that uses ``TableAttribute``'s.
If the data were an instance of the table then attributes provided in the
table initialization call could be ignored. [11217]

astropy.time
^^^^^^^^^^^^

- Change epoch of ``TimeUnixTAI`` (``"unix_tai"``) from ``1970-01-01T00:00:00 UTC``
to ``1970-01-01T00:00:00 TAI`` to match the intended and documented behaviour.
This essentially changes the resulting times by 8.000082 seconds, the initial
offset between TAI and UTC. [11249]

astropy.units
^^^^^^^^^^^^^

- Fixed a bug with the ``quantity_input`` decorator where allowing
dimensionless inputs for an argument inadvertently disabled any checking of
compatible units for that argument. [11283]

astropy.utils
^^^^^^^^^^^^^

- Fix a bug so that ``np.shape``, ``np.ndim`` and ``np.size`` again work on
classes that use ``ShapedLikeNDArray``, like representations, frames,
sky coordinates, and times. [11133]

astropy.wcs
^^^^^^^^^^^

- Fix error when a user defined ``proj_point`` parameter is passed to ``fit_wcs_from_points``. [11139]


Other Changes and Additions
---------------------------


- Change epoch of ``TimeUnixTAI`` (``"unix_tai"``) from ``1970-01-01T00:00:00 UTC``
to ``1970-01-01T00:00:00 TAI`` to match the intended and documented behaviour.
This essentially changes the resulting times by 8.000082 seconds, the initial
offset between TAI and UTC. [11249]

4.2

================

New Features
------------

astropy.convolution
^^^^^^^^^^^^^^^^^^^

- Methods ``convolve`` and ``convolve_fft`` both now return Quantity arrays
if user input is given in one. [10822]

astropy.coordinates
^^^^^^^^^^^^^^^^^^^

- Numpy functions that broadcast, change shape, or index (like
``np.broadcast_to``, ``np.rot90``, or ``np.roll``) now work on
coordinates, frames, and representations. [10337]

- Add a new science state ``astropy.coordinates.erfa_astrom.erfa_astrom`` and
two classes ``ErfaAstrom``, ``ErfaAstromInterpolator`` as wrappers to
the ``pyerfa`` astrometric functions used in the coordinate transforms.
Using ``ErfaAstromInterpolator``, which interpolates astrometric properties for
``SkyCoord`` instances with arrays of obstime, can dramatically speed up
coordinate transformations while keeping microarcsecond resolution.
Depending on needed precision and the obstime array in question, speed ups
reach factors of 10x to >100x. [10647]

- ``galactocentric_frame_defaults`` can now also be used as a registry, with
user-defined parameter values and metadata. [10624]

- Method ``.realize_frame`` from coordinate frames now accepts ``**kwargs``,
including ``representation_type``. [10727]

- Avoid an unnecessary call to ``erfa.epv00`` in transformations between
``CIRS`` and ``ICRS``, improving performance by 50 %. [10814]

- A new equatorial coordinate frame, with RA and Dec measured w.r.t to the True
Equator and Equinox (TETE). This frame is commonly known as "apparent place"
and is the correct frame for coordinates returned from JPL Horizons. [10867]

- Added a context manager ``impose_finite_difference_dt`` to the
``TransformGraph`` class to override the finite-difference time step
attribute (``finite_difference_dt``) for all transformations in the graph
with that attribute. [10341]

- Improve performance of ``SpectralCoord`` by refactoring internal
implementation. [10398]

astropy.cosmology
^^^^^^^^^^^^^^^^^

- The final version of the Planck 2018 cosmological parameters are included
as the ``Planck18`` object, which is now the default cosmology.  The
parameters are identical to those of the ``Planck18_arXiv_v2`` object,
which is now deprecated and will be removed in a future release. [10915]

astropy.modeling
^^^^^^^^^^^^^^^^

- Added NFW profile and tests to modeling package [10505]

- Added missing logic for evaluate to compound models [10002]

- Stop iteration in ``FittingWithOutlierRemoval`` before reaching ``niter`` if
the masked points are no longer changing. [10642]

- Keep a (shallow) copy of ``fit_info`` from the last iteration of the wrapped
fitter in ``FittingWithOutlierRemoval`` and also record the actual number of
iterations performed in it. [10642]

- Added attributes for fitting uncertainties (covariance matrix, standard
deviations) to models. Parameter covariance matrix can be accessed via
``model.cov_matrix``, standard deviations by ``model.stds`` or individually
for each parameter by ``parameter.std``. Currently implemented for
``LinearLSQFitter`` and ``LevMarLSQFitter``. [10552]

- N-dimensional least-squares statistic and specific 1,2,3-D methods [10670]

astropy.stats
^^^^^^^^^^^^^

- Added ``circstd`` function to obtain a circular standard deviation. [10690]

astropy.table
^^^^^^^^^^^^^

- Allow initializing a ``Table`` using a list of ``names`` in conjunction with
a ``dtype`` from a numpy structured array. The list of ``names`` overrides the
names specified in the ``dtype``. [10419]

astropy.time
^^^^^^^^^^^^

- Add new ``isclose()`` method to ``Time`` and ``TimeDelta`` classes to allow
comparison of time objects to within a specified tolerance. [10646]

- Improve initialization time by a factor of four when creating a scalar ``Time``
object in a format like ``unix`` or ``cxcsec`` (time delta from a reference
epoch time). [10406]

- Improve initialization time by a factor of ~25 or more for large arrays of
string times in ISO, ISOT or year day-of-year formats. This is done with a new
C-based time parser that can be adapted for other fixed-format custom time
formats. [10360]

- Numpy functions that broadcast, change shape, or index (like
``np.broadcast_to``, ``np.rot90``, or ``np.roll``) now work on times.
[10337, 10502]

astropy.timeseries
^^^^^^^^^^^^^^^^^^

- Improve memory and speed performance when iterating over the entire time
column of a ``TimeSeries`` object. Previously this involved O(N^2) operations
and memory. [10889]

astropy.units
^^^^^^^^^^^^^

- ``Quantity.to`` has gained a ``copy`` option to allow copies to be avoided
when the units do not change. [10517]

- Added the ``spat`` unit of solid angle that represents the full sphere.
[10726]

astropy.utils
^^^^^^^^^^^^^

- ``ShapedLikeNDArray`` has gained the capability to use numpy functions
that broadcast, change shape, or index. [10337]

- ``get_free_space_in_dir`` now takes a new ``unit`` keyword and
``check_free_space_in_dir`` takes ``size`` defined as ``Quantity``. [10627]

- New ``astropy.utils.data.conf.allow_internet`` configuration item to
control downloading data from the Internet. Setting ``allow_internet=False``
is the same as ``remote_timeout=0``. Using ``remote_timeout=0`` to control
internet access will stop working in a future release. [10632]

- New ``is_url`` function so downstream packages do not have to secretly use
the hidden ``_is_url`` anymore. [10684]

astropy.visualization
^^^^^^^^^^^^^^^^^^^^^

- Added the ``Quadrangle`` patch for ``WCSAxes`` for a latitude-longitude
quadrangle.  Unlike ``matplotlib.patches.Rectangle``, the edges of this
patch will be rendered as curved lines if appropriate for the WCS
transformation. [10862]

- The position of tick labels are now only calculated when needed. If any text
parameters are changed (color, font weight, size etc.) that don't effect the
tick label position, the positions are not recomputed, improving performance.
[10806]

astropy.wcs
^^^^^^^^^^^

- ``WCS.to_header()`` now appends comments to SIP coefficients. [10480]

- A new property ``dropped_world_dimensions`` has been added to
``SlicedLowLevelWCS`` to record information about any world axes removed by
slicing a WCS. [10195]

- New ``WCS.proj_plane_pixel_scales()`` and ``WCS.proj_plane_pixel_area()``
methods to return pixel scales and area, respectively, as Quantity. [10872]


API Changes
-----------

astropy.config
^^^^^^^^^^^^^^

- ``set_temp_config`` now preserves the existing cache rather than deleting
it and relying on reloading it from the previous config file. This ensures
that any programmatically made changes are preserved as well. [10474]

- Configuration path detection logic has changed: Now, it looks for ``~`` first
before falling back to older logic. In addition, ``HOMESHARE`` is no longer
used in Windows. [10705]

astropy.coordinates
^^^^^^^^^^^^^^^^^^^

- The passing of frame classes (as opposed to frame instances) to the
``transform_to()`` methods of low-level coordinate-frame classes has been
deprecated.  Frame classes can still be passed to the ``transform_to()``
method of the high-level ``SkyCoord`` class, and using ``SkyCoord`` is
recommended for all typical use cases of transforming coordinates. [10475]

astropy.stats
^^^^^^^^^^^^^

- Added a ``grow`` parameter to ``SigmaClip``, ``sigma_clip`` and
``sigma_clipped_stats``, to allow expanding the masking of each deviant
value to its neighbours within a specified radius. [10613]

- Passing float ``n`` to ``poisson_conf_interval`` when using
``interval='kraft-burrows-nousek'`` now raises ``TypeError`` as its value
must be an integer. [10838]

astropy.table
^^^^^^^^^^^^^

- Change ``Table.columns.keys()`` and ``Table.columns.values()`` to both return
generators instead of a list. This matches the behavior for Python ``dict``
objects. [10543]

- Removed the ``FastBST`` and ``FastRBT`` indexing engines because they depend
on the ``bintrees`` package, which is no longer maintained and is deprecated.
Instead, use the ``SCEngine`` indexing engine, which is similar in
performance and relies on the ``sortedcontainers`` package. [10622]

- When slicing a mixin column in a table that had indices, the indices are no
longer copied since they generally are not useful, having the wrong shape.
With this, the behaviour becomes the same as that for a regular ``Column``.
(Note that this does not affect slicing of a table; sliced columns in those
will continue to carry a sliced version of any indices). [10890]

- Change behavior so that when getting a single item out of a mixin column such
as ``Time``, ``TimeDelta``, ``SkyCoord`` or ``Quantity``, the ``info``
attribute is no longer copied. This improves performance, especially when the
object is an indexed column in a ``Table``. [10889]

- Raise a TypeError when a scalar column is added to an unsized table. [10476]

- The order of columns when creating a table from a ``list`` of ``dict`` may be
changed. Previously, the order was alphabetical because the ``dict`` keys
were assumed to be in random order. Since Python 3.7, the keys are always in
order of insertion, so ``Table`` now uses the order of keys in the first row
to set the column order. To alphabetize the columns to match the previous
behavior, use ``t = t[sorted(t.colnames)]``. [10900]

astropy.time
^^^^^^^^^^^^

- Refactor ``Time`` and ``TimeDelta`` classes to inherit from a common
``TimeBase`` class. The ``TimeDelta`` class no longer inherits from ``Time``.
A number of methods that only apply to ``Time`` (e.g. ``light_travel_time``)
are no longer available in the ``TimeDelta`` class. [10656]

astropy.units
^^^^^^^^^^^^^

- The ``bar`` unit is no longer wrongly considered an SI unit, meaning that
SI decompositions like ``(u.kg*u.s**-2* u.sr**-1 * u.nm**-1).si`` will
no longer include it. [10586]

astropy.utils
^^^^^^^^^^^^^

- Shape-related items from ``astropy.utils.misc`` -- ``ShapedLikeNDArray``,
``check_broadcast``, ``unbroadcast``, and ``IncompatibleShapeError`` --
have been moved to their own module, ``astropy.utils.shapes``. They remain
importable from ``astropy.utils``. [10337]

- ``check_hashes`` keyword in ``check_download_cache`` is deprecated and will
be removed in a future release. [10628]

- ``hexdigest`` keyword in ``import_file_to_cache`` is deprecated and will
be removed in a future release. [10628]


Bug Fixes
---------

astropy.config
^^^^^^^^^^^^^^

- Fix a few issues with ``generate_config`` when used with other packages.
[10893]

astropy.coordinates
^^^^^^^^^^^^^^^^^^^

- Fixed a bug in the coordinate-frame attribute ``CoordinateAttribute`` where
the internal transformation could behave differently depending on whether
the input was a low-level coordinate frame or a high-level ``SkyCoord``.
``CoordinateAttribute`` now always performs a ``SkyCoord``-style internal
transformation, including the by-default merging of frame attributes. [10475]

astropy.modeling
^^^^^^^^^^^^^^^^

- Fixed an issue of ``Model.render`` when the input ``out`` datatype is not
float64. [10542]

astropy.visualization
^^^^^^^^^^^^^^^^^^^^^

- Fix support for referencing WCSAxes coordinates by their world axes names.
[10484]

astropy.wcs
^^^^^^^^^^^

- Objective functions called by ``astropy.wcs.fit_wcs_from_points`` were
treating longitude and latitude distances equally. Now longitude scaled
properly. [10759]


Other Changes and Additions
---------------------------

- Minimum version of required Python is now 3.7. [10900]

- Minimum version of required Numpy is now 1.17. [10664]

- Minimum version of required Scipy is now 1.1. [10900]

- Minimum version of required PyYAML is now 3.13. [10900]

- Minimum version of required Matplotlib is now 3.0. [10900]

- The private ``_erfa`` module has been converted to its own package,
``pyerfa``, which is a required dependency for astropy, and can be imported
with ``import erfa``.  Importing ``_erfa`` from ``astropy`` will give a
deprecation warning.  [10329]

- Added ``optimize=True`` flag to calls of ``yacc.yacc`` (as already done for
``lex.lex``) to allow running in ``python -OO`` session without raising an
exception in ``astropy.units.format``. [10379]

- Shortened FITS comment strings for some D2IM and CPDIS FITS keywords to
reduce the number of FITS ``VerifyWarning`` warnings when working with WCSes
containing lookup table distortions. [10513]

- When importing astropy without first building the extension modules first,
raise an error directly instead of trying to auto-build. [10883]

4.1

================

New Features
------------

astropy.config
^^^^^^^^^^^^^^

- Add new function ``generate_config`` to generate the configuration file and
include it in the documentation. [10148]

- ``ConfigNamespace.__iter__`` and ``ConfigNamespace.keys`` now yield ``ConfigItem``
names defined within it. Similarly, ``items`` and ``values`` would yield like a
Python dictionary would. [10139]

astropy.coordinates
^^^^^^^^^^^^^^^^^^^

- Added a new ``SpectralCoord`` class that can be used to define spectral
coordinates and transform them between different velocity frames. [10185]

- Angle parsing now supports ``cardinal direction`` in the cases
where angles are initialized as ``string`` instances. eg ``"17°53'27"W"``.[9859]

- Allow in-place modification of array-valued ``Frame`` and ``SkyCoord`` objects.
This provides limited support for updating coordinate data values from another
coordinate object of the same class and equivalent frame attributes. [9857]

- Added a robust equality operator for comparing ``SkyCoord``, frame, and
representation objects. A comparison like ``sc1 == sc2`` will now return a
boolean or boolean array where the objects are strictly equal in all relevant
frame attributes and coordinate representation values. [10154]

- Added the True Equator Mean Equinox (TEME) frame. [10149]

- The ``Galactocentric`` frame will now use the "latest" parameter definitions
by default. This currently corresponds to the values defined in v4.0, but will
change with future releases. [10238]

- The ``SkyCoord.from_name()`` and Sesame name resolving functionality now is
able to cache results locally and will do so by default. [9162]

- Allow in-place modification of array-valued ``Representation`` and ``Differential``
objects, including of representations with attached differentials. [10210]

astropy.io.ascii
^^^^^^^^^^^^^^^^

- Functional Units can now be processed in CDS-tables. [9971]

- Allow reading in ASCII tables which have duplicate column names. [9939]

- Fixed failure of ASCII ``fast_reader`` to handle ``names``, ``include_names``,
``exclude_names`` arguments for ``RDB`` formatted tables. Homogenised checks
and exceptions for invalid ``names`` arguments. Improved performance when
parsing "wide" tables with many columns. [10306]

- Added type validation of key arguments in calls to ``io.ascii.read()`` and
``io.ascii.write()`` functions. [10005]

astropy.io.misc
^^^^^^^^^^^^^^^
- Added serialization of parameter constraints fixed and bounds.  [10082]

- Added 'functional_models.py' and 'physical_models.py' to asdf/tags/transform,
with to allow serialization of all functional and physical models. [10028, 10293]

- Fix ASDF serialization of circular model inverses, and remove explicit calls
to ``asdf.yamlutil`` functions that became unnecessary in asdf 2.6.0. [10189, 10384]

astropy.io.fits
^^^^^^^^^^^^^^^

- Added support for writing Dask arrays to disk efficiently for ``ImageHDU`` and
``PrimaryHDU``. [9742]

- Add HDU name and ver to FITSDiff report where appropriate [10197]

astropy.io.votable
^^^^^^^^^^^^^^^^^^

- New ``exceptions.conf.max_warnings`` configuration item to control the number of times a
type of warning appears before being suppressed. [10152]

- No longer ignore attributes whose values were specified as empty
strings. [10583]

astropy.modeling
^^^^^^^^^^^^^^^^
- Added Plummer1D model to ``functional_models``. [9896]

- Added ``UnitsMapping`` model and ``Model.coerce_units`` to support units on otherwise
unitless models. [9936]

- Added ``domain`` and ``window`` attributes to ``repr`` and ``str``. Fixed bug with
``_format_repr`` in core.py. [9941]

- Polynomial attributes ``domain`` and ``window`` are now tuples of size 2 and are
validated. `repr` and `print` show only their non-default values. [10145]

- Added ``replace_submodel()`` method to ``CompoundModel`` to modify an
existing instance. [10176]

- Delay construction of ``CompoundModel`` inverse until property is accessed,
to support ASDF deserialization of circular inverses in component models. [10384]

astropy.nddata
^^^^^^^^^^^^^^

- Added support in the ``bitmask`` module for using mnemonic bit flag names
when specifying the bit flags to be used or ignored when converting a bit
field to a boolean. [10095, 10208]

- Added ``reshape_as_blocks`` function to reshape a data array into
blocks, which is useful to efficiently apply functions on block
subsets of the data instead of using loops.  The reshaped array is a
view of the input data array. [10214]

- Added a ``cache`` keyword option to allow caching for ``CCDData.read`` if
filename is a URL. [10265]

astropy.table
^^^^^^^^^^^^^

- Added ability to specify a custom matching function for table joins.  In
particular this makes it possible to do cross-match table joins on ``SkyCoord``,
``Quantity``, or standard columns, where column entries within a specified
distance are considered to be matched. [10169]

- Added ``units`` and ``descriptions`` keyword arguments to the Table object
initialization and ``Table.read()`` methods.  This allows directly setting
the ``unit`` and ``description`` for the table columns at the time of
creating or reading the table. [9671]

- Make table ``Row`` work as mappings, by adding ``.keys()`` and ``.values()``
methods. With this ``**row`` becomes possible, as does, more simply, turning
a ``Row`` into a dictionary with ``dict(row)``. [9712]

- Added two new ``Table`` methods ``.items()`` and ``.values()``, which return
respectively ``tbl.columns.items()`` (iterator over name, column tuples)  and
``tbl.columns.values()`` (list of columns) for a ``Table`` object ``tbl``. [9780]

- Added new ``Table`` method ``.round()``, which rounds numeric columns to the
specified number of decimals. [9862]

- Updated ``to_pandas()`` and ``from_pandas()`` to use and support Pandas
nullable integer data type for masked integer data. [9541]

- The HDF5 writer, ``write_table_hdf5()``, now allows passing through
additional keyword arguments to the ``h5py.Group.create_dataset()``. [9602]

- Added capability to add custom table attributes to a ``Table`` subclass.
These attributes are persistent and can be set during table creation. [10097]

- Added support for ``SkyCoord`` mixin columns in ``dstack``, ``vstack`` and
``insert_row`` functions. [9857]

- Added support for coordinate ``Representation`` and ``Differential`` mixin
columns. [10210]

astropy.time
^^^^^^^^^^^^

- Added a new time format ``unix_tai`` which is essentially Unix time but with
leap seconds included.  More precisely, this is the number of seconds since
``1970-01-01 00:00:08 TAI`` and corresponds to the ``CLOCK_TAI`` clock
available on some linux platforms. [10081]

astropy.units
^^^^^^^^^^^^^

- Added ``torr`` pressure unit. [9787]

- Added the ``equal_nan`` keyword argument to ``isclose`` and ``allclose``, and
updated the docstrings. [9849]

- Added ``Rankine`` temperature unit. [9916]

- Added integrated flux unit conversion to ``spectral_density`` equivalency.
[10015]

- Changed ``pixel_scale`` equivalency to allow scales defined in any unit.
[10123]

- The ``quantity_input`` decorator now optionally allows passing through
numeric values or numpy arrays with numeric dtypes to arguments where
``dimensionless_unscaled`` is an allowed unit. [10232]

astropy.utils
^^^^^^^^^^^^^

- Added a new ``MetaAttribute`` class to support easily adding custom attributes
to a subclass of classes like ``Table`` or ``NDData`` that have a ``meta``
attribute. [10097]

astropy.visualization
^^^^^^^^^^^^^^^^^^^^^

- Added ``invalid`` keyword to ``SqrtStretch``, ``LogStretch``,
``PowerStretch``, and ``ImageNormalize`` classes and the
``simple_norm`` function.  This keyword is used to replace generated
NaN values. [10182]

- Fixed an issue where ticks were sometimes not drawn at the edges of a spherical
projection on a WCSAxes. [10442]

astropy.wcs
^^^^^^^^^^^

- WCS objects with a spectral axis will now return ``SpectralCoord``
objects when calling ``pixel_to_world`` instead of ``Quantity``,
and can now take either ``Quantity`` or ``SpectralCoord`` as input
to ``pixel_to_world``. [10185]

- Implemented support for the ``-TAB`` algorithm (WCS Paper III). [9641]

- Added an ``_as_mpl_axes`` method to the ``HightLevelWCSWrapper`` class. [10138]

- Add .upper() to ctype or ctype names to wcsapi/fitwcs.py to mitigate bugs from
unintended lower/upper case issues [10557]

API Changes
-----------

astropy.coordinates
^^^^^^^^^^^^^^^^^^^

- The equality operator for comparing ``SkyCoord``, frame, and representation
objects was changed. A comparison like ``sc1 == sc2`` was previously
equivalent to ``sc1 is sc2``. It will now return a boolean or boolean array
where the objects are strictly equal in all relevant frame attributes and
coordinate representation values. If the objects have different frame
attributes or representation types then an exception will be raised. [10154]

- SkyCoord.radial_velocity_correction now allows you to pass an obstime directly
when the SkyCoord also has an obstime set. In this situation, the position of the
SkyCoord has space motion applied to correct to the passed obstime. This allows
mm/s radial velocity precision for objects with large space motion. [10094]

- For consistency with other astropy classes, coordinate ``Representations``
and ``Differentials`` can now be initialized with an instance of their own class
if that instance is passed in as the first argument. [10210]

astropy.io.ascii
^^^^^^^^^^^^^^^^

- Changed the behavior when reading a table where both the ``names`` argument
is provided (to specify the output column names) and the ``converters``
argument is provided (to specify column conversion functions). Previously the
``converters`` dict names referred to the *input* table column names, but now
they refer to the *output* table column names. [9739]

astropy.io.votable
^^^^^^^^^^^^^^^^^^

- For FIELDs with datatype="char", store the values as strings instead
of bytes. [9505]

astropy.table
^^^^^^^^^^^^^

- ``Table.from_pandas`` now supports a ``units`` dictionary as argument to pass units
for columns in the ``DataFrame``. [9472]

astropy.time
^^^^^^^^^^^^

- Require that ``in_subfmt`` and ``out_subfmt`` properties of a ``Time`` object
have allowed values at the time of being set, either when creating the object
or when setting those properties on an existing ``Time`` instance.  Previously
the validation of those properties was not strictly enforced. [9868]

astropy.utils
^^^^^^^^^^^^^

- Changed the exception raised by ``get_readable_fileobj`` on missing
compression modules (for ``bz2`` or ``lzma``/``xz`` support) to
``ModuleNotFoundError``, consistent with ``io.fits`` file handlers. [9761]

astropy.visualization
^^^^^^^^^^^^^^^^^^^^^

- Deprecated the ``imshow_only_kwargs`` keyword in ``imshow_norm``.
[9915]

- Non-finite input values are now automatically excluded in
``HistEqStretch`` and ``InvertedHistEqStretch``. [10177]

- The ``PowerDistStretch`` and ``InvertedPowerDistStretch`` ``a``
value is restricted to be ``a >= 0`` in addition to ``a != 1``.
[10177]

- The ``PowerStretch``, ``LogStretch``, and ``InvertedLogStretch``
``a`` value is restricted to be ``a > 0``. [10177]

- The ``AsinhStretch`` and ``SinhStretch`` ``a`` value is restricted
to be ``0 < a <= 1``. [10177]

Bug Fixes
---------

astropy.coordinates
^^^^^^^^^^^^^^^^^^^

- Fix a bug where for light deflection by the Sun it was always assumed that the
source was at infinite distance, which in the (rare and) absolute worst-case
scenario could lead to errors up to 3 arcsec. [10666]

astropy.io.votable
^^^^^^^^^^^^^^^^^^

- For FIELDs with datatype="char", store the values as strings instead
of bytes. [9505]

astropy.table
^^^^^^^^^^^^^

- Fix a bug that prevented ``Time`` columns from being used to sort a table.
[10824]

astropy.wcs
^^^^^^^^^^^

- WCS objects with a spectral axis will now return ``SpectralCoord``
objects when calling ``pixel_to_world`` instead of ``Quantity``
(note that ``SpectralCoord`` is a sub-class of ``Quantity``). [10185]

- Add .upper() to ctype or ctype names to wcsapi/fitwcs.py to mitigate bugs from
unintended lower/upper case issues [10557]

- Added bounds to ``fit_wcs_from_points`` to ensure CRPIX is on
input image. [10346]


Other Changes and Additions
---------------------------

- The way in which users can specify whether to build astropy against
existing installations of C libraries rather than the bundled one
has changed, and should now be done via environment variables rather
than setup.py flags (e.g. --use-system-erfa). The available variables
are ``ASTROPY_USE_SYSTEM_CFITSIO``, ``ASTROPY_USE_SYSTEM_ERFA``,
``ASTROPY_USE_SYSTEM_EXPAT``, ``ASTROPY_USE_SYSTEM_WCSLIB``, and
``ASTROPY_USE_SYSTEM_ALL``. These should be set to ``1`` to build
against the system libraries. [9730]

- The infrastructure of the package has been updated in line with the
APE 17 roadmap (https://github.com/astropy/astropy-APEs/blob/master/APE17.rst).
The main changes are that the ``python setup.py test`` and
``python setup.py build_docs`` commands will no longer work. The easiest
way to replicate these commands is to install the tox
(https://tox.readthedocs.io) package and run ``tox -e test`` and
``tox -e build_docs``. It is also possible to run pytest and sphinx
directly. Other significant changes include switching to setuptools_scm to
manage the version number, and adding a ``pyproject.toml`` to opt in to
isolated builds as described in PEP 517/518. [9726]

- Bundled ``expat`` is updated to version 2.2.9. [10038]

- Increase minimum asdf version to 2.6.0. [10189]

- The bundled version of PLY was updated to 3.11. [10258]

- Removed dependency on scikit-image. [10214]

4.0.5

==================

Bug Fixes
---------

astropy.io.fits
^^^^^^^^^^^^^^^

- Fix bug where manual fixes to invalid header cards were not preserved when
saving a FITS file. [11108]

- Fix parsing of RVKC header card patterns that were not recognised
where multiple spaces were separating field-specifier and value like
"DP1.AXIS.1:   1". [11301]

- Fix misleading missing END card error when extra data are found at the end
of the file. [11285]

- Fix incorrect wrapping of long card values as CONTINUE cards when some
words in the value are longer than a single card. [11304]

astropy.io.misc
^^^^^^^^^^^^^^^

- Fixed problem when writing serialized metadata to HDF5 using h5py >= 3.0.
With the newer h5py this was writing the metadata table as a variable-length
string array instead of the previous fixed-length bytes array. Fixed astropy
to force using a fixed-length bytes array. [11359]

astropy.modeling
^^^^^^^^^^^^^^^^

- Change ``Voigt1D`` function to use Humlicek's approximation to avoid serious
inaccuracies + option to use (compiled) ``scipy.special.wofz`` error function
for yet more accurate results. [11177]

astropy.table
^^^^^^^^^^^^^

- Fixed bug when initializing a ``Table`` with a column as list of ``Quantity``,
for example ``Table({'x': [1*u.m, 2*u.m]})``. Previously this resulted in an
``object`` dtype with no column ``unit`` set, but now gives a float array with
the correct unit. [11329]

- Fixed byteorder conversion in ``to_pandas()``, which had incorrectly
triggered swapping when native endianness was stored with explicit
``dtype`` code ``'<'`` (or ``'>'``) instead of ``'='``. [11288, 11294]

- Fixed a compatibility issue with numpy 1.21. Initializing a Table with a
column like ``['str', np.ma.masked]`` was failing in tests due to a change in
numpy. [11364]

- Fixed bug when validating the inputs to ``table.hstack``, ``table.vstack``,
and ``table.dstack``. Previously, mistakenly calling ``table.hstack(t1, t2)``
(instead of ``table.hstack([t1, t2]))`` would return ``t1`` instead of raising
an exception. [11336]

- Fixed byteorder conversion in ``to_pandas()``, which had incorrectly
triggered swapping when native endianness was stored with explicit
``dtype`` code ``'<'`` (or ``'>'``) instead of ``'='``. [11288]

astropy.time
^^^^^^^^^^^^

- Fix leap second update when using a non english locale. [11062]

- Fix default assumed location to be the geocenter when transforming times
to and from solar-system barycenter scales. [11134]

- Fix inability to write masked times with ``formatted_value``. [11195]

astropy.units
^^^^^^^^^^^^^

- Ensure ``keepdims`` works for taking ``mean``, ``std``, and ``var`` of
``Quantity``. [11198]

- For ``Quantity.to_string()``, ensure that the precision argument is also
used when the format is not latex. [11145]

astropy.wcs
^^^^^^^^^^^

- Allow "un-setting" of auxiliary WCS parameters in the ``aux`` attribute of
``Wcsprm``. [11166]

4.0.4

==================

Bug Fixes
---------

astropy.coordinates
^^^^^^^^^^^^^^^^^^^

- The ``norm()`` method for ``RadialDifferential`` no longer requires ``base``
to be specified.  The ``norm()`` method for other non-Cartesian differential
classes now gives a clearer error message if ``base`` is not specified. [10969]

- The transformations between ``ICRS`` and any of the heliocentric ecliptic
frames (``HeliocentricMeanEcliptic``, ``HeliocentricTrueEcliptic``, and
``HeliocentricEclipticIAU76``) now correctly account for the small motion of
the Sun when transforming a coordinate with velocity information. [10970]

astropy.io.ascii
^^^^^^^^^^^^^^^^

- Partially fixed a performance issue when reading in parallel mode. Parallel
reading currently has substantially worse performance than the default serial
reading, so we now ignore the parallel option and fall back to serial reading.
[10880]

- Fixed a bug where "" (blank string) as input data for a boolean type column
was causing an exception instead of indicating a masked value. As a
consequence of the fix, the values "0" and "1" are now also allowed as valid
inputs for boolean type columns. These new allowed values apply for both ECSV
and for basic character-delimited data files ('basic' format with appropriate
``converters`` specified). [10995]

astropy.modeling
^^^^^^^^^^^^^^^^

- Fixed use of weights with ``LinearLSQFitter``. [10687]

astropy.stats
^^^^^^^^^^^^^

- Fixed an issue in biweight stats when MAD=0 to give the same output
with and without an input ``axis``. [10912]

astropy.time
^^^^^^^^^^^^

- Fix a problem with the ``plot_date`` format for matplotlib >= 3.3 caused by
a change in the matplotlib plot date default reference epoch in that release.
[10876]

- Improve initialization time by a factor of four when creating a scalar ``Time``
object in a format like ``unix`` or ``cxcsec`` (time delta from a reference
epoch time). [10406]

astropy.visualization
^^^^^^^^^^^^^^^^^^^^^

- Fixed the caclulation of the tight bounding box of a ``WCSAxes``. This should
also significantly improve the application of ``tight_layout()`` to figures
containing ``WCSAxes``. [10797]

4.0.3

==================

Bug Fixes
---------

astropy.table
^^^^^^^^^^^^^

- Fixed a small bug where initializing an empty ``Column`` with a structured dtype
with a length and a shape failed to give the requested dtype. [10819]

Other Changes and Additions
---------------------------

- Fixed installation of the source distribution with pip<19. [10837, 10852]
Links

Update boto3 from 1.18.11 to 1.18.33.

Changelog

1.18.33

=======

* api-change:``iot``: [``botocore``] Added Create/Update/Delete/Describe/List APIs for a new IoT resource named FleetMetric. Added a new Fleet Indexing query API named GetBucketsAggregation. Added a new field named DisconnectedReason in Fleet Indexing query response. Updated their related documentations.
* api-change:``polly``: [``botocore``] Amazon Polly adds new South African English voice - Ayanda. Ayanda is available as Neural voice only.
* api-change:``compute-optimizer``: [``botocore``] Documentation updates for Compute Optimizer
* api-change:``sqs``: [``botocore``] Amazon SQS adds a new queue attribute, RedriveAllowPolicy, which includes the dead-letter queue redrive permission parameters. It defines which source queues can specify dead-letter queues as a JSON object.
* api-change:``memorydb``: [``botocore``] Documentation updates for MemoryDB

1.18.32

=======

* api-change:``codebuild``: [``botocore``] Documentation updates for CodeBuild
* api-change:``firehose``: [``botocore``] This release adds the Dynamic Partitioning feature to Kinesis Data Firehose service for S3 destinations.
* api-change:``kms``: [``botocore``] This release has changes to KMS nomenclature to remove the word master from both the "Customer master key" and "CMK" abbreviation and replace those naming conventions with "KMS key".
* api-change:``cloudformation``: [``botocore``] AWS CloudFormation allows you to iteratively develop your applications when failures are encountered without rolling back successfully provisioned resources. By specifying stack failure options, you can troubleshoot resources in a CREATE_FAILED or UPDATE_FAILED status.

1.18.31

=======

* api-change:``s3``: [``botocore``] Documentation updates for Amazon S3.
* api-change:``emr``: [``botocore``] Update emr client to latest version
* api-change:``ec2``: [``botocore``] This release adds the BootMode flag to the ImportImage API and showing the detected BootMode of an ImportImage task.

1.18.30

=======

* api-change:``transcribe``: [``botocore``] This release adds support for batch transcription in six new languages - Afrikaans, Danish, Mandarin Chinese (Taiwan), New Zealand English, South African English, and Thai.
* api-change:``rekognition``: [``botocore``] This release added new attributes to Rekognition RecognizeCelebities and GetCelebrityInfo API operations.
* api-change:``ec2``: [``botocore``] Support added for resizing VPC prefix lists
* api-change:``compute-optimizer``: [``botocore``] Adds support for 1) the AWS Graviton (AWS_ARM64) recommendation preference for Amazon EC2 instance and Auto Scaling group recommendations, and 2) the ability to get the enrollment statuses for all member accounts of an organization.

1.18.29

=======

* api-change:``fms``: [``botocore``] AWS Firewall Manager now supports triggering resource cleanup workflow when account or resource goes out of policy scope for AWS WAF, Security group, AWS Network Firewall, and Amazon Route 53 Resolver DNS Firewall policies.
* api-change:``ec2``: [``botocore``] Support added for IMDS IPv6 endpoint
* api-change:``datasync``: [``botocore``] Added include filters to CreateTask and UpdateTask, and added exclude filters to StartTaskExecution, giving customers more granular control over how DataSync transfers files, folders, and objects.
* api-change:``events``: [``botocore``] AWS CWEvents adds an enum of EXTERNAL for EcsParameters LaunchType for PutTargets API

1.18.28

=======

* api-change:``mediaconvert``: [``botocore``] AWS Elemental MediaConvert SDK has added MBAFF encoding support for AVC video and the ability to pass encryption context from the job settings to S3.
* api-change:``polly``: [``botocore``] Amazon Polly adds new New Zealand English voice - Aria. Aria is available as Neural voice only.
* api-change:``transcribe``: [``botocore``] This release adds support for feature tagging with Amazon Transcribe batch jobs.
* api-change:``ssm``: [``botocore``] Updated Parameter Store property for logging improvements.
* api-change:``iot-data``: [``botocore``] Updated Publish with support for new Retain flag and added two new API operations: GetRetainedMessage, ListRetainedMessages.

1.18.27

===

@bourque bourque self-assigned this Sep 1, 2021
@bourque bourque added 3: LOW PRIORITY dependencies Pull requests that update a dependency file labels Sep 1, 2021
@bourque bourque self-requested a review September 1, 2021 20:53
@bourque bourque merged commit d67987b into develop Sep 1, 2021
@bourque bourque deleted the pyup/scheduled-update-2021-09-01 branch September 1, 2021 21:15
hover2pi pushed a commit that referenced this pull request Jan 26, 2023
Scheduled monthly dependency update for September
hover2pi pushed a commit that referenced this pull request Jul 16, 2024
Scheduled monthly dependency update for September
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3: LOW PRIORITY dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants