head	1.27;
access;
symbols
	pkgsrc-2026Q1:1.27.0.4
	pkgsrc-2026Q1-base:1.27
	pkgsrc-2025Q4:1.27.0.2
	pkgsrc-2025Q4-base:1.27
	pkgsrc-2025Q3:1.24.0.4
	pkgsrc-2025Q3-base:1.24
	pkgsrc-2025Q2:1.24.0.2
	pkgsrc-2025Q2-base:1.24
	pkgsrc-2025Q1:1.21.0.2
	pkgsrc-2025Q1-base:1.21
	pkgsrc-2024Q4:1.19.0.2
	pkgsrc-2024Q4-base:1.19
	pkgsrc-2024Q3:1.16.0.2
	pkgsrc-2024Q3-base:1.16
	pkgsrc-2024Q2:1.14.0.2
	pkgsrc-2024Q2-base:1.14
	pkgsrc-2024Q1:1.11.0.4
	pkgsrc-2024Q1-base:1.11
	pkgsrc-2023Q4:1.11.0.2
	pkgsrc-2023Q4-base:1.11
	pkgsrc-2023Q3:1.10.0.2
	pkgsrc-2023Q3-base:1.10
	pkgsrc-2023Q2:1.6.0.8
	pkgsrc-2023Q2-base:1.6
	pkgsrc-2023Q1:1.6.0.6
	pkgsrc-2023Q1-base:1.6
	pkgsrc-2022Q4:1.6.0.4
	pkgsrc-2022Q4-base:1.6
	pkgsrc-2022Q3:1.6.0.2
	pkgsrc-2022Q3-base:1.6
	pkgsrc-2022Q2:1.5.0.2
	pkgsrc-2022Q2-base:1.5
	pkgsrc-2022Q1:1.4.0.2
	pkgsrc-2022Q1-base:1.4
	pkgsrc-2021Q4:1.1.0.10
	pkgsrc-2021Q4-base:1.1
	pkgsrc-2021Q3:1.1.0.8
	pkgsrc-2021Q3-base:1.1
	pkgsrc-2021Q2:1.1.0.6
	pkgsrc-2021Q2-base:1.1
	pkgsrc-2021Q1:1.1.0.4
	pkgsrc-2021Q1-base:1.1
	pkgsrc-2020Q4:1.1.0.2
	pkgsrc-2020Q4-base:1.1;
locks; strict;
comment	@# @;


1.27
date	2025.12.09.18.12.57;	author adam;	state Exp;
branches;
next	1.26;
commitid	rFcUUXyiufkPjLlG;

1.26
date	2025.10.28.09.26.50;	author adam;	state Exp;
branches;
next	1.25;
commitid	fnhdJsMCpl1XKjgG;

1.25
date	2025.10.09.07.57.46;	author wiz;	state Exp;
branches;
next	1.24;
commitid	t4nMY0Dt3rBjSRdG;

1.24
date	2025.06.13.07.06.41;	author adam;	state Exp;
branches;
next	1.23;
commitid	nat5jKSk3b60oHYF;

1.23
date	2025.05.14.14.40.55;	author adam;	state Exp;
branches;
next	1.22;
commitid	NlEm7mYicJHvRSUF;

1.22
date	2025.04.15.16.31.37;	author adam;	state Exp;
branches;
next	1.21;
commitid	GEWTNMP1WtMxpaRF;

1.21
date	2025.02.07.07.29.15;	author adam;	state Exp;
branches;
next	1.20;
commitid	wyNbDwhklQdJyvIF;

1.20
date	2025.01.21.01.18.25;	author wen;	state Exp;
branches;
next	1.19;
commitid	pqr43phBZqCv3iGF;

1.19
date	2024.11.11.07.28.40;	author wiz;	state Exp;
branches;
next	1.18;
commitid	1fBDq3LwS98NncxF;

1.18
date	2024.10.14.06.45.49;	author wiz;	state Exp;
branches;
next	1.17;
commitid	ynDJEEQamKd33BtF;

1.17
date	2024.10.03.12.03.43;	author adam;	state Exp;
branches;
next	1.16;
commitid	49PhwJSeuCr7adsF;

1.16
date	2024.09.11.11.45.20;	author adam;	state Exp;
branches;
next	1.15;
commitid	hKqsb1MTIvjELnpF;

1.15
date	2024.08.06.08.39.20;	author adam;	state Exp;
branches;
next	1.14;
commitid	8vkfu7AHZkJATJkF;

1.14
date	2024.06.25.02.00.30;	author gutteridge;	state Exp;
branches;
next	1.13;
commitid	XuJUBFNMiSer1jfF;

1.13
date	2024.06.24.23.14.28;	author gutteridge;	state Exp;
branches;
next	1.12;
commitid	qklMEStfh0Xn7ifF;

1.12
date	2024.05.11.15.38.30;	author wiz;	state Exp;
branches;
next	1.11;
commitid	fNq48aDaZvFS0B9F;

1.11
date	2023.10.20.14.16.35;	author adam;	state Exp;
branches;
next	1.10;
commitid	vbBQTUOtIG5g7nJE;

1.10
date	2023.09.16.04.24.31;	author adam;	state Exp;
branches;
next	1.9;
commitid	jXcHyqqdORAPVWEE;

1.9
date	2023.08.31.14.01.37;	author adam;	state Exp;
branches;
next	1.8;
commitid	OdGFxEI1Y41KDWCE;

1.8
date	2023.08.01.23.20.46;	author wiz;	state Exp;
branches;
next	1.7;
commitid	lyjXpsSeA6xpH8zE;

1.7
date	2023.07.01.08.37.38;	author wiz;	state Exp;
branches;
next	1.6;
commitid	OGZpaIgVtdY8O4vE;

1.6
date	2022.08.30.15.54.37;	author thor;	state Exp;
branches;
next	1.5;
commitid	nqkRXMvBQiCT1VRD;

1.5
date	2022.04.10.00.57.14;	author gutteridge;	state Exp;
branches;
next	1.4;
commitid	53ZWhv2DKvpNCAzD;

1.4
date	2022.01.05.15.41.13;	author wiz;	state Exp;
branches;
next	1.3;
commitid	FQ77UruBIUsgzsnD;

1.3
date	2022.01.04.20.54.13;	author wiz;	state Exp;
branches;
next	1.2;
commitid	CYyhdK9qtoffkmnD;

1.2
date	2021.12.30.13.05.36;	author adam;	state Exp;
branches;
next	1.1;
commitid	w23rFuQ4pTWhUFmD;

1.1
date	2020.12.19.14.17.39;	author mef;	state Exp;
branches;
next	;
commitid	SzLzzqJRHlCoomAC;


desc
@@


1.27
log
@py-astropy: updated to 7.2.0

Version 7.2.0 (2025-11-25)
==========================

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

astropy.constants
^^^^^^^^^^^^^^^^^

- Added CODATA 2022 support in ``astropy.constants``.

  This update affects the following constants while the rest are unchanged from CODATA 2018:

  - ``m_p`` (Proton mass)
  - ``m_n`` (Neutron mass)
  - ``m_e`` (Electron mass)
  - ``u`` (Atomic mass)
  - ``eps0`` (Vacuum electric permittivity)
  - ``Ryd`` (Rydberg constant)
  - ``a0`` (Bohr radius)
  - ``muB`` (Bohr magneton)
  - ``alpha`` (Fine-structure constant)
  - ``mu0`` (Vacuum magnetic permeability)
  - ``sigma_T`` (Thomson scattering cross-section)

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

- Allow ``np.concatenate``, ``np.stack`` and similar numpy functions to
  be applied on representations and differentials.

  They can also be applied to coordinate frames and ``SkyCoord``, though
  with the same limitation as for setting elements of frames and
  coordinates: all frame attributes have to be scalars (or arrays with
  only identical elements).

- The results of ``match_coordinates_3d()``, ``match_coordinates_sky()``,
  ``search_around_3d()`` and ``search_around_sky()`` and the corresponding
  ``SkyCoord`` methods now have named attributes.

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

- The trait ``astropy.cosmology.traits.CurvatureComponent`` has been added to work with
  objects that have attributes and methods related to the global curvature.

- The trait ``astropy.cosmology.traits.HubbleParameter`` has been added to work with objects that have attributes and methods related to the Hubble parameter.

- The trait ``astropy.cosmology.traits.DarkEnergyComponent`` has been added to work with objects that have attributes and methods related to the Dark Energy component.

- Cosmology methods now exclusively return arrays, not floats or other scalars.

- The trait ``astropy.cosmology.traits.DarkMatterComponent`` has been added to work with
  objects that have attributes and methods related to dark matter.

- The trait ``astropy.cosmology.traits.MatterComponent`` has been added to work with
  objects that have attributes and methods related to matter density.
  The trait ``astropy.cosmology.traits.BaryonComponent`` has been added to work with
  objects that have attributes and methods related to baryonic matter.
  The trait ``astropy.cosmology.traits.CriticalDensity`` has been added to work with
  objects that have attributes and methods related to the critical density.

- The trait ``astropy.cosmology.traits.PhotonComponent`` has been added to work with objects that have attributes and methods related to photons.

- The trait ``astropy.cosmology.traits.TotalComponent`` has been added to work with objects that have attributes and methods related to the total density component of the universe.

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

- CDS table reader will find the metadata for gzipped tables in the accompanying ReadMe file.

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

- Enable color and suggestion-on-typos in all ``argparse`` CLIs for Python 3.14
  (``fitscheck``, ``fitsdiff``, ``fitsheader`` and ``fitsinfo``).

- Allow reading a FITS file hosted on a cloud resource like Amazon S3 via
  ``Table.read()``. This is done with a new ``fsspec_kwargs`` dict argument
  that gets passed through to ``fsspec`` to access cloud resources.

- It is now possible to check the existence of ``Columns`` in ``ColDefs`` by using the membership operator.

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

- Added a new ECSV table reading module that supports different backend engines for the
  CSV data parsing. In addition to the default "io.ascii" engine, this includes engines
  that use the PyArrow and Pandas CSV readers. These can be up to 16 times faster and are
  more memory efficient than the native astropy ECSV reader. To get help with this
  interface run ``Table.read.help(format="ecsv")``.

- Improve support for compressed file formats in the ECSV and the pyarrow CSV
  Table readers. All formats supported  by ``astropy.utils.data.get_readable_fileobj()``
  (currently gzip, bzip2, lzma (xz) or lzw (Z)) will now work with these readers.

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

- Allow setting EXTNAME when writing a ``Table`` to a FITS file, e.g.
  ``tbl.write("filename.fits", name="CAT", append=True)``.

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

- Enable color and suggestion-on-typos in ``volint`` CLI for Python 3.14

- Modified the constructor for ``astropy.io.votable.tree.TableElement`` to use the version configuration information from the parent ``VOTableFile`` instance. This allows for better handling of version-specific features and ensures that the table element is created with the correct context regarding the VOTable version.

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

- Add support for unit change propagation through the ``|`` (model composition) operator,
  using either `~astropy.modeling.compose_models_with_units` or by setting the
  ``unit_change_composition`` attribute on the model after composition.

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

- The ``interpret_bit_flags`` function now strips whitespace from flag names.

astropy.samp
^^^^^^^^^^^^

- Enable color and suggestion-on-typos in ``samp_hub`` CLI for Python 3.14

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

- Enable color and suggestion-on-typos in ``showtable`` CLI for Python 3.14

- Added generic ``from_df`` and ``to_df`` methods to ``astropy.Table`` using
  ``narwhals``. These methods provide a unified interface for converting between
  Astropy Tables and various DataFrame formats (pandas, polars, pyarrow, etc.)
  through the narwhals library. The ``to_df`` method converts an Astropy Table
  to any supported DataFrame format, while ``from_df`` creates an Astropy Table
  from any narwhals-compatible DataFrame. Narwhals is a lightweight compatibility
  layer that provides a unified API across different DataFrame libraries, allowing
  seamless interoperability without requiring all DataFrame libraries as dependencies.

- Setting the ``units`` or ``descriptions`` of ``QTable`` and ``Table``
  has been made more flexible for tables with optional columns that may
  or may not appear in the data. This applies to directly creating a table
  as well as reading formatted data with the ``read()`` method.

  In both cases you can supply ``units`` and ``description`` arguments as a
  ``dict`` that specifies the units and descriptions for column names in
  the table. Previously, if the input table did not contain a column that
  was specified in the ``units`` or ``description`` dict, a ``ValueError``
  was raised. Now, such columns are simply ignored.

- A new method has been added for accessing a table index for tables with multiple
  indices. You can now select the index with the ``with_index(index_id)`` method of the
  ``.loc``, ``.iloc``, and ``.loc_indices`` properties. For example, for a table ``t``
  which has two indices on columns ``"a"`` and ``"b"`` respectively,
  ``t.loc.with_index("b")[2]`` will use index ``"b"`` to find all the table rows where
  ``t["b"] == 2``. Doing this query using the previous syntax ``t.loc["b", 2]`` is
  deprecated and this functionality is planned for removal in astropy 9.0.

  In addition, support has been added for using ``.loc``, ``.iloc``, and ``.loc_indices``
  with an index based on two or more key columns. Previously this raised a ``ValueError``.

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

- Allow ``np.concatenate``, ``np.stack`` and similar numpy functions to
  be applied on ``Time`` and ``TimeDelta`` instances.

- Add a new time format ``galex`` for the GALEX satellite.

  In GALEX data, due to uncertainty in the spacecraft clock, the absolute time is only accurate to
  about 1-10 seconds while the relative time within an observation is better than 0.005 s or so,
  except on days with leap seconds, where relative times can be wrong by up to 1 s.
  See question 101.2 in https://www.galex.caltech.edu/researcher/faq.html

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

- Some unit formats have deprecated units and converting such units to strings
  emits a warning.
  The new ``deprecations`` parameter of the unit ``to_string()`` methods allows
  automatically converting deprecated units (if possible), silencing the warnings
  or raising them as errors instead.

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

- Enable color and suggestion-on-typos in ``fits2bitmap`` CLI for Python 3.14

- Added ``show_decimal_unit`` to ``set_major_formatter`` to control whether
  or not units are shown in decimal mode.

- Added the methods ``set_visible()`` and ``set_position()`` to control the visibility and position of ticks, tick labels, and axis labels in a single call.

  Also added ``get_ticks_visible()``, ``get_ticklabel_visible()``, and ``get_axislabel_visible()`` methods to get the visibility state of each coordinate element.

- Added an image interval option (``SymmetricInterval``) for specifying a
  symmetric extent about a midpoint, and the extent that contains both the image
  minimum and maximum can be automatically determined.

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

- Enable color and suggestion-on-typos in all ``wcslint`` CLI for Python 3.14

- Added a ``perserve_units`` keyword argument to ``WCS`` to optionally request
  that units are not converted to SI (the default behavior is for celestial axes
  to have units converted to degrees, and spectral axes to m or Hz).
@
text
@# $NetBSD: Makefile,v 1.26 2025/10/28 09:26:50 adam Exp $

DISTNAME=	astropy-7.2.0
PKGNAME=	${PYPKGPREFIX}-${DISTNAME}
CATEGORIES=	math python
MASTER_SITES=	${MASTER_SITE_PYPI:=a/astropy/}

MAINTAINER=	pkgsrc-users@@NetBSD.org
HOMEPAGE=	https://www.astropy.org/
COMMENT=	Python module for astronomical calculations and data analysis
LICENSE=	modified-bsd

TOOL_DEPENDS+=	${PYPKGPREFIX}-cython>=3.0.0:../../devel/py-cython
TOOL_DEPENDS+=	${PYPKGPREFIX}-extension-helpers>=1:../../devel/py-extension-helpers
TOOL_DEPENDS+=	${PYPKGPREFIX}-setuptools>=78:../../devel/py-setuptools
TOOL_DEPENDS+=	${PYPKGPREFIX}-setuptools_scm>=8.0.0:../../devel/py-setuptools_scm
DEPENDS+=	${PYPKGPREFIX}-astropy-iers-data>=0.2025.10.27.0.39.10:../../math/py-astropy-iers-data
DEPENDS+=	${PYPKGPREFIX}-pyerfa>=2.0.1.1:../../math/py-pyerfa
DEPENDS+=	${PYPKGPREFIX}-packaging>=22.0:../../devel/py-packaging
DEPENDS+=	${PYPKGPREFIX}-yaml>=6.0.0:../../textproc/py-yaml
# recommended
DEPENDS+=	${PYPKGPREFIX}-matplotlib>=3.8.0:../../graphics/py-matplotlib
DEPENDS+=	${PYPKGPREFIX}-scipy>=1.9.2:../../math/py-scipy
TEST_DEPENDS+=	${PYPKGPREFIX}-coverage>=6.4.4:../../devel/py-coverage
#TEST_DEPENDS+=	${PYPKGPREFIX}-test-astropy>=0.10.0:../../math/py-test-astropy
TEST_DEPENDS+=	${PYPKGPREFIX}-test-astropy-header>=0.2.1:../../devel/py-test-astropy-header
TEST_DEPENDS+=	${PYPKGPREFIX}-test-doctestplus>=1.4.0:../../devel/py-test-doctestplus
TEST_DEPENDS+=	${PYPKGPREFIX}-test-xdist>=2.5.0:../../devel/py-test-xdist
TEST_DEPENDS+=	${PYPKGPREFIX}-threadpoolctl>=3.0.0:../../parallel/py-threadpoolctl

USE_LANGUAGES=	c c++

PYTHON_SELF_CONFLICT=	yes

PYTHON_VERSIONS_INCOMPATIBLE=	310

.include "../../lang/python/wheel.mk"
.include "../../math/py-numpy/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
@


1.26
log
@py-astropy: updated to 7.1.1

Version 7.1.1 (2025-10-10)

Bug Fixes

astropy.io.fits

- Writing zero-row BinTableHDU with string columns no longer raises a broadcast error in _ascii_encode()

- Compute maximum absolute and relative differences reported by ``ImageDataDiff``
  on the full arrays instead of only a few values.

- Fix slicing FITS compressed file with ``.section`` when data is scaled.

astropy.io.misc

- Fixed a bug where coordinate frame objects could not be serialized to YAML. This caused
  an exception when saving a ``SkyCoord`` object in particular frames like
  ``galactocentric`` in which frame attributes are themselves a frame.

astropy.io.votable

- Fix handling of bounded variable-length char arrays in BINARY2 format which were previously treated as fixed length.

astropy.nddata

- Fixed key error with numpy functions ``np.min``, ``np.max``, ``np.mean``, and ``np.sum``.

- Fix partial cutouts with FITS compressed file and scaled data.

astropy.table

- Fixed a bug in ``table.table_helpers.ArrayWrapper`` where byteorder of the
  underlying data was not necessarily preserved through roundtrips.

- Fix bug 10732 where removing rows on an indexed table that was subsequently sliced
  (e.g. ``t.add_index("a"); ts = t[1:5]; ts.remove_row(2)``) was giving incorrect results
  or failing.

astropy.time

- Ensure that the fast C parser for ``Time`` works also with numpy 2.3.0, fixing
  a bug in our implementation which had no effect in previous numpy versions.

astropy.timeseries

- Fixed the ``aggregate_downsample`` performance degradation when
  non-default ``aggregate_func`` is used.

astropy.units

- Fixed the LaTeX representation of ``DexUnit`` in ``astropy.units``,
  and thus also how it is represented in, e.g., jupyter notebooks.

astropy.visualization

- Fix a bug that caused ``WCSAxes.get_transform`` to not return the correct
  transform when using WCS instances with celestial axes that were not in
  degrees.

- Fixed a bug that under certain conditions could lead to ticks being incorrectly
  labelled with a single "$" dollar sign in WCSAxes.

- Fixed WCSAxes.get_transform() in the case of 1D WCS

- Fixed a bug that caused the default format unit to be incorrect for RA/Dec WCSes with non-degree units

- Fix a bug where the units of the ``values=`` keyword argument to ``set_ticks`` was not respected.

astropy.wcs

- Fixed an issue which caused calls to WCS coordinate conversion routines to not be thread-safe due to calls to WCS.wcs.set() from multiple threads.

- Fix a bug that caused the output of ``WCS.wcs.print_contents()`` to be truncated
  and to then cause the output of subsequent ``print_contents()`` calls (on
  ``WCS.wcs`` or other wcs objects such as ``WCS.wcs.wtb``) to be corrupted.

- Fixed a bug in ``WCS.pixel_to_world`` for spectral WCS where ``restfrq`` was
  defined but CTYPE was ``VOPT``, and likewise where ``restwav`` was defined but
  CTYPE was ``VRAD``.

- Fixed a bug where world->pixel conversions did not work correctly on a 1D WCS
  sliced via ``SlicedLowLevelWCS``.

- Fixed a bug that caused slicing of WCS objects with an ellipsis to not return a WCS
  object but instead a SlicedLowLevelWCS object.

- Fixed a bug in ``wcs.py`` that caused the WCS object to not properly initialize
  the `_naxis` attribute when the header was empty or did not contain any WCS
  information. This could lead to crashes when attempting to take a slice of a 3D
  WCS object or it could lead unexpected behavior when accessing pixel shape
  or other properties that depend on the number of axes.

- Fixed a race condition when using the APE-14 API for the ``WCS`` class in a multi-threaded environment.


Performance Improvements

astropy.modeling

- Improved performance of ``modeling.rotations.spherical2cartesian()`` by 11-18% depending on the size of the input data arrays.


Other Changes and Additions

- Fixed errors with building the package from source on Windows via
  ``python -m build`` and similar commands.

- Pre-built binaries (wheels) for Linux are now built using the ``manylinux_2_28``
  image (previously, ``manylinux2014`` was used).
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.25 2025/10/09 07:57:46 wiz Exp $
d3 1
a3 1
DISTNAME=	astropy-7.1.1
d17 2
a18 2
DEPENDS+=	${PYPKGPREFIX}-astropy-iers-data>=0.2025.9.29.0.35.48:../../math/py-astropy-iers-data
DEPENDS+=	${PYPKGPREFIX}-pyerfa>=2.0.0.1:../../math/py-pyerfa
d22 1
a22 1
DEPENDS+=	${PYPKGPREFIX}-matplotlib>=3.6.0:../../graphics/py-matplotlib
d24 6
@


1.25
log
@*: remove reference to (removed) Python 3.9
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.24 2025/06/13 07:06:41 adam Exp $
d3 1
a3 1
DISTNAME=	astropy-7.1.0
d17 1
a17 1
DEPENDS+=	${PYPKGPREFIX}-astropy-iers-data>=0.2024.8.27.10.28.29:../../math/py-astropy-iers-data
@


1.24
log
@py-astropy: updated to 7.1.0

Version 7.1.0 (2025-05-20)

New Features

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

- ``search_around_sky`` and ``search_around_3D`` now accept separations/distlimits
  broadcastable to the same shape as ``coords1``.

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

- Add functionality to read and write to a Table from the TDAT format as part of
  the Unified File Read/Write Interface.

- ``io.ascii`` now supports on-the-fly decompression of LZW-compressed files
  (typically ".Z" extension) via the optional package uncompresspy.

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

- Astropy can now not only read but also write headers that have ``HIERARCH``
  keys with long values, by allowing the use of ``CONTINUE`` cards for those
  (as was already the case for regular FITS keys).

- Add ``strip_spaces`` option to ``Table.read`` to strip trailing whitespaces in
  string columns.  This will be activated by default in the next major release.

- ``io.fits`` now supports on-the-fly decompression of LZW-compressed files
  (typically ".Z" extension) via the optional package uncompresspy.

- ``io.fits`` now supports on-the-fly decompression of LZMA-compressed files
  (typically ".xz" extension) if the lzma module is provided by the Python
  installation.

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

- Add a fast ``Table`` CSV reader that uses the PyArrow ``read_csv()`` function. This can
  be significantly faster and more memory-efficient than the ``astropy.io.ascii`` fast
  reader. This new reader can be used with ``Table.read()`` by setting
  ``format="pyarrow.csv"``.

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

- New module ``astropy.io.votable.dataorigin`` to extract Data Origin information from INFO in VOTable.

- ``CooSys`` VOTable elements now have a method ``to_astropy_frame`` that returns the
  corresponding astropy built-in frame, when possible.

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

- Added a ``fit_info=`` keyword argument to ``parallel_fit_dask`` to allow users to preserve fit information from each individual fit.

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

- Adds a utility class, ``astropy.nddata.Covariance``, used to construct, access,
  and store covariance matrices.  The class depends on use of the ``scipy.sparse``
  module.

- Add the ``limit_rounding_method`` parameter to `~astropy.nddata.Cutout2D`,
  `~astropy.nddata.overlap_slices`, `~astropy.nddata.extract_array`, and
  `~astropy.nddata.add_array` to allow users to specify the rounding method
  used when calculating the pixel limits of the cutout. The default method
  is to use `~numpy.ceil`.

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

- Document that ``Table.group_by``'s underlying sorting algorithm is guaranteed
  to be stable. This reflects behavior that was already present but undocumented,
  at least since astropy 6.0 .

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

- Downsampling now works correctly also on ``MaskedColumn`` and
  ``MaskedQuantity`` with possibly masked elements.  Furthermore, the type of
  (Masked) column will now be properly preserved in downsampling.

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

- Units with the "micro" prefix can now be imported using ``"μ"`` in the name.
  For example, the microgram can now be imported with
  ``from astropy.units import μg``.

- It is now possible to import angström, litre and ohm from ``astropy.units``
  using the ``Å``, ``ℓ`` and ``Ω`` symbols.

- Unit conversions between kelvins and degrees Rankine no longer require the
  ``temperature`` equivalency.

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

- Make commonly used Masked subclasses importable for ASDF support.

  Registered types associated with ASDF converters must be importable by
  their fully qualified name. Masked classes are dynamically created and have
  apparent names like ``astropy.utils.masked.core.MaskedQuantity`` although
  they aren't actually attributes of this module. Customize module attribute
  lookup so that certain commonly used Masked classes are importable.

  See:

  - https://asdf.readthedocs.io/en/latest/asdf/extending/converters.html#entry-point-performance-considerations
  - https://github.com/astropy/asdf-astropy/pull/253

- ``astropy.utils.data.download_file`` can now recover from a ``TimeoutError``
  when given a list of alternative source URLs. Previously, only ``URLError``
  exceptions were recoverable. An exception is still being raised after trying all
  URLs provided if none of them could be reached.

- ``utils.data`` now supports on-the-fly decompression of LZW-compressed files
  (typically ".Z" extension) via the optional package uncompresspy.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.23 2025/05/14 14:40:55 adam Exp $
d29 1
a29 1
PYTHON_VERSIONS_INCOMPATIBLE=	39 310
@


1.23
log
@py-astropy: updated to 7.0.2

Version 7.0.2 (2025-05-12)

Bug Fixes

astropy.config

- Fix a bug where config file generation did not parse nested subclasses of ``astropy.config.ConfigNamespace``.

astropy.io.fits

- Fix a bug in ``nddata.Cutout2D`` when creating partial cutouts of ``Section`` objects by adding a ``dtype`` property to the ``Section`` class.

- Fixed a bug so that now the scaling state from the source HDU to the new appended HDU is copied on the
  destination file, when the HDU is read with ``do_not_scale_image_data=True``.

- Fix setting a slice on table rows (``FITS_record``).

- Fix checksum computation for tables with VLA columns, when table is loaded in
  memory.

- Fix ``.fileinfo()`` for compressed HDUs.

- Fix FITS_rec repr when a column has scaling factors, leading to a crash with
  numpy>=2.0.

- Fixed a bug that caused THEAP, ZBLANK, ZSCALE, and ZZERO to not be correctly
  removed during decompression of tile-compressed FITS files.

astropy.io.votable

- ``astropy`` v7.0.0 erroneously refused to write a VOTable if it contained units that
  could not be represented in the CDS format.
  Now ``astropy`` correctly chooses the unit format based on the VOTable version.
  The bug in question did not cause any corruption in tables that were successfully
  written because the newer VOUnit format is backwards compatible with the CDS format.
  Furthermore, any unit that is in neither formats would still be written out
  but would issue a warning.

- ``unicodeChar`` fields can now be of bounded variable size (``arraysize="10*``).

astropy.modeling

- Fixed an issue where the ``filter_non_finite`` option was not working
  for 2D models. An error is raised when the ``filter_non_finite`` option
  is set to ``True`` and all values are non-finite.

astropy.stats

- Now ``bayesian_blocks(t, x, fitness="events")`` correctly handles the case
  when the input data ``x`` contains zeros.

astropy.table

- Prevent corrupting a column by mutating its name to an invalid type.
  A ``TypeError`` is now raised when a name is set to anything other than a
  string.

- Fix a bug in creating a ``Table`` from a list of rows that dropped the units
  of non-scalar Quantity, e.g., ``Table(rows=[([1] * u.m,), ([2] * u.m,)])``.

astropy.units

- Ensured that the units of ``yp``, ``refa`` and ``refb`` are properly
  taken into account when calling ``erfa.apio`` (previously, the
  conversion required for ``xp`` was applied to those inputs too).

- The machinery that injects units into a namespace (used e.g. by ``def_unit()``)
  now applies NFKC normalization to unit names when checking for name collisions.
  This prevents name collisions if the namespace belongs to a module and the unit
  is accessed as an attribute of that module.

- The string representations of the prefixed versions of ``solLum``, ``solMass``
  and ``solRad`` units can now be parsed by default.
  Previously they could only be parsed if the ``required_by_vounit`` module had
  been imported, possibly indirectly by using the ``"vounit"`` format.

astropy.utils

- Prevent corrupting a mixin column's ``info`` attribute by mutating its name to
  an invalid type. A ``TypeError`` is now raised when a name is set to anything
  other than a string.

astropy.visualization

- Ensure that the ``astropy.visualization.wcsaxes.custom_ucd_coord_meta_mapping``
  context manager performs a (correct) cleanup.

- Fixed interval classes for masked input (``MaskedArray`` and ``MaskedNDArray``).

- Fixed the limits of ``a`` parameter in the ``PowerDistStretch``
  and ``InvertedPowerDistStretch`` classes so that a value of
  0 in no longer allowed. That value gives infinity values in
  ``InvertedPowerDistStretch`` and it makes the ``PowerDistStretch``
  results independent of the input data.

- Fixed an issue where LinearStretch values were not being clipped to
  [0:1] when ``clip=True``.

astropy.wcs

- Fix UCD for air wavelengths, following the IVOA recommendation that ``'em.wl'``
  be reserved for vacuum wavelengths. ``'em.wl;obs.atmos'`` is now used to
  represent air wavelengths instead.


Other Changes and Additions

- Updated the bundled CFITSIO library to 4.6.0.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.22 2025/04/15 16:31:37 adam Exp $
d3 1
a3 1
DISTNAME=	astropy-7.0.2
d13 2
a14 1
TOOL_DEPENDS+=	${PYPKGPREFIX}-extension-helpers-[0-9]*:../../devel/py-extension-helpers
d16 1
a16 1
TOOL_DEPENDS+=	${PYPKGPREFIX}-setuptools_scm-[0-9]*:../../devel/py-setuptools_scm
d19 2
a20 2
DEPENDS+=	${PYPKGPREFIX}-packaging>=19.0:../../devel/py-packaging
DEPENDS+=	${PYPKGPREFIX}-yaml>=3.13:../../textproc/py-yaml
d22 2
a23 2
DEPENDS+=	${PYPKGPREFIX}-matplotlib>=3.5.3:../../graphics/py-matplotlib
DEPENDS+=	${PYPKGPREFIX}-scipy>=1.8:../../math/py-scipy
d29 1
a29 1
PYTHON_VERSIONS_INCOMPATIBLE=	39
@


1.22
log
@Fix PLIST after py-setuptools update; bump depends and revision
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.21 2025/02/07 07:29:15 adam Exp $
d3 1
a3 1
DISTNAME=	astropy-7.0.1
a4 1
PKGREVISION=	1
@


1.21
log
@py-astropy: updated to 7.0.1

Version 7.0.1 (2025-02-06)

API Changes

astropy.table

- The use of the keyword ``use_local_files`` for the js viewer in
  ``astropy.table.Table.show_in_browser`` is now deprecated. Starting in Astropy
  7.1 this keyword will be ignored and use of it will issue a warning. The
  default behavior will be to use the remote versions of jQuery and DataTables
  from a CDN.

Bug Fixes

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

- With ``astropy`` v7.0.0 the cache directory cannot be customized with the
  ``XDG_CACHE_HOME`` environment variable.
  Instead, ``XDG_CONFIG_HOME`` erroneously controls both configuration and cache
  directories.
  The correct pre-v7.0.0 behaviour has been restored, but it is possible that
  ``astropy`` v7.0.0 has written cache files to surprising locations.
  Concerned users can use the ``get_cache_dir_path()`` function to check where
  the cache files are written.

  The bug in question does not affect systems where the ``XDG_CACHE_HOME`` and
  ``XDG_CONFIG_HOME`` environment variables are unset.

astropy.coordinates

- Fixed a numerical-precision bug with the calculation of the ``theta``
  component when converting from ``CylindricalRepresentation`` to
  ``PhysicsSphericalRepresentation`` for vectors very close to the Z axis (within
  milliarcseconds).

astropy.io.ascii

- Fixed parsing ASCII table with data that starts with a tilda.

- Find and read ASCII tables even if there is white space before
  ``\begin{tabular}``, ``\tablehead``, and similar markers.

astropy.io.fits

- Fix memory leak in ```BinTableHDU.copy()```

- Fix overflow error with Numpy 2 and VLA columns using P format.

- Fix ``ImageHDU.scale`` with float.

- Fixed ``Table.write(..., format="fits", overwrite=True)`` when filename is
  provided as ``pathlib.Path``.

astropy.io.votable

- Updated XML writer for ``VOTableFile`` element to include or drop
  ``coordinate_systems`` regardless of version.

astropy.modeling

- Fix fitting of compound models when inputs has more than one dimension, and
  specifically fix fitting of compound models with Polynomial2D components

astropy.table

- Ensure that representations and differentials, like SkyCoord, can be used in
  table join operations, by making use of the fact that they can now be masked.

- Fix a crash in ``Table.show_in_browser`` due to an internal type inconsistency.

- Fix incorrect description of the ``unique`` parameter in ``Table.add_index``'s
  docstring. Add missing Raises section.

astropy.units

- Ensure that ``Unit.to`` allows as ``value`` argument all array types that
  follow the array API standard and define ``__array_namespace__``. Furthermore,
  for backwards compatibility, generally pass through arguments that define a
  ``.dtype``, independent of whether that is a numpy data type.

- The zebi (Zi, 2^70) and yobi (Yi, 2^80) binary prefixes are now supported.

astropy.visualization

- Fix ``CoordinateHelper.ticklabels``. The getter was incorrectly returning
  the helper's ticks rather than the labels.

- The following private classes from ``astropy.visualization.lupton_rgb``, that
  were dropped without deprecation in astropy 7.0.0, were re-introduced following
  a report that they were used downstream. The following classes are now
  considered public:

  - ``Mapping``
  - ``AsinhMapping``
  - ``LinearMapping``
  - ``AsinhZScaleMapping``

Other Changes and Additions

- Update bundled js library datatables to version 2.1.8, which is current at the time of this PR.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.20 2025/01/21 01:18:25 wen Exp $
d5 1
d15 1
@


1.20
log
@Update to 7.0.0

Upstream changelog is too long, please visit:
https://docs.astropy.org/en/latest/changelog.html#version-7-0-0-2024-11-21
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.19 2024/11/11 07:28:40 wiz Exp $
d3 1
a3 1
DISTNAME=	astropy-7.0.0
@


1.19
log
@py-*: remove unused tool dependency

py-setuptools includes the py-wheel functionality nowadays
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.18 2024/10/14 06:45:49 wiz Exp $
d3 1
a3 1
DISTNAME=	astropy-6.1.4
@


1.18
log
@*: clean-up after python38 removal
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.17 2024/10/03 12:03:43 adam Exp $
a14 1
TOOL_DEPENDS+=	${PYPKGPREFIX}-wheel-[0-9]*:../../devel/py-wheel
@


1.17
log
@py-astropy: updated to 6.1.4

Version 6.1.4 (2024-09-26)

Bug Fixes

astropy.coordinates

- Keep ``Latitude`` from printing long input arrays in their entirety when failing
  limits check in ``_validate_angles``, indicating their range instead.

- Avoid some components not being included in table output of coordinates if
  the representation type was ``"unitspherical"``.

  In the process, also ensured that one can pass in the ``radial_velocity``
  keyword argument if one uses ``differential_type="radial"``.

astropy.io.votable

- Ensure proper handling of null values during BINARY2 serialization. Previously, masks were handled in two different ways for BINARY2 serialization, resulting in incorrect handling of null values and errors.

astropy.stats

- Fixed a bug in biweight_location, biweight_scale, and
  biweight_midvariance where the returned array shape would be wrong if
  the input array had an axis length of 1 along any axis that was not
  included in the axis keyword. Also fixed a bug in these same functions
  where for constant data and axis set to a tuple containing all axes, the
  returned value would be NaN instead of the constant value.

astropy.table

- Ensure that initializing a ``QTable`` with explicit units` also succeeds if
  one of the units is ``u.one``.

astropy.units

- An exception is now raised if it is attempted to create a unit with a
  scale of zero, avoiding bugs further downstream (including surprising
  ones, such as a comparison of ``np.ma.masked == u.one`` leading to
  a ``ZeroDivisionError``).

astropy.wcs

- Fix a bug that caused the results from local_partial_pixel_derivative to be incorrect when using normalize_by_world=True (the matrix was previously normalized along the wrong axis)


Other Changes and Additions

- Minimal requirement for (optional dependency) matplotlib was bumped
  to 3.5.0, which is the oldest version with support for Python 3.10
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.16 2024/09/11 11:45:20 adam Exp $
d28 1
a28 1
PYTHON_VERSIONS_INCOMPATIBLE=	38 39
@


1.16
log
@py-astropy: updated to 6.1.3

Version 6.1.3 (2024-08-30)

Bug Fixes

astropy.io.fits

- Fix reading zero-width columns such as 0A fields.

- Ensure that ``QTable``, like ``Table``, can read zero-length string columns,
  and not convert them to length 1 strings. In the process, avoid a needless
  copy of all the data for ``QTable``.

astropy.io.votable

- Fix KeyError when parsing certain VOTables.

astropy.modeling

- Fixed the ``fit_deriv`` calculations in the ``Lorentz1D`` model.

astropy.table

- Pretty-printing of Tables now also works in the presence of zero-length string
  columns (which sometimes are present in FITS tables).

astropy.utils

- Fix the return type for ``np.broadcast_arrays`` on a single ``Masked``
  instance: it now correctly returns a 1-element sequence instead of a single
  array, just like would be the case with a regular array.

astropy.wcs

- Fix a bug where ``wcs_info_str``'s results would look different in numpy 2 VS
  numpy 1.


Other Changes and Additions

- The minimum required version of PyArrow is now v7.0.0.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.15 2024/08/06 08:39:20 adam Exp $
d3 1
a3 1
DISTNAME=	astropy-6.1.3
d16 1
a16 1
DEPENDS+=	${PYPKGPREFIX}-astropy-iers-data>=0.2024.7.1.0.34.3:../../math/py-astropy-iers-data
@


1.15
log
@py-astropy: updated to 6.1.2

Version 6.1.2 (2024-07-23)

Bug Fixes

astropy.io.ascii

- When reading CDS and MRT files, only interpret a line as a section delimiter if
  it contains exclusively dashes or equal signs. This enables rows starting with dashes.

astropy.io.fits

- Fix a spurious exception when reading integer compressed images with blanks.

- Fixed a crash that occurred for files opened via
  ``fits.open(..., mode='update')``, on Windows, and with numpy 2.0 installed.
  A warning is now emitted in cases most likely to escalate into
  undefined behavior (e.g., segfaults), i.e., when a closed memory map object is
  still referenced by external code. Please report any regression found.

astropy.modeling

- Fixed a bug that caused models returned by non-linear fitters to have
  ``sync_constraints`` set to `False`, which caused constraints accessed through, e.g.,
  ``Model.fixed`` to not be in sync with the ``fixed`` attribute of the parameters.

- Fixed a bug that caused ``CompoundModel.without_units_for_data`` to return an
  incorrectly constructed model when the compound model contained a * or /
  operation, and which also caused fitting to not work correctly with compound
  models that contained * or / operations.

astropy.units

- The OGIP parser is now less restrictive with strings that represent a unit that
  includes the ``sqrt`` function.
  For example, ``u.Unit("sqrt(m)**3", format="ogip")`` no longer causes a
  ``ValueError``.

astropy.utils

- Fixed an edge-case bug in ``overlap_slices`` where the function could
  return an empty slice for non-overlapping slices.

astropy.visualization

- Fixed a WCSAxes bug when overlaying a frame with default units that are not degrees.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.14 2024/06/25 02:00:30 gutteridge Exp $
d3 1
a3 1
DISTNAME=	astropy-6.1.2
d28 1
a28 1
PYTHON_VERSIONS_INCOMPATIBLE=	27 38 39
@


1.14
log
@py-astropy: revert previous tools change, not necessary

(I misread something. In any case, I have a patch based on upstream
changes that do away with that expectation about py-setuputils; it's
presently in testing.)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.13 2024/06/24 23:14:28 gutteridge Exp $
d3 1
a3 1
DISTNAME=	astropy-5.3.4
a4 1
PKGREVISION=	1
d13 1
d16 1
a16 2
TOOL_DEPENDS+=	${PYPKGPREFIX}-extension-helpers-[0-9]*:../../devel/py-extension-helpers
DEPENDS+=	${PYPKGPREFIX}-yaml>=3.13:../../textproc/py-yaml
d19 1
a20 1
DEPENDS+=	${PYPKGPREFIX}-scipy>=1.5:../../math/py-scipy
d22 1
d26 3
a28 1
PYTHON_VERSIONS_INCOMPATIBLE=	27 38
@


1.13
log
@py-astropy: py-setuptools is a tool dependency
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.12 2024/05/11 15:38:30 wiz Exp $
a13 1
TOOL_DEPENDS+=	${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
@


1.12
log
@py-astropy: convert to wheel.mk

Bump PKGREVISION.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.11 2023/10/20 14:16:35 adam Exp $
d14 1
@


1.11
log
@py-astropy: updated to 5.3.4

Version 5.3.4 (2023-10-03)
==========================

Bug Fixes
---------

astropy.io.misc

- Updated ``astropy.io.misc.yaml`` so ``dump()` with a numpy object array or
  ``load()`` with YAML representing a Numpy object array both raise
  ``TypeError``. This prevents problems like a segmentation fault.

astropy.io.votable

- Fixed a bug in ``convert_to_writable_filelike`` where ``GzipFile`` was not
  closed properly.

astropy.units

- In VOUnit, the spaces around the slash were removed in the formatting of
  fractions, and fractional powers now also use the "**" operator.

- We now ensure that the unit ``u.cgs.cm`` is just an alias of ``u.si.cm``,
  instead of a redefinition.  This ensures that ``u.Unit("cm") / u.cm``
  will reliably cancel to dimensionless (instead of some "cm / cm").

astropy.utils

- For ``Masked``, ``np.ptp`` and the ``.ptp()`` method now properly account for
  the mask, ensuring the result is identical to subtracting the maximum and
  minimum (with the same arguments).
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.10 2023/09/16 04:24:31 adam Exp $
d5 1
d14 2
a25 2
USE_PKG_RESOURCES=	yes

d28 1
a28 1
.include "../../lang/python/egg.mk"
@


1.10
log
@py-astropy: updated to 5.3.3

Version v5.3.3 (2023-09-07)
===========================

Bug Fixes
---------

astropy.coordinates

- ``TransformGraph.to_dot_graph()`` now throws an exception for invalid ``savelayout``.

astropy.cosmology

- The exponent of ``w0wzCDM`` functions in ``inv_efunc`` has been corrected to 3, from -3.

astropy.modeling

- Astropy modeling can filter non-finite data values using the ``filter_non_finite``
  keyword argument in a fitter call. Now when ``filter_non_finite`` is True,
  non-finite *weights* will also be filtered to prevent crashes in ``LevMarLSQFitter``.

astropy.units

- Fixed ``astropy.units.Quantity``'s implementation of ``numpy.nanmedian()``,
  where for Numpy >= 1.25 an exception was raised for some array shapes and axis
  combinations.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.9 2023/08/31 14:01:37 adam Exp $
d3 1
a3 1
DISTNAME=	astropy-5.3.3
@


1.9
log
@py-astropy: updated to 5.3.2

Version 5.3.2 (2023-08-11)
==========================

Bug Fixes
---------

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

- Fixed import when called with Python ``-OO`` flag.

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

- Fix for collapse operations on ``NDData`` without masks or units.

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

- Modified the implementation of ``np.power()`` for instances of ``Quantity`` to
  allow any array as the second operand if all its elements have the same value.

Version 5.3.1 (2023-07-06)
==========================

Bug Fixes
---------

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

- The exponent in ``wowzCDM.de_density_scale`` has been corrected to 3, from -3.

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

- Fix crash when a PrimaryHDU has a GROUPS keyword with a non-boolean value (i.e.
  not a random-groups HDU).

- Fixed a bug that caused ``Cutout2D`` to not work correctly with ``CompImageHDU.section``

- Fixed a bug that caused compressed images with TFORM missing the optional '1' prefix to not be readable.

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

- All models can be pickled now.

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

- Restore bitmask propagation behavior in ``NDData.mask``, plus a fix
  for arithmetic between masked and unmasked ``NDData`` objects.

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

- Fix a bug where table indexes were not using a stable sort order. This was causing the
  order of rows within groups to not match the original table order when an indexed table
  was grouped.

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

- In VOunits, "pix", "au", "a", and "ct" are removed from the list of deprecated units.

Version 5.3 (2023-05-22)
========================

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

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

- Add optional parameter ``refresh_cache`` to ``EarthLocation.of_site()`` and
  ``EarthLocation.get_site_names()`` to force the download of the latest site
  registry.

- Added ``atol`` argument to function ``is_O3`` and ``is_rotation`` in matrix utilities.

- A new class ``astropy.coordinates.StokesCoord`` has been added to represent world coordinates describing polarization state.
  This change introduces a breaking change to the return value of ``astropy.wcs.WCS.pixel_to_world`` where before a ``u.Quantity`` object would be returned containing numerical values representing a Stokes profile now a ``StokesCoord`` object is returned. The previous numerical values can be accessed with ``StokesCoord.value``.

- Add an optional parameter ``location`` to ``EarthLocation.get_itrs()``
  to allow the generation of topocentric ITRS coordinates with respect
  to a specific location.

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

- Two new cosmologies have been added, ``FlatwpwaCDM`` and ``Flatw0wzCDM``, which are the
  flat variants of ``wpwaCDM`` and ``w0wzCDM``, respectively.

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

- Add ability to read and write an RST (reStructuredText) ASCII table that
  includes additional header rows specifying any or all of the column dtype, unit,
  format, and description. This is available via the new ``header_rows`` keyword
  argument.

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

- Added support for >3D data in CompImageHDU

- Added a ``CompImageHDU.section`` property which can be used to
  efficiently access subsets of the data, similarly to ``ImageHDU.section``.
  When using this, only the tiles required to cover the section are
  read from disk and decompressed.

- Added support for ``'NOCOMPRESS'`` for the ``compression_type`` option in ``CompImageHDU``.

- Added new properties ``compression_type`` and ``tile_shape`` on
  ``CompImageHDU``, giving the name of the compression algorithm
  and the shape of the tiles in the tiled compression respectively.

- Do not call ``gc.collect()`` when closing a ``CompImageHDU`` object as it has a
  large performance penalty.

- VLA tables can now be written with the unified I/O interface.
  When object types are present or the VLA contains different types a `TypeError`
  is thrown.

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

- Add support for writing/reading fixed-size and variable-length array columns to the parquet formatter.

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

- Added a method ``get_infos_by_name`` to make it easier to implement
  DALI-compliant protocols

- Updating the built-in UCD list to upstream 1.5 (which requires a minor
  update to the parser)

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

- Enable check for poorly conditioned fits in ``LinearLSQFitter`` for polynomial
  models with fixed inputs.

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

- ``astropy.nddata.NDDataArray`` now has collapsing methods like ``sum``,
  ``mean``, ``min``, and ``max`` which operate along any axes, and better
  support for ``astropy.utils.Masked`` objects.

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

- ``vonmisesmle`` has now functioning "weights" and "axis" parameters that work equivalently
  to the rest of the functions in the ``circstats`` module (``circmean``, ``rayleightest``, etc.)

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

- ``Table`` and ``QTable`` can now use the ``|`` and ``|=`` operators for
  dictionary-style merge and update.

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

- Add a ``leap_second_strict`` argument to the ``Time.to_datetime()`` method. This
  controls the behavior when converting a time within a leap second to the ``datetime``
  format and can take the values ``raise`` (the default), ``warn``, or ``silent``.

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

- Adds the ``astropy.timeseries.LombScargleMultiband`` class, which is an
  extension of the ``astropy.timeseries.LombScargle`` class. It enables the
  generation of periodograms for datasets with measurements taken in more than
  one photometric band.

- Add ``unit_parse_strict`` parameter to the Kepler reader to control the warnings
  emitted when reading files.

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

- Add support for degrees Celsius for FITS. Parsing "Celsius" and "deg C" is now
  supported and astropy will output "Celsius" into FITS.

  Note that "deg C" is only provided for compatibility with existing FITS files,
  as it does not conform to the normal unit standard, where this should be read
  as "degree * Coulomb". Indeed, compound units like "deg C kg-1" will still be
  parsed as "Coulomb degree per kilogram".

- Enabled the ``equal_nan`` keyword argument for ``np.array_equal()`` when the
  arguments are ``astropy.units.Quantity`` instances.

- Allow "console" and "unicode" formats for conversion to string of
  function units.

- Add a "fraction" options to all the unit ``format`` classes, which determine
  whether, if a unit has bases raised to a negative power, a string
  representation should just show the negative powers (``fraction=False``) or
  use a fraction, and, in the latter case, whether to use a single-line
  representation using a solidus (``fraction='inline'`` or ``fraction=True``)
  or, if the format supports it, a multi-line presentation with the numerator
  and denominator separated by a horizontal line (``fraction='multiline'``).

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

- The ``mean`` method on ``NDDataArray`` now avoids a division by zero
  warning when taking the mean of a fully-masked slice (and still
  returns ``np.nan``).

- Ensure we can read the newer ``IERS_B`` files produced by the International
  Earth Rotation and Reference Systems Service, and point
  ``astropy.utils.iers.IERS_B_URL`` to the new location.


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

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

- ``get_moon()`` is deprecated and may be removed in a future version of
  ``astropy``. Calling ``get_moon(...)`` should be replaced with
  ``get_body("moon", ...)``.

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

- Deprecate the auto-fixing of tile sizes for HCOMPRESS_1 tiled
  image compression when the tile size could be changed by +1
  to make it acceptable.

- The ``tile_size=`` argument to ``CompImageHDU`` has been deprecated
  as it was confusing that it was required to be in the opposite
  order to the data shape (it was in header rather than Numpy order).
  Instead, users should make use of the ``tile_shape=`` argument which
  is in Numpy shape order.

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

- Deprecate the ``humlicek2`` method for `~astropy.modeling.functional_models.Voigt1D` in favor
  of using the ``wofz`` method using the `scipy.special.wofz` implementation of the
  Fadeeva function whenever `scipy` is installed.

- Deprecated ``astropy.modeling.utils.comb()`` function in favor of ``comb()``
  from ``math`` standard library.

- Propagate measurement uncertainties via the ``weights`` keyword argument into the
  parameter covariances.

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

- The conversion of ``astropy.units.Quantity`` to ``bool``
  that was deprecated since astropy 3.0 now raises a ``ValueError``.
  This affects statements like ``if quantity``.
  Use explicit comparisons like ``if quantity.value != 0``
  or ``if quantity is not None`` instead.

- Operations on ``Quantity`` in tables are sped up by only copying ``info`` when
  it makes sense (i.e., when the object can still logically be thought of as the
  same, such as in unit changes or slicing). ``info`` is no longer copied if a
  ``Quantity`` is part of an operation.

- The ``Quantity.nansum`` method has been deprecated. It was always weird that it
  was present, since ``ndarray`` does not have a similar method, and the other
  ``nan*`` functions such as ``nanmean`` did not have a corresponding method.
  Use ``np.nansum(quantity)`` instead.

- The unused ``units.format.Unscaled`` format class has been deprecated.

- The order in which unit bases are displayed has been changed to match the
  order bases are stored in internally, which is by descending power to which
  the base is raised, and alphabetical after. This helps avoid monstrosities
  like ``beam^-1 Jy`` for ``format='fits'``.

  Note that this may affect doctests that use quantities with complicated units.

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

- For ``Masked`` instances, the ``where`` argument for any ufunc can now
  also be masked (with any masked elements masked in the output as well).
  This is not very useful in itself, but avoids problems in conditional
  functions (like ``np.add(ma, 1, where=ma>10)``).

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

- The pixel attribute of ``astropy.visualization.wcsaxes.frame.Spine`` is deprecated
  and will be removed in a future astropy version.
  Because it is (in general) not possible to correctly calculate pixel
  coordinates before Matplotlib is drawing a figure, instead set the world or data
  coordinates of the ``Spine`` using the appropriate setters.

- Passing a bare number as the ``coord_wrap`` argument to ``CoordinateHelper.set_coord_type`` is deprecated.
  Pass a ``Quantity`` with units equivalent to angular degrees instead.

  The ``.coord_wrap`` attribute of ``CoordinateHelper`` is now a ``Quantity`` instead of a bare number.


Bug Fixes
---------

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

- ``Angle.to_string()`` was changed to ensure it matches the behaviour of
  ``Quantity.to_string()`` in having a space between the value and the unit
  for display with non-degree and hourangle units (i.e., the case in which
  units are displayed by their name; the sexagesimal case for degrees or
  hourangle that uses symbols is not changed).

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

- Fix an issue in the ``io.ascii`` QDP format reader to allow lower-case commands in the
  table data file. Previously it required all upper case in order to parse QDP files.

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

- Compressing/decompressing a floating point dataset containing NaN values will
  no longer read in the whole tile as NaNs.

  Fixed segmentation faults that occurred when compressing/decompressing data
  with the PLIO_1 algorithm.

- ``Card`` now uses the default Python representation for floating point
  values.

- ``ImageHDU`` now properly rejects Numpy scalars, avoiding data corruption.

- Fix issues with double quotes in CONTINUE cards.

- Fixes an issue where FITS_rec was incorrectly raising a ValueError exception when the heapsize was greater than 2**31
  when the Column type was 'Q' instead of 'P'.

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

- Columns with big-endian byte ordering (such as those read in from a FITS table) can now be serialized with Parquet.

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

- Bugfix for using ``getter/setter`` in properties to adjust the internal (computational)
  value of a property vs its external proxy value when the values involve units.

- Fix issue with ``filter_non_finite`` option when fitting with ``weights`` via passing
  the ``weights`` through the non-finite-filter alongside the input data.

- Fixed an issue with Parameter where a getter could be input without a
  setter (or vice versa).

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

- Using quantities with units of time for ``Time`` format 'decimalyear' will now
  raise an error instead of converting the quantity to days and then
  interpreting the value as years. An error is raised instead of attempting to
  interpret the unit as years, since the interpretation is ambiguous: in
  'decimaltime' years are equal to 365 or 366 days, while for regular time units
  the year is defined as 365.25 days.

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

- Ensure that ``Distribution`` can be compared with ``==`` and ``!=``
  with regular arrays or scalars, and that inplace operations like
  ``dist[dist<0] *= -1`` work.

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

- Modified ``astropy.units.Quantity.__array_ufunc__()`` to return ``NotImplemented`` instead of raising a ``ValueError`` if the inputs are incompatible.

- Modified the behavior of ``numpy.array_equal()`` and ``numpy.array_equiv()`` to
  return ``False`` instead of raising an error if their arguments are
  ``astropy.units.Quantity`` instances with incompatible units.

- Spaces have been regularized for the ``unicode`` and ``console`` output
  formats: no extraneous spaces in front of the unit, and always a space
  between a possible scale factor and the unit.

- Prefixed degrees and arcmin are now typeset without using the symbol in
  ``latex`` and ``unicode`` formats (i.e., ``mdeg`` instead of ``m°``),
  as was already the case for arcsec.

- Ensure the unit is kept in ``np.median`` even if the result is a scalar ``nan``
  (the unit was lost for numpy < 1.22).

- Ensure that ``Quantity`` with structured dtype can be set using non-structured
  ``Quantity`` (if units match), and that structured dtype names are inferred
  correctly in the creation of ``StructuredUnit``, thus avoiding mismatches
  when setting units.

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

- When using astropy in environments with sparse file systems (e.g., where the temporary directory and astropy data directory resides in different volumes), ``os.rename`` may fail with ``OSError: [Errno 18] Invalid cross-device link``.
  This may affect some clean-up operations executed by the ``data`` module, causing them to fail.
  This patch is to catch ``OSError`` with ``errno == EXDEV`` (i.e., Errno 18) when performing these operations and try to use ``shutil.move`` instead to relocate the data.

- Ensure masks are propagated correctly for ``outer`` methods of ufuncs also if
  one of the inputs is not actually masked.

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

- The location of a ``astropy.visualization.wcsaxes.frame.Spine`` in a plot is now
  correctly calculated when the DPI of a figure changes between a WCSAxes being
  created and the figure being drawn.

- ``CoordinateHelper.set_ticks()`` now accepts ``number=0``. Previously it errored.

- ``WCSAxes.plot_coord`` and ``plot_scatter`` now work correctly for APE 14 compliant WCSes where the units are not always converted to degrees.

- Fixed a bug where coordinate overlays did not automatically determine the
  longitude wrap angle or the appropriate units.

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

- Fix bugs with high-level WCS API on ``wcs.WCS`` object when using ``-TAB``
  coordinates.

- Fixed a bug in how WCS handles ``PVi_ja`` header coefficients when ``CTYPE``
  has ``-SIP`` suffix and in how code detects TPV distortions.


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

- The minimum supported version of Python is now 3.9, changing from 3.8.

- The minimum supported version of Numpy is now 1.21.

- The minimum supported version of matplotlib is now 3.3.

- ``astropy`` no longer publishes wheels for i686 architecture.

- Added a pre-commit configuration for codespell.

- Removed a large fraction of the bundled CFITSIO code and internally refactored
  FITS compression-related code, which has resulted in a speedup when compiling
  astropy from source (40% faster in some cases).

- The CFITSIO library is no longer bundled in full with astropy and
  the option to build against an external installation of CFITSIO
  has now been removed, so the ASTROPY_USE_SYSTEM_CFITSIO environment
  variable will be ignored during building.

- Updated CDS URL for Sesame look-up as the old URL is deprecated.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2023/08/01 23:20:46 wiz Exp $
d3 1
a3 1
DISTNAME=	astropy-5.3.2
d13 1
@


1.8
log
@*: remove more references to Python 3.7
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2023/07/01 08:37:38 wiz Exp $
d3 1
a3 1
DISTNAME=	astropy-5.0.4
a12 7
DEPENDS+=	libxml2>=2.9.10:../../textproc/libxml2
DEPENDS+=	${PYPKGPREFIX}-numpy>=1.18.0:../../math/py-numpy
DEPENDS+=	${PYPKGPREFIX}-scipy>=1.3:../../math/py-scipy
DEPENDS+=	${PYPKGPREFIX}-h5py>=2.9.0:../../devel/py-h5py
DEPENDS+=	${PYPKGPREFIX}-beautifulsoup4>=4.9.3:../../www/py-beautifulsoup4
DEPENDS+=	${PYPKGPREFIX}-html5lib>=1.0.1:../../textproc/py-html5lib
DEPENDS+=	${PYPKGPREFIX}-bleach>=3.2.1:../../www/py-bleach
a13 10
DEPENDS+=	${PYPKGPREFIX}-pandas>=0.14:../../math/py-pandas
DEPENDS+=	${PYPKGPREFIX}-sortedcontainers>=2.2.2:../../devel/py-sortedcontainers
DEPENDS+=	${PYPKGPREFIX}-pytz>=2020.4:../../time/py-pytz
DEPENDS+=	${PYPKGPREFIX}-matplotlib>=3.4.1:../../graphics/py-matplotlib
DEPENDS+=	${PYPKGPREFIX}-setuptools>=50.3.2:../../devel/py-setuptools
DEPENDS+=	${PYPKGPREFIX}-mpmath>=1.1.0:../../math/py-mpmath
DEPENDS+=	${PYPKGPREFIX}-bottleneck>=1.3.2:../../math/py-bottleneck
DEPENDS+=	${PYPKGPREFIX}-asdf>=2.9.2:../../math/py-asdf
DEPENDS+=	${PYPKGPREFIX}-extension-helpers>=0.1:../../devel/py-extension-helpers
DEPENDS+=	${PYPKGPREFIX}-jplephem>=2.15:../../math/py-jplephem
d16 3
a18 1
DEPENDS+=	${PYPKGPREFIX}-colorlog>=6.6.0:../../devel/py-colorlog
d20 1
a20 1
PYTHON_VERSIONS_INCOMPATIBLE=	27 38
d24 1
a24 1
USE_LANGUAGES=	c c++
@


1.7
log
@*: restrict py-numpy users to 3.9+ in preparation for update
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2022/08/30 15:54:37 thor Exp $
d35 1
a35 1
PYTHON_VERSIONS_INCOMPATIBLE=	27 37 38
@


1.6
log
@math/py-astropy: update to 5.0.4 from wip

5.0.4 (2022-03-31)
==================

Bug Fixes
---------

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

- Fixed the ``Gaussian2D`` ``bounding_box`` when ``theta`` is an angular
  ``Quantity``. [#13021]

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

- Reverted ``astropy.utils.iers.iers.IERS_A_URL`` to ``maia.usno.navy.mil`` domain instead
  of NASA FTP to work around server issues. [#13004]

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

- Updated bundled WCSLIB to version 7.9 with several bugfixes and added
  support for time coordinate axes in ``wcsset()`` and ``wcssub()``. The
  four-digit type code for the time axis will have the first digit set to 4,
  i.e., four digit code will be 4xxx where x is a digit 0-9. For a full list of
  bug fixes see https://www.atnf.csiro.au/people/mcalabre/WCS/CHANGES [#12994]


5.0.3 (2022-03-25)
==================

Bug Fixes
---------

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

- Bugfix in ``astropy.convolution.utils.discretize_model`` which allows the function to handle a ``CompoundModel``.
  Before this fix, ``discretize_model`` was confusing ``CompoundModel`` with a callable function. [#12959]

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

- Fix write and read FITS tables with multidimensional items, using ``from_columns``
  without previousely defined ``ColDefs`` structure. [#12863]

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

- Fix VOTable linting to avoid use of shell option. [#12985]

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

- Fix XML linting to avoid use of shell option. [#12985]

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

- Updated the bundled CFITSIO library to 4.1.0. [#12967]

5.0.2 (2022-03-10)
==================

Bug Fixes
---------

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

- Bugfix to add backwards compatibility for reading ECSV version 0.9 files with
  non-standard column datatypes (such as ``object``, ``str``, ``datetime64``,
  etc.), which would raise a ValueError in ECSV version 1.0. [#12880]

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

- Bugfix for ``units_mapping`` schema's property name conflicts. Changes:
      * ``inputs`` to ``unit_inputs``
      * ``outputs`` to ``unit_outputs`` [#12800]

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

- Fixed a bug where ``astropy.io.votable.validate`` was printing output to
  ``sys.stdout`` when the ``output`` paramter was set to ``None``. ``validate``
  now returns a string when ``output`` is set to ``None``, as documented.
  [#12604]

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

- Fix handling of units on ``scale`` parameter in BlackBody model. [#12318]

- Indexing on models can now be used with all types of integers
  (like ``numpy.int64``) instead of just ``int``. [#12561]

- Fix computation of the separability of a ``CompoundModel`` where another
  ``CompoundModel`` is on the right hand side of the ``&`` operator. [#12907]

- Provide a hook (``Model._calculate_separability_matrix``) to allow subclasses
  of ``Model`` to define how to compute their separability matrix. [#12900]

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

- Fixed a bug in which running ``kuiper_false_positive_probability(D,N)`` on
  distributions with many data points could produce NaN values for the false
  positive probability of the Kuiper statistic. [#12896]

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

- Fixed a bug due to which ``naxis``, ``pixel_shape``, and
  ``pixel_bounds`` attributes of ``astropy.wcs.WCS`` were not restored when
  an ``astropy.wcs.WCS`` object was unpickled. This fix also eliminates
  ``FITSFixedWarning`` warning issued during unpiclikng of the WCS objects
  related to the number of axes. This fix also eliminates errors when
  unpickling WCS objects originally created using non-default values for
  ``key``, ``colsel``, and ``keysel`` parameters. [#12844]

5.0.1 (2022-01-26)
==================

Bug Fixes
---------

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

- Trying to create an instance of ``astropy.coordinates.Distance`` by providing
  both ``z`` and ``parallax`` now raises the expected ``ValueError``. [#12531]

- Fixed a bug where changing the wrap angle of the longitude component of a
  representation could raise a warning or error in certain situations. [#12556]

- ``astropy.coordinates.Distance`` constructor no longer ignores the ``unit``
  keyword when ``parallax`` is provided. [#12569]

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

- ``astropy.cosmology.utils.aszarr`` can now convert ``Column`` objects. [#12525]

- Reading a cosmology from an ECSV will load redshift and Hubble parameter units
  from the cosmology units module. [#12636]

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

- Fix formatting issue in ``_dump_coldefs`` and add tests for ``tabledump`` and
  ``tableload`` convenience functions. [#12526]

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

- YAML can now also represent quantities and arrays with structured dtype,
  as well as structured scalars based on ``np.void``. [#12509]

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

- Fixes error when fitting multiplication or division based compound models
  where the sub-models have different output units. [#12475]

- Bugfix for incorrectly initialized and filled ``parameters`` data for ``Spline1D`` model. [#12523]

- Bugfix for ``keyerror`` thrown by ``Model.input_units_equivalencies`` when
  used on ``fix_inputs`` models which have no set unit equivalencies. [#12597]

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

- ``astropy.table.Table.keep_columns()`` and
  ``astropy.table.Table.remove_columns()`` now work with generators of column
  names. [#12529]

- Avoid duplicate storage of info in serialized columns if the column
  used to serialize already can hold that information. [#12607]

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

- Fixed edge case bugs which emerged when using ``aggregate_downsample`` with custom bins. [#12527]

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

- Structured units can be serialized to/from yaml. [#12492]

- Fix bad typing problems by removing interaction with ``NDArray.__class_getitem__``. [#12511]

- Ensure that ``Quantity.to_string(format='latex')`` properly typesets exponents
  also when ``u.quantity.conf.latex_array_threshold = -1`` (i.e., when the threshold
  is taken from numpy). [#12573]

- Structured units can now be copied with ``copy.copy`` and ``copy.deepcopy``
  and also pickled and unpicked also for ``protocol`` >= 2.
  This does not work for big-endian architecture with older ``numpy<1.21.1``. [#12583]

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

- Ensure that a ``Masked`` instance can be used to initialize (or viewed
  as) a ``numpy.ma.Maskedarray``. [#12482]

- Ensure ``Masked`` also works with numpy >=1.22, which has a keyword argument
  name change for ``np.quantile``. [#12511]

- ``astropy.utils.iers.LeapSeconds.auto_open()`` no longer emits unnecessary
  warnings when ``astropy.utils.iers.conf.auto_max_age`` is set to ``None``. [#12713]


5.0 (2021-11-15)
================


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

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

- Added dealiasing support to ``convolve_fft``. [#11495]

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

- Added missing coordinate transformations where the starting and ending frames
  are the same (i.e., loopback transformations). [#10909]

- Allow negation, multiplication and division also of representations that
  include a differential (e.g., ``SphericalRepresentation`` with a
  ``SphericalCosLatDifferential``).  For all operations, the outcome is
  equivalent to transforming the representation and differential to cartesian,
  then operating on those, and transforming back to the original representation
  (except for ``UnitSphericalRepresentation``, which will return a
  ``SphericalRepresentation`` if there is a scale change). [#11470]

- ``RadialRepresentation.transform`` can work with a multiplication matrix only.
  All other matrices still raise an exception. [#11576]

- ``transform`` methods are added to ``BaseDifferential`` and ``CartesianDifferential``.
  All transform methods on Representations now delegate transforming differentials
  to the differential objects. [#11654]

- Adds new ``HADec`` built-in frame with transformations to/from ``ICRS`` and ``CIRS``.
  This frame complements ``AltAz`` to give observed coordinates (hour angle and declination)
  in the ``ITRS`` for an equatorially mounted telescope. [#11676]

- ``SkyCoord`` objects now have a ``to_table()`` method, which allows them to be
  converted to a ``QTable``. [#11743]

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

- Cosmologies now store metadata in a mutable parameter ``meta``.
  The initialization arguments ``name`` and ``meta`` are keyword-only. [#11542]

- A new unit, ``redshift``, is defined. It is a dimensionless unit to distinguish
  redshift quantities from other non-redshift values. For compatibility with
  dimensionless quantities the equivalency ``dimensionless_redshift`` is added.
  This equivalency is enabled by default. [#11786]

- Add equality operator for comparing Cosmology instances. Comparison is done on
  all immutable fields (this excludes 'meta').

  Now the following will work:

  .. code-block:: python

      >>> from astropy.cosmology import Planck13, Planck18
      >>> Planck13 == Planck18
      False

      >>> Planck18 == Planck18
      True [#11813]

- Added ``read/write`` methods to Cosmology using the Unified I/O registry.
  Now custom file format readers, writers, and format-identifier functions
  can be registered to read, write, and identify, respectively, Cosmology
  objects. Details are discussed in an addition to the docs. [#11948]

- Added ``to_format/from_format`` methods to Cosmology using the Unified I/O
  registry. Now custom format converters and format-identifier functions
  can be registered to transform Cosmology objects.
  The transformation between Cosmology and dictionaries is pre-registered.
  Details are discussed in an addition to the docs. [#11998]

- Added units module for defining and collecting cosmological units and
  equivalencies. [#12092]

- Flat cosmologies are now set by a mixin class, ``FlatCosmologyMixin`` and its
  FLRW-specific subclass ``FlatFLRWMixin``. All ``FlatCosmologyMixin`` are flat,
  but not all flat cosmologies are instances of ``FlatCosmologyMixin``. As
  example, ``LambdaCDM`` **may** be flat (for the a specific set of parameter
  values),  but ``FlatLambdaCDM`` **will** be flat.

  Cosmology parameters are now descriptors. When accessed from a class they
  transparently stores information, like the units and accepted equivalencies.
  On a cosmology instance, the descriptor will return the parameter value.
  Parameters can have custom ``getter`` methods.

  Cosmological equality is refactored to check Parameters (and the name)
  A new method, ``is_equivalent``, is added to check Cosmology equivalence, so
  a ``FlatLambdaCDM`` and flat ``LambdaCDM`` are equivalent. [#12136]

- Replaced ``z = np.asarray(z)`` with ``z = u.Quantity(z, u.dimensionless_unscaled).value``
  in Cosmology methods. Input of values with incorrect units raises a UnitConversionError
  or TypeError. [#12145]

- Cosmology Parameters allow for custom value setters.
  Values can be set once, but will error if set a second time.
  If not specified, the default setter is used, which will assign units
  using the Parameters ``units`` and ``equivalencies`` (if present).
  Alternate setters may be registered with Parameter to be specified by a str,
  not a decorator on the Cosmology. [#12190]

- Cosmology instance conversion to dict now accepts keyword argument ``cls`` to
  determine dict type, e.g. ``OrderedDict``. [#12209]

- A new equivalency is added between redshift and the Hubble parameter and values
  with units of little-h.
  This equivalency is also available in the catch-all equivalency ``with_redshift``. [#12211]

- A new equivalency is added between redshift and distance -- comoving, lookback,
  and luminosity. This equivalency is also available in the catch-all equivalency
  ``with_redshift``. [#12212]

- Register Astropy Table into Cosmology's ``to/from_format`` I/O, allowing
  a Cosmology instance to be parsed from or converted to a Table instance.
  Also adds the ``__astropy_table__`` method allowing ``Table(cosmology)``. [#12213]

- The WMAP1 and WMAP3 are accessible as builtin cosmologies. [#12248]

- Register Astropy Model into Cosmology's ``to/from_format`` I/O, allowing
  a Cosmology instance to be parsed from or converted to a Model instance. [#12269]

- Register an ECSV reader and writer into Cosmology's I/O, allowing a Cosmology
  instance to be read from from or written to an ECSV file. [#12321]

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

- Added new way to specify the dtype for tables that are read: ``converters``
  can specify column names with wildcards. [#11892]

- Added a new ``astropy.io.ascii.Mrt`` class to write tables in the American
  Astronomical Society Machine-Readable Table format,
  including documentation and tests for the same. [#11897, #12301, #12302]

- When writing, the input data are no longer copied, improving performance.
  Metadata that might be changed, such as format and serialization
  information, is copied, hence users can continue to count on no
  changes being made to the input data. [#11919]

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

- Add Parquet serialization of Tables with pyarrow, including metadata support and
  columnar access. [#12215]

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

- Added fittable spline models to ``modeling``. [#11634]

- Extensive refactor of ``BoundingBox`` for better usability and maintainability. [#11930]

- Added ``CompoundBoundingBox`` feature to ``~astropy.modeling``, which allows more flexibility in
  defining bounding boxes for models that are applied to images with many slices. [#11942]

- Improved parameter support for ``astropy.modeling.core.custom_model`` created models. [#11984]

- Added the following trigonometric models and linked them to their appropriate inverse models:
    * ``Cosine1D`` [#12158]
    * ``Tangent1D``
    * ``ArcSine1D``
    * ``ArcCosine1D``
    * ``ArcTangent1D`` [#12185]

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

- Added a new method ``Table.update()`` which does a dictionary-style update of a
  ``Table`` by adding or replacing columns. [#11904]

- Masked quantities are now fully supported in tables.  This includes ``QTable``
  automatically converting ``MaskedColumn`` instances to ``MaskedQuantity``,
  and ``Table`` doing the reverse. [#11914]

- Added new keyword arguments ``keys_left`` and ``keys_right`` to the table ``join``
  function to support joining tables on key columns with different names. In
  addition the new keywords can accept a list of column-like objects which are
  used as the match keys. This allows joining on arbitrary data which are not part
  of the tables being joined. [#11954]

- Formatting of any numerical values in the output of ``Table.info()`` and
  ``Column.info()`` has been improved. [#12022]

- It is now possible to add dask arrays as columns in tables
  and have them remain as dask arrays rather than be converted
  to Numpy arrays. [#12219]

- Added a new registry for mixin handlers, which can be used
  to automatically convert array-like Python objects into
  mixin columns when assigned to a table column. [#12219]

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

- Adds a new method ``earth_rotation_angle`` to calculate the Local Earth Rotation Angle.
  Also adjusts Local Sidereal Time for the Terrestrial Intermediate Origin (``TIO``)
  and adds a rigorous correction for polar motion. The ``TIO`` adjustment is approximately
  3 microseconds per century from ``J2000`` and the polar motion correction is at most
  about +/-50 nanoseconds. For models ``IAU1982`` and ``IAU1994``, no such adjustments are
  made as they pre-date the TIO concept. [#11680]

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

- A custom binning scheme is now available in ``aggregate_downsample``.
  It allows ``time_bin_start`` and ``time_bin_size`` to be arrays, and adds
  an optional ``time_bin_end``.
  This scheme mirrors the API for ``BinnedTimeSeries``. [#11266]

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

- ``Quantity`` gains a ``__class_getitem__`` to create unit-aware annotations
   with the syntax ``Quantity[unit or physical_type, shape, numpy.dtype]``.
   If the python version is 3.9+ or ``typing_extensions`` is installed,
   these are valid static type annotations. [#10662]

- Each physical type is added to ``astropy.units.physical``
  (e.g., ``physical.length`` or ``physical.electrical_charge_ESU``).
  The attribute-accessible names (underscored, without parenthesis) also
  work with ``astropy.units.physical.get_physical_type``. [#11691]

- It is now possible to have quantities based on structured arrays in
  which the unit has matching structure, giving each field its own unit,
  using units constructed like ``Unit('AU,AU/day')``. [#11775]

- The milli- prefix has been added to ``astropy.units.Angstrom``. [#11788]

- Added attributes ``base``, ``coords``, and ``index`` and method ``copy()`` to
  ``QuantityIterator`` to match ``numpy.ndarray.flatiter``. [#11796]

- Added "angular frequency" and "angular velocity" as aliases for the "angular
  speed" physical type. [#11865]

- Add light-second to units of length [#12128]

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

- The ``astropy.utils.deprecated_renamed_argument()`` decorator now supports
  custom warning messages. [#12305]

- The NaN-aware numpy functions such as ``np.nansum`` now work on Masked
  arrays, with masked values being treated as NaN, but without raising
  warnings or exceptions. [#12454]

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

- Added a feature so that SphericalCircle will accept center parameter as a SkyCoord object. [#11790]

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

- ``astropy.wcs.utils.obsgeo_to_frame`` has been added to convert the obsgeo coordinate
  array on ``astropy.wcs.WCS`` objects to an ``ITRS`` coordinate frame instance. [#11716]

- Updated bundled ``WCSLIB`` to version 7.7 with several bugfixes. [#12034]


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

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

- ``update_default_config`` and ``ConfigurationMissingWarning`` are deprecated. [#11502]

astropy.constants
^^^^^^^^^^^^^^^^^

- Removed deprecated ``astropy.constants.set_enabled_constants`` context manager. [#12105]

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

- Positions for the Moon using the 'builtin' ephemeris now use the new
  ``erfa.moon98`` function instead of our own implementation of the Meeus
  algorithm. As this also corrects a misunderstanding of the frame returned by
  the Meeus, this improves the agreement with the JPL ephemeris from about 30 to
  about 6 km rms. [#11753]

- Removed deprecated ``representation`` attribute from
  ``astropy.coordinates.BaseCoordinateFrame`` class. [#12257]

- ``SpectralQuantity`` and ``SpectralCoord`` ``.to_value`` method can now be called without
  ``unit`` argument in order to maintain a consistent interface with ``Quantity.to_value`` [#12440]

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

- ``z_at_value`` now works with arrays for all arguments (except ``func``,
  ``verbose``, and ``method``). Consequently, ``coordinates.Distance.z`` can
  be used when Distance is an array. [#11778]

- Remove deprecation warning and error remapping in ``Cosmology.clone``.
  Now unknown arguments will raise a ``TypeError``, not an ``AttributeError``. [#11785]

- The ``read/write`` and ``to/from_format`` Unified I/O registries are separated
  and apply only to ``Cosmology``. [#12015]

- Cosmology parameters in ``cosmology.parameters.py`` now have units,
  where applicable. [#12116]

- The function ``astropy.cosmology.utils.inf_like()`` is deprecated. [#12175]

- The function ``astropy.cosmology.utils.vectorize_if_needed()`` is deprecated.
  A new function ``astropy.cosmology.utils.vectorize_redshift_method()`` is added
  as replacement. [#12176]

- Cosmology base class constructor now only accepts arguments ``name`` and ``meta``.
  Subclasses should add relevant arguments and not pass them to the base class. [#12191]

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

- When ``astropy`` raises an ``OSError`` because a file it was told to write
  already exists, the error message now always suggests the use of the
  ``overwrite=True`` argument. The wording is now consistent for all I/O formats. [#12179]

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

- Removed deprecated ``overwrite=None`` option for
  ``astropy.io.ascii.ui.write()``. Overwriting existing files now only happens if
  ``overwrite=True``. [#12171]

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

- The internal class _CardAccessor is no longer registered as a subclass of
  the Sequence or Mapping ABCs. [#11923]

- The deprecated ``clobber`` argument will be removed from the
  ``astropy.io.fits`` functions in version 5.1, and the deprecation warnings now
  announce that too. [#12311]

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

- The ``write`` function now is allowed to return possible content results, which
  means that custom writers could, for example, create and return an instance of
  some container class rather than a file on disk. [#11916]

- The registry functions are refactored into a class-based system.
  New Read-only, write-only, and read/write registries can be created.
  All functions accept a new argument ``registry``, which if not specified,
  defaults to the global default registry. [#12015]

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

- Deprecated the ``pedantic`` keyword argument in the
  ``astropy.io.votable.table.parse`` function and the corresponding configuration
  setting. It has been replaced by the ``verify`` option. [#12129]

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

- Refactored how ``astropy.modeling.Model`` handles model evaluation in order to better
  organize the code. [#11931]

- Removed the following deprecated modeling features:
      ``astropy.modeling.utils.ExpressionTree`` class,
      ``astropy.modeling.functional_models.MexicanHat1D`` model,
      ``astropy.modeling.functional_models.MexicanHat2D`` model,
      ``astropy.modeling.core.Model.inputs`` setting in model initialize,
      ``astropy.modeling.core.CompoundModel.inverse`` setting in model initialize, and
      ``astropy.modeling.core.CompoundModel.both_inverses_exist()`` method. [#11978]

- Deprecated the ``AliasDict`` class in ``modeling.utils``. [#12411]

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

- Removed ``block_reduce`` and ``block_replicate`` functions from
  ``nddata.utils``. These deprecated functions in ``nddata.utils`` were
  moved to ``nddata.blocks``. [#12288]

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

- Removed the following deprecated features from ``astropy.stats``:

  * ``conf`` argument for ``funcs.binom_conf_interval()`` and
    ``funcs.binned_binom_proportion()``,
  * ``conflevel`` argument for ``funcs.poisson_conf_interval()``, and
  * ``conf_lvl`` argument for ``jackknife.jackknife_stats()``. [#12200]

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

- Printing a ``Table`` now shows the qualified class name of mixin columns in the
  dtype header row  instead of "object". This applies to all the ``Table`` formatted output
  methods whenever ``show_dtype=True`` is selected. [#11660]

- The 'overwrite' argument has been added to the jsviewer table writer.
  Overwriting an existing file requires 'overwrite' to be True. [#11853]

- The 'overwrite' argument has been added to the pandas table writers.
  Overwriting an existing file requires 'overwrite' to be True. [#11854]

- The table ``join`` function now accepts only the first four arguments ``left``,
  ``right``, ``keys``, and ``join_type`` as positional arguments. All other
  arguments must be supplied as keyword arguments. [#11954]

- Adding a dask array to a Table will no longer convert
  that dask to a Numpy array, so accessing t['dask_column']
  will now return a dask array instead of a Numpy array. [#12219]

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

- Along with the new method ``earth_rotation_angle``, ``sidereal_time`` now accepts
  an ``EarthLocation`` as the ``longitude`` argument. [#11680]

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

- Unit ``littleh`` and equivalency ``with_H0`` have been moved to the
  ``cosmology`` module and are deprecated from ``astropy.units``. [#12092]

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

- ``astropy.utils.introspection.minversion()`` now uses
  ``importlib.metadata.version()``. Therefore, its ``version_path`` keyword is no
  longer used and deprecated. This keyword will be removed in a future release. [#11714]

- Updated ``utils.console.Spinner`` to better resemble the API of
  ``utils.console.ProgressBar``, including an ``update()`` method and
  iterator support. [#11772]

- Removed deprecated ``check_hashes`` in ``check_download_cache()``. The function also
  no longer returns anything. [#12293]

- Removed unused ``download_cache_lock_attempts`` configuration item in
  ``astropy.utils.data``. Deprecation was not possible. [#12293]

- Removed deprecated ``hexdigest`` keyword from ``import_file_to_cache()``. [#12293]

- Setting ``remote_timeout`` configuration item in ``astropy.utils.data`` to 0 will
  no longer disable download from the Internet; Set ``allow_internet`` configuration
  item to ``False`` instead. [#12293]

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

- Removed deprecated ``imshow_only_kwargs`` keyword from ``imshow_norm``. [#12290]

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

- Move complex logic from ``HighLevelWCSMixin.pixel_to_world`` and
  ``HighLevelWCSMixin.world_to_pixel`` into the helper functions
  ``astropy.wcs.wcsapi.high_level_api.high_level_objects_to_values`` and
  ``astropy.wcs.wcsapi.high_level_api.values_to_high_level_objects`` to allow
  reuse in other places. [#11950]


Bug Fixes
---------

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

- ``generate_config`` no longer outputs wrong syntax for list type. [#12037]

astropy.constants
^^^^^^^^^^^^^^^^^

- Fixed a bug where an older constants version cannot be set directly after
  astropy import. [#12084]

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

- Passing an ``array`` argument for any Kernel1D or Kernel2D subclasses (with the
  exception of CustomKernel) will now raise a ``TypeError``. [#11969]

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

- If a ``Table`` containing a ``SkyCoord`` object as a column is written to a
  FITS, ECSV or HDF5 file then any velocity information that might be present
  will be retained. [#11750]

- The output of ``SkyCoord.apply_space_motion()`` now always has the same
  differential type as the ``SkyCoord`` itself. [#11932]

- Fixed bug where Angle, Latitude and Longitude with NaN values could not be printed. [#11943]

- Fixed a bug with the transformation from ``PrecessedGeocentric`` to ``GCRS``
  where changes in ``obstime``, ``obsgeoloc``, or ``obsgeovel`` were ignored.
  This bug would also affect loopback transformations from one ``PrecessedGeocentric``
  frame to another ``PrecessedGeocentric`` frame. [#12152]

- Fixed a bug with the transformations between ``TEME`` and ``ITRS`` or between ``TEME``
  and itself where a change in ``obstime`` was ignored. [#12152]

- Avoid unnecessary transforms through CIRS for AltAz and HADec and
  use ICRS as intermediate frame for these transformations instead. [#12203]

- Fixed a bug where instantiating a representation with a longitude component
  could mutate input provided for that component even when copying is specified. [#12307]

- Wrapping an ``Angle`` array will now ignore NaN values instead of attempting to wrap
  them, which would produce unexpected warnings/errors when working with coordinates
  and representations due to internal broadcasting. [#12317]

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

- Dictionaries for in-built cosmology realizations are not altered by creating
  the realization and are also made immutable. [#12278]

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

- Preent zero-byte writes for FITS binary tables to
  speed up writes on the Lustre filesystem. [#11955]

- Enable ``json.dump`` for FITS_rec with variable length (VLF) arrays. [#11957]

- Add support for reading and writing int8 images [#11996]

- Ensure header passed to ``astropy.io.fits.CompImageHDU`` does not need to contain
  standard cards that can be automatically generated, such as ``BITPIX`` and ``NAXIS``. [#12061]

- Fixed a bug where ``astropy.io.fits.HDUDiff`` would ignore the ``ignore_blank_cards``
  keyword argument. [#12122]

- Open uncompressed file even if extension says it's compressed [#12135]

- Fix the computation of the DATASUM in a ``CompImageHDU`` when the data is >1D. [#12138]

- Reading files where the SIMPLE card is present but with an invalid format now
  issues a warning instead of raising an exception [#12234]

- Convert UNDEFINED to None when iterating over card values. [#12310]

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

- Update ASDF tag versions in ExtensionType subclasses to match ASDF Standard 1.5.0. [#11986]

- Fix ASDF serialization of model inputs and outputs and add relevant assertion to
  test helper. [#12381]

- Fix bug preventing ASDF serialization of bounding box for models with only one input. [#12385]

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

- Now accepting UCDs containing phot.color. [#11982]

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

- Added ``Parameter`` descriptions to the implemented models which were
  missing. [#11232]

- The ``separable`` property is now correctly set on models constructed with
  ``astropy.modeling.custom_model``. [#11744]

- Minor bugfixes and improvements to modeling including the following:
      * Fixed typos and clarified several errors and their messages throughout
        modeling.
      * Removed incorrect try/except blocks around scipy code in
        ``convolution.py`` and ``functional_models.py``.
      * Fixed ``Ring2D`` model's init to properly accept all combinations
        of ``r_in``, ``r_out``, and ``width``.
      * Fixed bug in ``tau`` validator for the ``Logarithmic1D`` and
        ``Exponential1D`` models when using them as model sets.
      * Fixed ``copy`` method for ``Parameter`` in order to prevent an
        automatic ``KeyError``, and fixed ``bool`` for ``Parameter`` so
        that it functions with vector values.
      * Removed unreachable code from ``Parameter``, the ``_Tabular`` model,
        and the ``Drude1D`` model.
      * Fixed validators in ``Drude1D`` model so that it functions in a
        model set.
      * Removed duplicated code from ``polynomial.py`` for handing of
        ``domain`` and ``window``.
      * Fixed the ``Pix2Sky_HEALPixPolar`` and ``Sky2Pix_HEALPixPolar`` modes
        so that their ``evaluate`` and ``inverse`` methods actually work
        without raising an error. [#12232]

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

- Ensure that the ``wcs=`` argument to ``NDData`` is always parsed into a high
  level WCS object. [#11985]

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

- Fixed a bug in sigma clipping where the bounds would not be returned for
  completely empty or masked data. [#11994]

- Fixed a bug in ``biweight_midvariance`` and ``biweight_scale`` where
  output data units would be dropped for constant data and where the
  result was a scalar NaN. [#12146]

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

- Ensured that ``MaskedColumn.info`` is propagated in all cases, so that when
  tables are sliced, writing will still be as requested on
  ``info.serialize_method``. [#11917]

- ``table.conf.replace_warnings`` and ``table.jsviewer.conf.css_urls`` configuration
  items now have correct ``'string_list'`` type. [#12037]

- Fixed an issue where initializing from a list of dict-like rows (Mappings) did
  not work unless the row values were instances of ``dict``. Now any object that
  is an instance of the more general ``collections.abc.Mapping`` will work. [#12417]

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

- Ensure that scalar ``QuantityDistribution`` unit conversion in ufuncs
  works properly again. [#12471]

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

- Add quantity support for ``scipy.special`` dimensionless functions
  erfinv, erfcinv, gammaln and loggamma. [#10934]

- ``VOUnit.to_string`` output is now compliant with IVOA VOUnits 1.0 standards. [#11565]

- Units initialization with unicode has been expanded to include strings such as
  'M☉' and 'e⁻'. [#11827]

- Give a more informative ``NotImplementedError`` when trying to parse a unit
  using an output-only format such as 'unicode' or 'latex'. [#11829]

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

- Fixed a bug in ``get_readable_fileobj`` that prevented the unified file read
  interface from closing ASCII files. [#11809]

- The function ``astropy.utils.decorators.deprecated_attribute()`` no longer
  ignores its ``message``, ``alternative``, and ``pending`` arguments. [#12184]

- Ensure that when taking the minimum or maximum of a ``Masked`` array,
  any masked NaN values are ignored. [#12454]

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

- The tick labelling for radians has been fixed to remove a redundant ``.0`` in
  the label for integer multiples of pi at 2pi and above. [#12221]

- Fix a bug where non-``astropy.wcs.WCS`` WCS instances were not accepted in
  ``WCSAxes.get_transform``. [#12286]

- Fix compatibility with Matplotlib 3.5 when using the ``grid_type='contours'``
  mode for drawing grid lines. [#12447]

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

- Enabled ``SlicedLowLevelWCS.pixel_to_world_values`` to handle slices including
  non-``int`` integers, e.g. ``numpy.int64``. [#11980]


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

- In docstrings, Sphinx cross-reference targets now use intersphinx, even if the
  target is an internal link (``link`` is now ``'astropy:link``).
  When built in Astropy these links are interpreted as internal links. When built
  in affiliate packages, the link target is set by the key 'astropy' in the
  intersphinx mapping. [#11690]

- Made PyYaml >= 3.13 a strict runtime dependency. [#11903]

- Minimum version of required Python is now 3.8. [#11934]

- Minimum version of required Scipy is now 1.3. [#11934]

- Minimum version of required Matplotlib is now 3.1. [#11934]

- Minimum version of required Numpy is now 1.18. [#11935]

- Fix deprecation warnings with Python 3.10 [#11962]

- Speed up ``minversion()`` in cases where a module with a ``__version__``
  attribute is passed. [#12174]

- ``astropy`` now requires ``packaging``. [#12199]

- Updated the bundled CFITSIO library to 4.0.0. When compiling with an external
  library, version 3.35 or later is required. [#12272]


4.3.1 (2021-08-11)
==================

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 (2021-07-26)
================

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 t
  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 (2021-04-01)
==================

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]
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2022/01/05 15:41:13 wiz Exp $
d35 1
a35 1
PYTHON_VERSIONS_INCOMPATIBLE=	27 37
@


1.5
log
@Fix build breakage from py-scipy now being Python >= 3.8
@
text
@d3 1
a3 1
DISTNAME=	astropy-4.2
a4 1
PKGREVISION=	2
d14 2
a15 2
DEPENDS+=	${PYPKGPREFIX}-numpy>=1.17.0:../../math/py-numpy
DEPENDS+=	${PYPKGPREFIX}-scipy>=1.1:../../math/py-scipy
d24 1
a24 1
DEPENDS+=	${PYPKGPREFIX}-matplotlib>=3.0:../../graphics/py-matplotlib
d28 1
a28 1
DEPENDS+=	${PYPKGPREFIX}-asdf>=2.7.1:../../math/py-asdf
d31 3
a33 1
DEPENDS+=	${PYPKGPREFIX}-pyerfa>=1.7.1.1:../../math/py-pyerfa
d35 1
a35 1
PYTHON_VERSIONS_INCOMPATIBLE=	27 37 # py-scipy
d39 2
@


1.4
log
@python: egg.mk: add USE_PKG_RESOURCES flag

This flag should be set for packages that import pkg_resources
and thus need setuptools after the build step.

Set this flag for packages that need it and bump PKGREVISION.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2022/01/04 20:54:13 wiz Exp $
d34 1
a34 1
PYTHON_VERSIONS_INCOMPATIBLE=	27
@


1.3
log
@*: bump PKGREVISION for egg.mk users

They now have a tool dependency on py-setuptools instead of a DEPENDS
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2021/12/30 13:05:36 adam Exp $
d5 1
a5 1
PKGREVISION=	1
a13 2
PYTHON_VERSIONS_INCOMPATIBLE=	27

d34 4
@


1.2
log
@Forget about Python 3.6
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2020/12/19 14:17:39 mef Exp $
d5 1
@


1.1
log
@(math/py-astropy) import py38-astropy-4.2

Based on PR pkg/55864 by Daisuke Kinoshita:

Astropy is a Python module for astronomical calculations, data analysis,
and plotting.
@
text
@d1 1
a1 1
# $NetBSD$
d13 1
a13 2
PYTHON_VERSIONS_INCOMPATIBLE+=	27
PYTHON_VERSIONS_INCOMPATIBLE+=	36
@

