NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #2411 most downloaded on PyPI
Astronomy and astrophysics core library
Last release 3 months ago
05 Jul 2026
Release timing varies
gaps range from 1 weeks to 6 months
Nearly every release is documented
notes for 58 of the last 60 stable releases
2 versions withdrawn
withdrawn after publishing
14 years old
165 releases · first in 2013
https://docs.astropy.org/en/v8.0.1/changelog.html
Astropy will now no longer download the latest IERS-A table over the network unless it is actually needed, and will also not warn about download issues unless all mirrors fail. The IERS_Auto.open method now always reads the table bundled in astropy-iers-data (or a finals2000A.all file in the current working directory, if present), and the auto-download is deferred until a calculation actually requests UT1-UTC or polar motion values beyond the predictive range of the bundled table while that table is older than astropy.utils.iers.conf.auto_max_age days. This avoids network access, and the associated warnings when offline, in the common case where the bundled table is recent enough. [ #19995 ]
Fixed a regression where a FITS logical ( 'L' ) column created with BinTableHDU.from_columns(..., nrows=N) and no input array stored its values as NULL ( b'\x00' ) instead of False ( b'F' ). Rows later assigned False were silently written as NULL, and a spurious contains NULL warning was emitted when reading the file back. [ #19939 ]
Fixed a bug where a byte other than the FITS L wire-format values b'T' , b'F' and b'\x00' assigned into a fixed-length logical ( 'L' ) column read with logical_as_bytes=True was written to the file unchecked (and silently read back as False ). Such bytes now raise ValueError on write, matching the validation applied to |S1 column input at construction time. [ #19940 ]
Fixed an incorrect DATASUM (and therefore CHECKSUM ) being written for byte-swapped binary tables larger than 64 kB. The data was checksummed in chunks that were not aligned to 4-byte word boundaries, so the stored value was valid in memory but failed to verify once the file was read back. [ #20001 ]
Bugfix for a Parameter with a custom getter / setter pair raising an AttributeError when accessing the value of the Parameter before any value for the parameter has been set. The Parameter will now return the result of the getter applied to a nan value in this case which is consistent with the behavior of a Parameter without a custom getter / setter pair. [ #19979 ]
Fix unexpected behavior in Cutout2D.plot_on_original() . The displayed region spanned pixels not included in the cutout array. [ #19829 ]
Fixed a bug where a Table.loc[] range query using the default SortedArray index engine silently dropped rows when the upper bound matched a value that appears more than once in the indexed column. [ #19903 ]
Fixed a bug where a Table.loc[] range query using the BST index engine returned rows in scrambled order if rows had been added after the index was created. [ #19912 ]
Fixed a bug where numpy.lib.recfunctions.structured_to_unstructured failed when applied to a StructuredQuantity by improving unit extraction logic. [ #19106 ]
Fixed issues with the placement of WCSAxes tick labels for non-perpendicular grids or ticks. [ #19057 ]
Fix caching of wcs.world_axis_object_components and world_axis_object_classes in cases where the equinox was NaN [ #19898 ]
One column per quarter.
https://docs.astropy.org/en/v8.0.0/changelog.html
Added astropy.config.temporary_cache_dir_path and astropy.config.temporary_config_dir_path context managers, which are safer alternatives to astropy.config.set_temp_cache and astropy.config.set_temp_config respectively, and should be preferred in new code, but are not drop-in replacements.
Added support for ASTROPY_CACHE_DIR and ASTROPY_CONFIG_DIR environment variables, offering a more tightly scoped alternative to XDG_CACHE_HOME and XDG_CONFIG_HOME respectively. When both are defined, ASTROPY_ -prefixed variables take precedence over XDG_ -prefixed ones. [#19575]
Added a ensure_exists boolean option to cache and config path getters, allowing callers to disable directory creation on discovery with ensure_exists=False. When False, callers should handle missing directory on their own. [#19616]
The angular_diameter_distance method now accepts two redshift arguments to compute the angular diameter distance between objects at different redshifts. The previous separate method angular_diameter_distance_z1z2 is deprecated and will be removed in a future version. [#18807]
The trait astropy.cosmology.traits.NeutrinoComponent has been added to work with objects that have attributes and methods related to neutrinos. [#18809]
Removed deprecated module-level shim files (astropy.cosmology.connect, astropy.cosmology.core, astropy.cosmology.flrw, astropy.cosmology.funcs, and astropy.cosmology.parameter), which were deprecated in v7.1. All cosmology classes and functions should be imported directly from astropy.cosmology. [#18856]
Registered the read_mrt() and write_mrt() methods with the Cosmology class, enabling the import and export of cosmological data to and from MRT files. [#18952]
Read CDS table where the data is split into multiple files [#18505]
Add a new io.ascii format mesa to read history and profile output files from MESA, a well-known code for stellar evolution calculations. [#19125]
Added a logical_as_bytes parameter to fits.open() that, when set to True, causes FITS logical columns to be read as bytes (S1) instead of bool, preserving NULL (undefined) values that would otherwise be silently converted to False. Columns read this way round-trip correctly when written back to a FITS file, preserving b'T', b'F', and b'\x00' (NULL) values. A warning is now emitted when NULL values are present and logical_as_bytes is not set. [#19374]
Extended the logical_as_bytes option of fits.open() to apply to variable-length array (PL/QL) logical columns. When True, VLA logical columns are returned as S1 byte arrays (one byte per entry) so that b'\x00' (NULL) is distinguishable from b'F' (False); S1 row arrays also round-trip through writing. A warning is emitted when NULL bytes are present in a VLA logical column read with logical_as_bytes=False, except for the ambiguous case of a column whose heap is entirely \x00 (which may instead be an all-False column written by astropy <= 7.2.0). [#19659]
Added a write method to VOTableFile. [#19499]
Implemented support for the .flags attribute in CCDData.to_hdu(), enabling the CCDData class to write and read .flags in FITS format. Previously this was silent no-op even though it should have raised a NotImplementedError. [#18862]
Support writing table indices to FITS, HDF5, and ECSV formats and subsequently reading them back to round-trip the original indexed table. This stores the index data as temporary columns in the output, similar to the mechanism for serializing mixin columns like SkyCoord. [#18703]
Added conf.multidim_threshold configuration option to control display of multidimensional table columns. Setting this to a value like 3 will display full content for small arrays (e.g., [1 2 3] for 3-vectors), while larger arrays revert to the abbreviated first .. last format. [#19123]
Enable conversion of tables with multidimensional columns to pandas DataFrames:
Previously, to_pandas() and to_df() would raise a ValueError for columns containing lists or arrays (for example, [[1, 2], [3, 4]]).
Now these columns are automatically converted to 1D object arrays compatible with pandas. [#19173]
Adds support for Low Rank Approximation (LRA) to trig_sum. This is enabled by passing the new argument algorithm='lra', which is now the default option for fast and fastchi2 implementations. [#17842]
Add support for atol and rtol parameters from np.matrix_rank when called on a Quantity object. [#19104]
Allow 1d vector-like strings, with or without units, to be converted into Quantity. [#19214]
astropy.utils.data functions are now more resilient against a missing cache directory and avoid forcing its creation on call. [#19650]
Improved error messages from get_free_space_in_dir. [#19795]
Expose MplQuantityConverter class in astropy.visualization and except numpy arrays in its convert and default_units methods. [#19539]
Added the imshow_simple_norm function to provide a more compact interface to the SimpleNorm/simple_norm interface for quick visualization. [#19623]
world_to_pixel and pixel_to_world now can take Masked input. [#18743]
The ConfNamespace.help method now raises an exception if called under Python's optimized mode (-OO flag). [#17571]
Cache and configuration directories now adhere to the XDG specification by default. For example, the default cache location was changed from $HOME/.astropy/cache to $XDG_CACHE_HOME/astropy, where XDG_CACHE_HOME itself defaults to $HOME/.cache.
Affected functions from the astropy.config namespace:
get_cache_dir
get_cache_dir_path
get_config_dir
get_config_dir_path
In addition, temporary directories set through set_temp_cache or set_temp_config will now not be symlinked to default locations. The new behavior is also meant as 100% cross platform: Windows isn't special cased like it used to. [#19575]
CODATA 2022 has replaced CODATA 2018 as default. astropyconst80 is available for constants science state, combining CODATA 2022 with IAU 2015. [#18407]
Fixes edge treatment in convolve(..., boundary='fill', fill_value=nan) to be consistent with convolve_fft. [#18348]
Galactocentric and LSR now use a CartesianRepresentation instead of CartesianDifferential for their velocity attributes (galcen_v_sun and v_bary, resp.). On input, this has little effect, since instances of both remain accepted, but for converting the attribute to a Quantity, one now has to access the .xyz attribute instead of .d_xyz. [#18362]
Redshift arguments (z, z1, z2) in cosmology methods are now positional-only, completing the deprecations started in v7.0 and v7.1. [#18800]
The Ob0=None parameter value for cosmology classes is no longer supported. This deprecation was started in v7.0. Use Ob0=0 instead to indicate zero baryonic matter density. [#18874]
np.char.chararray being deprecated in Numpy 2.5, in a future version io.fits will return a normal array instead of a chararray for string columns. As a consequence the special chararray methods are deprecated (e.g., .rstrip() or .decode()). Use np.strings functions instead. [#19267]
The strip_spaces option in Table.read to strip trailing whitespaces in string columns is now True by default. Set it to False to keep the old behavior. [#19638]
The help methods from Table.read and Table.write now raise an exception if called under Python's optimized mode (-OO flag). [#17571]
DataOrigin updated with IVOA version 1.2:
Terms changed in astropy.io.votable.dataorigin (ivoid and editor renamed to ivoid_data and journal) [#19593]
The whole astropy.samp module is deprecated. Please use pyvo.samp instead. [#19373]
The private astropy.table.np_utils module has been removed. It did not contain any code that was still used except the definition of TableMergeError, which should be imported from astropy.table. All other routines were long ago moved to either astropy.table.operations or astropy.utils.metadata. [#19198]
Setting the Column.dtype attribute is now deprecated since mutating an array is unsafe if an array is shared, especially by multiple threads. As an alternative, you can create a view with a new dtype via column.view(dtype=new_dtype). This follows a similar deprecation in numpy 2.5.0. [#19542]
API changes towards a future removal of astropy test runner:
Removed astropy.tests.command module that was deprecated in v6.0.
Officially deprecated astropy.test, astropy.tests.runner.TestRunnerBase, and astropy.tests.runner.TestRunner (previously pending deprecation). This will also affect downstream packagename.test generated using TestRunner. The deprecated functionality will be removed in a future release after a deprecation period as per Astropy deprecation policy. [#17883]
The astropy.utils.iers.IERS.time_now property is deprecated. The astropy.time.Time.now() function can be used as a replacement. [#19060]
Cache directories are not created on discovery anymore. Meaning some functions that only retrieve a file or directory by name and without populating it won't guarantee that the path returned already exists. [#19631]
Removed deprecated functions is_path_hidden and walk_skip_hidden from astropy.utils.misc. [#19679]
Removed the deprecated min_cut and max_cut keywords from the simple_norm function and the fits2bitmap command-line script. Use the vmin and vmax keywords, respectively, to specify the cut levels. [#18994]
SpectralCoord conversions through the APE 14 high-level WCS API no longer emit a warning when neither the WCS nor the input SpectralCoord has an observer defined. Warnings are still emitted when only one of the two has observer information (and the conversion therefore proceeds without a velocity frame change). [#18902]
wcs.high_level_objects_to_values and wcs.values_to_high_level_objects no longer require their low_level_wcs argument to be a full astropy.wcs.wcsapi.BaseLowLevelWCS instance. Any object exposing world_axis_object_classes and world_axis_object_components attributes is accepted, and serialized_classes is now optional (treated as False if absent). [#19064]
Disabling thread concurrency within set_temp_cache and set_temp_config context managers, ensuring thread safety. [#19559]
convolve() and convolve_fft() now raise exceptions if the kernel is a masked array with masked values. [#18363]
Galactocentric and LSR now raise an error if their velocities are initialized with something that does not have velocity units. [#18362]
The refresh_cache parameter of EarthLocation.of_site() and EarthLocation.get_site_names() methods now works. [#18687]
Relativistic Doppler shifts are now applied to SpectralCoord in the correct direction even if the astropy.units.spectral() equivalency is enabled. Previously enabling the equivalency could cause wrong results with the SpectralCoord.to_rest(), SpectralCoord.with_observer_stationary_relative_to() or SpectralCoord.with_radial_velocity_shift() methods. [#19001]
Fixed a broadcasting bug in astropy.uncertainty.distributions.uniform where multi-dimensional inputs (ndim >= 2) would raise a ValueError. [#19308]
Send a User-Agent header to the OpenStreetMap API in EarthLocation.of_address to fix access denied errors. [#19330]
Fixed a missing f-string in a TypeError from BaseAffineTransform._apply_transform that caused {data.__class__} to appear literally in the error message. [#19403]
Modify ECSV reader to handle header "meta" entries that are not marked with the "!!omap" tag, but are otherwise valid YAML types allowed by the ECSV specification. [#19313]
Fix getdata()'s lower and upper keywords. [#19023]
Fix use of TNULL with float columns in ASCII tables. Undefined values in float columns are now replaced by NaNs (instead of 0). [#19025]
Fix for fsspec configuration in fits.open for remote FITS files. fits.open now accepts the keyword argument fsspec_filesystem, which is used to configure, e.g., the buffer block size. Remote FITS file objects are then opened with fsspec.filesystem.open. [#19294]
Fix a bug which caused CompImageHDU to have both SIMPLE and XTENSION keywords when initialized from a PrimaryHDU header. [#19362]
Fix support for reading FITS files using image tile compression with UNCOMPRESSED_DATA columns. [#19363]
Fixed a bug that caused reading FITS files to not work properly on WASM when relying on the default memmap settings. [#19367]
Fixed silent data corruption in FITS_rec.__setitem__ when using negative slice indices. Assigning to slices like data[-2:] = new_rows previously wrote to the wrong rows because negative indices were clamped to 0 instead of being resolved relative to the array length. [#19404]
Fixed a bug that caused compressed FITS files to become corrupted when opened in update mode and modifying the header. [#19416]
Fix a bug that caused header verification for CompImageHDU to not work correctly and in some cases produce corrupt files when the decompressed header was a primary HDU header not an extension header. [#19438]
Prevent creating RICE_1 or PLIO_1 compressed files with (u)int64 data. If possible without overflow data is converted to (u)int32, otherwise an error is raised. [#19592]
Fix variable-length array logical (PL/QL) columns being written as 1/0 bytes instead of FITS T/F and read back as raw int8 (84/70) instead of bool. Files written by astropy <= 7.2.0 (which used the legacy 0x00/0x01 encoding) are still readable: such files are detected on read and decoded correctly with an AstropyUserWarning. [#19629]
Fix a bug that caused uint64 data to be silently shifted by 2**63 when round-tripping through compressed FITS files (the FITS BZERO=2**63 offset was missing at compression time but still applied on read). Extend the existing RICE_1 and PLIO_1 64-bit-to-32-bit conversion fallback to also cover uint64 input and HCOMPRESS_1, and fix big-endian 64-bit input being silently truncated by the conversion check instead of raising. Reject PLIO_1 with unsigned multi-byte input outright, since the BZERO convention used to store unsigned FITS data produces negative values that PLIO cannot encode. [#19670]
Fix a bug that caused int8 data to be shifted by 128 when round-tripping through compressed FITS files (the FITS BZERO=-128 offset was missing at compression time but still applied on read), so writing [0, 1] and reading back returned [-128, -127]. [#19738]
Added elif to ensure we only write ZSIMPLE or ZTENSION as they are mutually exclusive. Fixed the ordering of the compressed hdu header keywords so that the TFORM and TTYPE columns always come directly after TFIELDS. [#19771]
Fixed reading parquet files written by pandas 3.0+, where string columns are encoded as large_string rather than string and previously round-tripped to object dtype instead of the expected fixed-width Unicode dtype. [#19658]
Bugfix for Parameter.value accessor when the parameter value has not been set yet. [#19189]
Fixed CCDData.read() logging a spurious info message when the unit passed by the caller matches the BUNIT value in the FITS header. [#19389]
Fixed an XML External Entity (XXE) vulnerability in SAMP XML-RPC communication by disabling external entity resolution. [#19231]
Fixed pickling of SigmaClip objects when Bottleneck is installed. _dtype_dispatch returned a local closure which cannot be pickled; replaced with a picklable _DtypeDispatch class. [#19372]
Fixed missing pointer dereference in fast_sigma_clip.c that caused mad_buffer to be allocated regardless of the use_mad_std value. [#19457]
Tables can now be joined and stacked also if they contain columns with user-defined data types such as QuadPrecDtype. [#19199]
Fixed AssertionError when passing numpy.bool_ as the index argument to Table.to_pandas() or Table.to_dataframe(). The correct ValueError is now raised instead. [#19358]
Fixed table index getting corrupted when a row assignment raises an exception mid-update. The index is now properly restored to its original state on failure. [#19450]
Fixes a problem where deepcopying a MaskedColumn did not correctly create the info attribute. This resulted in an inability to print the column after the deepcopy. [#19466]
Fixed missing goto fail in create_parser in parse_times.c after setting a ValueError for invalid parameter array size, preventing execution from continuing with an exception already set. [#19368]
Fixed a bug in the np.average function when weights with units and a different shape to the input array were passed and the optionally-returned sum of the weights was requested. The sum of the weights now has correct units. [#19055]
Fixed incorrect unit returned by numpy.diff when applied to logarithmic quantities (e.g., magnitudes). [#19360]
AttributeError will no longer occur when attempting to pickle an unbound DataInfo instance. [#19141]
Pickling Masked subclasses with an initialized info attribute no longer fails. [#19142]
ShapedLikeNDArray.take() now raises NotImplementedError when out is passed, instead of returning the exception object. [#19351]
Ensure that utils.masked.get_data_and_mask works properly with containers, returning None for the mask if masked is not set (instead of returning an all-False array). [#19534]
The dummy file object used by astropy.utils.misc.silence to replace sys.stdout/sys.stderr now implements flush() and isatty(), so importing libraries that probe the stream (e.g. IPython 9.13 at import time) no longer raises AttributeError under silence. [#19594]
Fixed a bug where values returned by cache_contents could include files and symlinks, instead of just directories. [#19672]
Add missing stacklevel arguments in warnings emitted from astropy.utils.data APIs [#19700]
Fix get_coords_overlay to prevent AstropyDeprecationWarnings for non-rectangular frames. [#19801]
Fixed a bug where degree units were hardcoded into the FITS WCS APE 14 world_to_pixel method. [#19506]
Lazily-populated caches on a WCS (such as the internal world_axis_object_components/world_axis_object_classes cache) are no longer included in the pickled state. They are regenerated on demand after unpickling, which keeps pickling robust even when a cache entry holds a non-picklable value.
Fixed a bug where the preserve_units option passed to the WCS constructor was silently reset to False when a WCS object was pickled and unpickled. [#19591]
Fix reference-count handling after PyList_SetItem steals references. [#19720]
Made the WCS coordinate transform paths (pixel_to_world, world_to_pixel, all_pix2world, wcs_pix2world, wcs_world2pix, mix) safe to call concurrently on a shared WCS instance from multiple threads. [#19819]
Improve performance of Binary parsing by moving converters to Cython
Numeric operations: 47-57% faster
Mixed data types: 37-45% faster
String operations: 24-35% faster
Boolean fields: 10-20% faster
Small overhead operations: 29-43% faster
Performance gains are consistent across dataset sizes from 200k to 1M rows. The most substantial improvements are seen in numeric types with up to 50-60% reduction in processing time. [#18454]
Vectorized the var-width mode in RipleysKEstimator by precomputing the full distance matrix, replacing a triple nested Python loop. This yields speedups of several thousand times for typical input sizes. [#19498]
Development-only dependencies, previously defined as user-visible extras dev and dev_all, were moved to PEP 735 dependency groups, and are thus only accessible when building astropy from source. [#18342]
The minimum required NumPy version is now 1.25. [#18962]
The minimum supported version of numpy is now 2.0. [#18986]
Upgraded WCSLIB to version 8.5, fixing NaN handling in linp2x() and linx2p(). For a full list of changes - see astropy/cextern/wcslib/CHANGES. [#19050]
Publishing files to PyPI is now done using the Trusted Publisher mechanism (https://docs.pypi.org/trusted-publishers/). [#19347]
Upgraded WCSLIB to version 8.6. For a full list of changes - see astropy/cextern/wcslib/CHANGES. [#19514]
Updated the bundled CFITSIO library to 4.6.4. [#19662]
Nothing published for this version
Nothing published for this version
Nothing published for this version
https://docs.astropy.org/en/v7.2.2/changelog.html
See https://docs.astropy.org/en/v7.2.1/changelog.html
See https://docs.astropy.org/en/v7.2.0/changelog.html
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) [#18118]
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). [#18193]
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. [#18459]
The trait astropy.cosmology.traits.CurvatureComponent has been added to work with objects that have attributes and methods related to the global curvature. [#18232]
The trait astropy.cosmology.traits.HubbleParameter has been added to work with objects that have attributes and methods related to the Hubble parameter. [#18271]
The trait astropy.cosmology.traits.DarkEnergyComponent has been added to work with objects that have attributes and methods related to the Dark Energy component. [#18447]
Cosmology methods now exclusively return arrays, not floats or other scalars. [#18632]
The trait astropy.cosmology.traits.DarkMatterComponent has been added to work with objects that have attributes and methods related to dark matter. [#18760]
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. [#18769]
The trait astropy.cosmology.traits.PhotonComponent has been added to work with objects that have attributes and methods related to photons. [#18787]
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. [#18794]
CDS table reader will find the metadata for gzipped tables in the accompanying ReadMe file. [#18506]
Enable color and suggestion-on-typos in all argparse CLIs for Python 3.14 (fitscheck, fitsdiff, fitsheader and fitsinfo). [#18151]
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. [#18379]
It is now possible to check the existence of Columns in ColDefs by using the membership operator. [#18717]
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"). [#18267]
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. [#18712]
Allow setting EXTNAME when writing a Table to a FITS file, e.g. tbl.write("filename.fits", name="CAT", append=True). [#18470]
Enable color and suggestion-on-typos in volint CLI for Python 3.14 [#18151]
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. [#18366]
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. [#17304]
The interpret_bit_flags function now strips whitespace from flag names. [#18205]
Enable color and suggestion-on-typos in samp_hub CLI for Python 3.14 [#18151]
Enable color and suggestion-on-typos in showtable CLI for Python 3.14 [#18151]
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. [#18435]
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. [#18641]
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. [#18680]
Allow np.concatenate, np.stack and similar numpy functions to be applied on Time and TimeDelta instances. [#18193]
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 [#18330]
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. [#18586]
Enable color and suggestion-on-typos in fits2bitmap CLI for Python 3.14 [#18151]
Added show_decimal_unit to set_major_formatter to control whether or not units are shown in decimal mode. [#18312]
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. [#18443]
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. [#18602]
Enable color and suggestion-on-typos in all wcslint CLI for Python 3.14 [#18151]
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). [#18338]
The functionality of astropy.coordinates.concatenate and astropy.coordinates.concatenate_representations is now available using np.concatenate. Hence, these functions are being deprecated, emitting an AstropyPendingDeprecationWarning starting with astropy 7.2. This will be followed by a regular deprecation warning in astropy 8.0, and removal in 9.0. [#18193]
The matrix_utilities module was not included in the astropy API documentation, but it was nonetheless explicitly referred to in some of the other documentation. This made it unclear if the functions in the module are public or private. The public matrix utilities is_rotation_or_reflection() and rotation_matrix() have been made available from the astropy.coordinates namespace and should be imported from there. Functions not available from the astropy.coordinate namespace are private and may be changed or removed without warning. However, three functions have been explicitly deprecated, despite being private, as a courtesy to existing users. matrix_utilites.angle_axis() and matrix_utilites.is_rotation() are deprecated without replacement. matrix_utilities.is_O3() is deprecated and the public is_rotation_or_reflection() function can be used as a replacement. [#18418]
The undocumented earth_orientation module has been removed. [#18638]
astropy prefers reading data required for EarthLocation.of_site() from a local cache and tries downloading (and caching) the data from the Internet if the cache is empty. As a last resort astropy has so far read a small bundled data file that provided data for Greenwich as the single entry, but now astropy will raise an error. [#18649]
UnifiedInputRegistry and UnifiedOutputRegistry's delay_doc_updates method's effect is disabled under Python's optimized mode (-OO flag). [#17572]
Added a config property to astropy.io.votable.tree.VOTableFile. This property can be passed to the config parameter of constructors that need to know the associated VOTable version, such as TimeSys and CooSys. [#18366]
Add additional detail to the text of the ValueError that is raised when pprint cannot parse a column format string. [#17631]
Selecting a table index in the .loc, .iloc, or .loc_indices properties by passing the index identifier as the first element of the item is deprecated and is planned for removal in astropy 9.0. For example, if a table t has two indices on columns "a" and "b" respectively, then t.loc["b", 2] (to find table rows where t["b"] == 2) is deprecated. This is replaced by t.loc.with_index("b")[2]. [#18680]
API changes towards a future deprecation of astropy test runner:
astropy.tests.runner.keyword is removed from public API. It is used internally as a decorator within astropy test runner and its exposure as public API was a mistake. In the future, it will be removed without any deprecation.
astropy.test, astropy.tests.runner.TestRunnerBase, and astropy.tests.runner.TestRunner are now pending deprecation (AstropyPendingDeprecationWarning). This will also affect downstream packagename.test generated using TestRunner. They may start to emit AstropyDeprecationWarning in v8.0 (but no earlier). [#17874]
The isiterable() utility is deprecated. numpy.iterable() can be used as a drop-in replacement. [#18053]
astropy.utils.metadata.MergeStrategy no longer modifies the merge() methods of its subclasses at runtime to re-raise all exceptions as MergeConflictError. This does not affect the functionality of MergeStrategy subclasses within the astropy metadata merging machinery. [#18518]
A warning is now emitted for each axis name which is invalid in set_ticklabel_position, set_axislabel_position, and set_ticks_position. This is a deprecation warning, and in future invalid axis names will result in an error. [#18324]
A warning is now emitted if arguments are given to the getter method get_axislabel_visibility_rule. This is a deprecation warning, and in future, giving arguments to this method will result in an error. [#18792]
get_config_dir() and get_cache_dir() now emit warnings in all cases where the XDG_CACHE_HOME (XDG_CONFIG_HOME, respectively) environment variable doesn't meet internal assumptions and is ignored as a result. [#17934]
The angle argument of the rotation_matrix() function can now be any angle-like value, like its docstring states. Previously some angle-like values (e.g. angle-like strings) were erroneously rejected. [#18504]
Fix bug with heap which was not updated after a VLA column is modified. [#18487]
Make fitscheck verify all HDUs before listing errors. [#18574]
Fix calculation of DATASUM/CHECKSUM for heap data in BinTableHDU. [#18681]
Fixed a bug in fitsdiff script where failing to read a single file could crash the entire program. A warning is now printed instead, and such files are simply ignored. [#18882]
Fixed a bug where writing a table to ECSV fails if meta contains a value that is a numpy string. [#18677]
Updated IVOA UCD1+ controlled vocabulary from version 1.5 to 1.6. This adds support for new atmospheric observation terms including obs.atmos.wind, obs.atmos.humidity, obs.atmos.rain, obs.atmos.turbulence, obs.atmos.turbulence.isoplanatic, obs.atmos.water, and phys.temperature.dew which are now recognized when parsing UCDs with check_controlled_vocabulary=True. [#18483]
Fixed a bug in add_data_origin_info() where content is ignored for some INFO names. [#18771]
Fixed a bug in modeling.tabular models when the lookup_table is a Quantity, where the result might lose its unit in some cases. [#18958]
Fixed unexpected upcasting to 64 bits when doing arithmetic with Python scalars on numpy 2.
Don't upcast NDData unnecessarily when doing arithmetic involving a single unit (consistent with the behaviour when there are no units). Upcasting still occurs if an operand's unit gets converted to match the other, or where required by the other operand's dtype. [#18392]
SAMPHubServer._call_and_wait raises a new SAMPProxyTimeoutError (derived from SAMPProxyError) exception on timeout. This allows client code to more easily distinguish timeouts from other kind of exceptions. [#18169]
poisson_conf_interval kraft-burrows-nousek no longer fails for large N. [#18676]
Fix a bug when slicing a table that has a multi-column index. Previously, after slicing the table then tbl.indices would show duplicates of the multi-column index, one for each column in the index. The underlying indices on the index columns were incorrectly distinct objects instead of the expected reference to a single index object. [#18694]
Fix bugs when indexing a QTable with a Quantity column. Previously, after adding the index then indexed item access via with a Quantity or slicing was failing. [#18725]
Fix a bug where the ECSV writer was not correctly quoting column names if the first name starts with the "#" character or any names contain leading/trailing whitespace. In this situation, all column names are now surrounded by double quotes per the ECSV standard. Likewise the ECSV reader was incorrectly stripping surrounding whitespace from column names, leading to a consistency check failure when reading. [#18752]
Fixed a bug when writing Table to FITS files, if the table contained masked arrays of integers. [#18818]
The string representations of the liter with the different astropy unit formatters are now more consistent with each other. This change only affects converting units to strings, it has no effect on parsing strings to units. [#18500]
So far only the "cds" unit format has been capable of parsing the string "as" as the attosecond, but now the other unit formats recognize that string too. [#18723]
The "ogip" unit formatter can now parse strings that include signed fractions in the exponent, e.g. u.Unit("m**(-1/2)", format="ogip"). [#18776]
If numpy.msort() is called with a Masked array then astropy no longer erroneously hides the deprecation warning (with numpy versions 1.24-1.26). [#18173]
For numpy < 2.0, applying np.atleast_*d to iterables of most astropy classes will now return a list of instances instead of a tuple, to match the behaviour for arrays. For numpy >= 2.0, tuples continue to be returned. [#18193]
Fixed an image-normalization bug where the interval on a ImageNormalize instance could be ignored when plotting. [#18590]
Fixed a bug that caused world_to_array_index to return lists instead of Numpy arrays. [#18730]
The minimum required NumPy version is now 1.24. [#18160]
The minimum required Matplotlib version is now 3.8.0. [#18164]
Bundled expat is updated to version 2.7.3. [#18657]
Updated the bundled CFITSIO library to 4.6.3. [#18689]
Wheels are now provided for Windows arm64. [#18786]
Nothing published for this version
Nothing published for this version
See https://docs.astropy.org/en/v7.1.1/changelog.html
See https://docs.astropy.org/en/v7.1.1/changelog.html
Writing zero-row BinTableHDU with string columns no longer raises a broadcast error in _ascii_encode() [#18230]
Compute maximum absolute and relative differences reported by ImageDataDiff on the full arrays instead of only a few values. [#18451]
Fix slicing FITS compressed file with .section when data is scaled. [#18640]
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. [#18526]
Fix handling of bounded variable-length char arrays in BINARY2 format which were previously treated as fixed length. [#18105]
Fixed key error with numpy functions np.min, np.max, np.mean, and np.sum. [#18424]
Fix partial cutouts with FITS compressed file and scaled data. [#18640]
Fixed a bug in table.table_helpers.ArrayWrapper where byteorder of the underlying data was not necessarily preserved through roundtrips. [#18139]
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. [#18511]
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. [#18265]
Fixed the aggregate_downsample performance degradation when non-default aggregate_func is used. [#18188]
Fixed the LaTeX representation of DexUnit in astropy.units, and thus also how it is represented in, e.g., jupyter notebooks. [#18627]
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. [#18311]
Fixed a bug that under certain conditions could lead to ticks being incorrectly labelled with a single "$" dollar sign in WCSAxes. [#18313]
Fixed WCSAxes.get_transform() in the case of 1D WCS [#18327]
Fixed a bug that caused the default format unit to be incorrect for RA/Dec WCSes with non-degree units [#18346]
Fix a bug where the units of the values= keyword argument to set_ticks was not respected. [#18577]
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. [#16411]
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. [#18350]
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. [#18352]
Fixed a bug where world->pixel conversions did not work correctly on a 1D WCS sliced via SlicedLowLevelWCS. [#18394]
Fixed a bug that caused slicing of WCS objects with an ellipsis to not return a WCS object but instead a SlicedLowLevelWCS object. [#18417]
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. [#18419]
Fixed a race condition when using the APE-14 API for the WCS class in a multi-threaded environment. [#18692]
Improved performance of modeling.rotations.spherical2cartesian() by 11-18% depending on the size of the input data arrays. [#18238]
Fixed errors with building the package from source on Windows via python -m build and similar commands. [#18253]
Pre-built binaries (wheels) for Linux are now built using the manylinux_2_28 image (previously, manylinux2014 was used). [#18374]
See https://docs.astropy.org/en/v7.1.0/changelog.html
See https://docs.astropy.org/en/v7.1.0/changelog.html
search_around_sky and search_around_3D now accept separations/distlimits broadcastable to the same shape as coords1. [#17824]
Add functionality to read and write to a Table from the TDAT format as part of the Unified File Read/Write Interface. [#16780]
io.ascii now supports on-the-fly decompression of LZW-compressed files (typically ".Z" extension) via the optional package uncompresspy. [#17960]
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). [#17748]
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. [#17777]
io.fits now supports on-the-fly decompression of LZW-compressed files (typically ".Z" extension) via the optional package uncompresspy. [#17960]
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. [#17968]
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". [#17706]
New module astropy.io.votable.dataorigin to extract Data Origin information from INFO in VOTable. [#17839]
CooSys VOTable elements now have a method to_astropy_frame that returns the corresponding astropy built-in frame, when possible. [#17999]
Added a fit_info= keyword argument to parallel_fit_dask to allow users to preserve fit information from each individual fit. [#17538]
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. [#16690]
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. [#17876]
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 . [#17676]
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. [#18023]
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. [#17651]
It is now possible to import angström, litre and ohm from astropy.units using the Å, ℓ and Ω symbols. [#17829]
Unit conversions between kelvins and degrees Rankine no longer require the temperature equivalency. [#17985]
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:
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. [#17691]
utils.data now supports on-the-fly decompression of LZW-compressed files (typically ".Z" extension) via the optional package uncompresspy. [#17960]
On representations the method get_name has been deprecated in favor of the class-level attribute name. The method will be removed in a future release. [#17503]
A new public module, astropy.cosmology.io, has been added to provide support for reading, writing, and converting cosmology instances.
The private modules astropy.cosmology.funcs, astropy.cosmology.parameter, astropy.cosmology.connect, astropy.cosmology.core, and astropy.cosmology.flrw have been deprecated. Their functionality remains accessible in the astropy.cosmology module or in the new astropy.cosmology.io module. [#17543]
Comoving distances now accept an optional 2nd argument, where the two-argument form is the comoving distance between two redshifts. The one-argument form is the comoving distance from redshift 0 to the input redshift. [#17701]
A new public module, astropy.cosmology.traits, has been added to provide building blocks for custom cosmologies. The currently available traits are: - astropy.cosmology.traits.ScaleFactor - astropy.cosmology.traits.TemperatureCMB [#17702]
Astropy used to bundle the javascript libraries jQuery and DataTables for interactive (e.g. sorting by column values) tables using the show_in_browser() method. This bundling requires relatively large files in astropy itself, for a relatively minor feature. Furthermore, the astropy developers are not experts in javascript development, and javascript libraries many need updates to improve on security vulnerabilities. This change removes the bundled versions of jQuery and DataTables from astropy, updates the default version of the remote URLs to version 2.1.8 of DataTables, and sets the default for show_in_browser(use_local_files=False) to use the remote versions in all cases. If the method is called with use_local_files=True, a warning is displayed and remote version are used anyway. This may break the use of the method when working offline, unless the javascript files are cached by the browser from a previous online session. [#17521]
showtable CLI is now deprecated to avoid a name clash on Debian; use showtable-astropy instead. [#18047]
Fix issues in the handling of a call like tbl.loc[item] or tbl.loc_indices[item] and make the behavior consistent with pandas. Here tbl is a Table or QTable with an index defined.
If item is an empty list or zero-length np.ndarray or an empty slice, then previously tbl.loc[item] would raise a KeyError exception. Now it returns the zero-length table tbl[[]].
If item is a one-element list like ["foo"], then previously tbl.loc[item] would return either a Row or a Table with multiple row, depending on whether the index was unique. Now it always returns a Table, consistent with behavior for tbl.loc[[]] and tbl.loc[["foo", "bar"]].
See https://github.com/astropy/astropy/pull/18051 for more details. [#18051]
Passing fraction='multiline' to unit.to_string() will no longer raise an exception if the given format does not support multiline fractions, but rather give a warning and use an inline fraction. [#17374]
Automatic conversion of a str or bytes instance to a unit when it is multiplied or divided with an existing unit or quantity is deprecated. [#17586]
Accessing the contents of the units.deprecated module now emits deprecation warnings. The module may be removed in a future version. [#17929]
All arguments from simple_norm are marked as future keyword-only, with the exception of the first two (data and stretch). A warning is now displayed if any other arguments are passed positionally. [#17489]
Fix possible int overflow in the tile compression C code. [#17995]
In CooSys elements, the system was not checked for votable version 1.5 [#17999]
Fix setting logging level from the samp_hub command line. Previously, samp_hub --log-level OFF was documented as supported but actually caused an exception to be raised. The patch infers valid choices from the standard library's logging module. A CRITICAL level will closely emulate the intended OFF setting. [#17673]
Initializing a Table with rows or data set to [] or a numpy array with zero size (e.g., np.array([[], []])) is now equivalent to Table(data=None, ...) and creates a table with no data values. This allows defining the table names and/or dtype when creating the table, for instance: Table(rows=[], names=["a", "b"], dtype=[int, float]). Previously this raised an exception. [#17717]
Fix issues in the handling of a call like tbl.loc[item] or tbl.loc_indices[item] and make the behavior consistent with pandas. Here tbl is a Table or QTable with an index defined.
If item is an empty list or zero-length np.ndarray or an empty slice, then previously tbl.loc[item] would raise a KeyError exception. Now it returns the zero-length table tbl[[]].
If item is a one-element list like ["foo"], then previously tbl.loc[item] would return either a Row or a Table with multiple row, depending on whether the index was unique. Now it always returns a Table, consistent with behavior for tbl.loc[[]] and tbl.loc[["foo", "bar"]].
See https://github.com/astropy/astropy/pull/18051 for more details. [#18051]
Made TimeSeries.from_pandas and BinnedTimeSeries.read more robust to subclassing. [#17351]
For the Angstrom unit in the CDS module, u.cds.Angstrom, the string representation is now "Angstrom" (instead of "AA"), consistent with what was always the case for u.Angstrom, and conformant with the CDS standard. [#17536]
Previously the string representation of the solMass unit in the "cds" format depended on whether the unit was imported directly from units or from units.cds. Although both representations were valid according to the CDS standard, the inconsistency was nonetheless needlessly surprising. The representation of units.cds.solMass has been changed to match the representation of units.solMass. [#17560]
The degrees Rankine is now represented as "$mathrm{{}^{circ}R}$" in the "latex" and "latex_inline" formats and as "°R" in the "unicode" format. [#18049]
Properly detect invalid LZMA files in utils.data. [#17984]
Fixed an issue when using plot_coord after slicing the WCS object coordinates. [#18005]
Improved the aggregate_downsample performance using a new default aggregate_func. [#17574]
Converting strings to units with Unit() is now up to 225% faster. [#17399]
UnitBase.compose() is now 20% faster. [#17425]
After import astropy, dir(astropy) will now list all subpackages, including those that have not yet been loaded. This also means tab completion will work as expected (e.g., from astropy.coo<TAB> will expand to from astropy.coordinates). [#17598]
Updated bundled WCSLIB version to 8.4, fixing issues in wcs_chksum and wcs_fletcher32. For a full list of changes - see astropy/cextern/wcslib/CHANGES. [#17886]
Nothing published for this version
See https://docs.astropy.org/en/v7.0.2/changelog.html
See https://docs.astropy.org/en/v7.0.2/changelog.html
Fix a bug where config file generation did not parse nested subclasses of astropy.config.ConfigNamespace. [#18107]
Fix a bug in nddata.Cutout2D when creating partial cutouts of Section objects by adding a dtype property to the Section class. [#17611]
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. [#17642]
Fix setting a slice on table rows (FITS_record). [#17737]
Fix checksum computation for tables with VLA columns, when table is loaded in memory. [#17806]
Fix .fileinfo() for compressed HDUs. [#17815]
Fix FITS_rec repr when a column has scaling factors, leading to a crash with numpy>=2.0. [#17933]
Fixed a bug that caused THEAP, ZBLANK, ZSCALE, and ZZERO to not be correctly removed during decompression of tile-compressed FITS files. [#18072]
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. [#17570]
unicodeChar fields can now be of bounded variable size (arraysize="10*). [#18075]
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. [#17869]
Now bayesian_blocks(t, x, fitness="events") correctly handles the case when the input data x contains zeros. [#17800]
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. [#17450]
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,)]). [#17936]
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). [#17742]
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. [#17853]
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. [#17868]
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. [#17450]
Ensure that the astropy.visualization.wcsaxes.custom_ucd_coord_meta_mapping context manager performs a (correct) cleanup. [#17749]
Fixed interval classes for masked input (MaskedArray and MaskedNDArray). [#17927]
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. [#17941]
Fixed an issue where LinearStretch values were not being clipped to [0:1] when clip=True. [#17943]
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. [#17769]
Updated the bundled CFITSIO library to 4.6.0. [#17904]
See https://docs.astropy.org/en/v7.0.1/changelog.html
See https://docs.astropy.org/en/v7.0.1/changelog.html
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. [#17480]
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. [#17514]
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). [#17693]
Fixed parsing ASCII table with data that starts with a tilda. [#17565]
Find and read ASCII tables even if there is white space before \begin{tabular}, \tablehead, and similar markers. [#17624]
Fix memory leak in `BinTableHDU.copy()` [#16143]
Fix overflow error with Numpy 2 and VLA columns using P format. [#17328]
Fix ImageHDU.scale with float. [#17458]
Fixed Table.write(..., format="fits", overwrite=True) when filename is provided as pathlib.Path. [#17552]
Updated XML writer for VOTableFile element to include or drop coordinate_systems regardless of version. [#17356]
Fix fitting of compound models when inputs has more than one dimension, and specifically fix fitting of compound models with Polynomial2D components [#17618]
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. [#17381]
Fix a crash in Table.show_in_browser due to an internal type inconsistency. [#17513]
Fix incorrect description of the unique parameter in Table.add_index's docstring. Add missing Raises section. [#17677]
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. [#17469]
The zebi (Zi, 2^70) and yobi (Yi, 2^80) binary prefixes are now supported. [#17692]
Fix CoordinateHelper.ticklabels. The getter was incorrectly returning the helper's ticks rather than the labels. [#17444]
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 [#17531]
Update bundled js library datatables to version 2.1.8, which is current at the time of this PR. [#17480]
See https://docs.astropy.org/en/v7.0.0/changelog.html
See https://docs.astropy.org/en/v7.0.0/changelog.html
Added get_config_dir_path (and get_cache_dir_path) which is equivalent to get_config_dir (respectively get_cache_dir) except that it returns a pathlib.Path object instead of str. [#17118]
BaseCoordinateFrame instances such as ICRS, SkyOffsetFrame, etc., can now be stored directly in tables (previously, they were stored as object type columns). Furthermore, storage in tables is now also possible for frames that have no data (but which have attributes with the correct shape to fit in the table). [#16831]
BaseCoordinateFrame now has a to_table() method, which converts the frame to a QTable, analogously to the SkyCoord.to_table() method. [#17009]
SkyCoord, coordinate frames, and representations have all have gained the ability to deal with Masked data. In general, the procedure is similar to that of Time, except that different representation components do not share the mask, to enable holding, e.g., a catalogue of objects in which only some have associated distances. [#17016]
Add support for pathlib.Path objects in astropy.io.ascii.core.BaseInputter.get_lines. [#16930]
Expanded FITSDiff output for PrimaryHDU and ImageHDU to include the maximum relative and absolute differences in the data. [#17097]
The HDF5 writer, write_table_hdf5(), now accepts os.PathLike objects as output. [#16955]
Support reading and writing of VOTable version 1.5, including the new refposition attribute of COOSYS. [#16856]
Added Model.has_tied, Model.has_fixed, and Model.has_bounds attributes to make it easy to check whether models have various kinds of constraints set without having to inspect Model.tied, Model.fixed, and Model.bounds in detail. [#16677]
Added a new parallel_fit_dask function that can be used to fit models to many sections (e.g. spectra, image slices) on an N-dimensional array in parallel. [#16696]
Added a Lorentz2D model. [#16800]
Added inplace=False/True keyword argument to the __call__ method of most fitters, to optionally allow the original model passed to the fitter to be modified with the fitted values of the parameters, rather than return a copy. This can improve performance if users don't need to keep hold of the initial parameter values. [#17033]
Added a SigmaClippedStats convenience class for computing sigma-clipped statistics. [#17221]
Changed a number of dict-like containers in io.ascii from OrderedDict to dict. The dict class maintains key order since Python 3.8 so OrderedDict is no longer needed. The changes are largely internal and should not affect users in any way. See also the API change log entry for this PR. [#16250]
Add a keep_order argument to the astropy.table.join function which specifies to maintain the original order of the key table in the joined output. This applies for inner, left, and right joins. The default is False in which case the output is ordered by the join keys, consistent with prior behavior. [#16361]
Add a formatter argument to the to_string method of the Quantity class. Enables custom number formatting with a callable formatter or format_spec, especially useful for consistent notation. [#16087]
Add the unit foe (or Bethe, equivalent to 1e51 erg), which is often used to express the energy emitted by a supernova explosion. [#16441]
Add magnetic_flux_field equivalency to convert magnetic field between magnetic field strength (H) and magnetic flux density (B). [#16516]
Added SI-units sievert, gray, katal, and hectare in astropy.units.si. [#16729]
When parsing invalid unit strings with u.Unit(..., parse_strict="warn") or u.Unit(..., parse_strict="silent"), a normal unit may be returned if the problem is not too serious. If parsing the string fails completely then an UnrecognizedUnit instance is returned, just as before. [#16892]
Added a np.arange dispatch for Quantity (requires one to use like=<some_quantity>). [#17059]
Added support for calling numpy array constructors (np.empty, np.ones, np.zeros and np.full) with like=Quantity(...) . [#17120]
Added support for calling numpy array constructors (np.array, np.asarray, np.asanyarray, np.ascontiguousarray and np.asfortranarray) with like=Quantity(...) . [#17125]
Added support for calling numpy array constructors (np.frombuffer, np.fromfile, np.fromiter, np.fromstring and np.fromfunction) with like=Quantity(...)) . [#17128]
Added support for calling numpy array constructors (np.require, np.identity, np.eye, np.tri, np.genfromtxt and np.loadtxt) with like=Quantity(...)) . [#17130]
Added the astropy.system_info function to help document runtime systems in bug reports. [#16335]
Add support for specifying files as pathlib.Path objects in IERS_A.read and IERS_B.read. [#16931]
Add make_rgb(), a convenience function for creating RGB images with independent scaling on each filter. Refactors make_lupton_rgb() to work with instances of subclasses of BaseStretch, including the new Lupton-specific classes LuptonAsinhStretch and LuptonAsinhZscaleStretch. [#15081]
Add support for custom coordinate frames for WCSAxes through a context manager astropy.visualization.wcsaxes.custom_ucd_coord_meta_mapping. [#16347]
Added get_ticks_position, get_ticklabel_position, and get_axislabel_position methods on CoordinateHelper in WCSAxes. [#16686]
Added the ability to disable the automatic simplification of WCSAxes tick labels by specifying simplify=False to set_ticklabel() for a coordinate axis. [#16938]
Added the ability to specify that WCSAxes tick labels always include the sign (namely for positive values) by starting the format string with a + character. [#16985]
Allow astropy.visualization.units.quantity_support to be used as a decorator in addition to the already supported use as a context manager. [#17006]
Added the ability to specify a callable function in CoordinateHelper.set_major_formatter [#17020]
Added a SimpleNorm class to create a matplotlib normalization object. [#17217]
WCSAxes will now select which axis to draw which tick labels and axis labels on based on the number of drawn tick labels, rather than picking them in the order they are listed in the WCS. This means that axes may be swapped in comparison with previous versions of Astropy by default. [#17243]
For non-scalar frames without data, len(frame) will now return the first element of its shape, just like for frames with data (or arrays more generally). For scalar frames, a TypeError will be raised. Both these instead of raising a ValueError stating the frame has no data. [#16833]
The deprecated coordinates.get_moon() function has been removed. Use coordinates.get_body("moon") instead. [#17046]
The deprecated BaseCoordinateFrame.get_frame_attr_names() is removed. Use get_frame_attr_defaults() instead. [#17252]
Passing redshift arguments as keywords is deprecated in many methods. [#16597]
Deprecated cosmology.utils module has been removed. Any public API may be imported directly from the cosmology module instead. [#16730]
Setting Ob0 = None in FLRW cosmologies has been deprecated in favor of Ob0 = 0.0. Conceptually this is a change in that baryons are now always a component of the cosmology. Practically, the only change (besides that Ob0 is never None) is that methods relying on Ob0 always work, rather than sometimes raising an exception, instead by default taking the contribution of the baryons to be negligible. [#16847]
Remove all deprecated arguments from functions within astropy.io.ascii.
read(): - Reader is removed. Instead supply the equivalent format argument. - Use inputter_cls instead of Inputter. - Use outputter_cls instead of Outputter.
get_reader(): - Use reader_cls instead of Reader. - Use inputter_cls instead of Inputter. - Use outputter_cls instead of Outputter.
write(): - Writer is removed. Instead supply the equivalent format argument.
get_writer(): - Use writer_cls instead of Writer. [#15758]
The CompImageHDU class has been refactored to inherit from ImageHDU instead of BinTableHDU. This change should be for the most part preserve the API, but any calls to isinstance(hdu, BinTableHDU) will now return False if hdu is a CompImageHDU whereas before it would have returned True. In addition, the uint keyword argument to CompImageHDU now defaults to True for consistency with ImageHDU. [#15474]
Remove many unintended exports from astropy.io.fits.hdu.compressed. The low-level functions compress_image_data and decompress_image_data_section are now only available at the qualified names astropy.io.fits.hdu.compressed._tiled_compression.compress_image_data and astropy.io.fits.hdu.compressed._tiled_compression.decompress_image_data_section. The rest of the removed exports are external modules or properly exported elsewhere in astropy. May break imports in rare cases that relied on these exports. [#15781]
The CompImageHeader class is now deprecated, and headers on CompImageHDU instances are now plain Header instances. If a reserved keyword is set on CompImageHDU.header, a warning will now be emitted at the point where the file is written rather than at the point where the keyword is set. [#17100]
Remove code that was deprecated in previous versions: _ExtensionHDU and _NonstandardExtHDU, (Bin)Table.update, tile_size argument for CompImageHDU. Also specifying an invalid tile_shape now raises an error. [#17155]
New format "parquet.votable" is added to read and write a parquet file with a votable metadata included. [#16375]
Table.read(..., format='votable'), votable.parse and votable.parse_single_table now respect the columns argument and will only output selected columns. Previously, unselected columns would just be masked (and unallocated). astropy.io.votable.tree.TableElement.create_arrays also gained a colnumbers keyword argument to allow column selection. [#15959]
Subclasses of _NonLinearLSQFitter, so any subclasses of the public LevMarLSQFitter, TRFLSQFitter, LMLSQFitter or DogBoxLSQFitter, should now accept an additional fit_param_indices kwarg in the function signature of their objective_function methods. Nothing is needed to be done with this kwarg, and it might not be set, but it can optionally be passed through to fitter_to_model_params_array for a performance improvement. We also recommended accepting all kwargs (with **kwargs) in this method so that future additional kwargs do not cause breakage. [#16673]
Exception message for when broadcast shapes mismatch has changed. Previously, it used complicated regex to maintain backward compatibility. To ease maintenance, this regex has been removed and now directly passes exception from numpy.broadcast_shapes function. [#16770]
Using the LMLSQFitter fitter with models that have bounds is now deprecated, as support for bounds was very basic. Instead, non-linear fitters with more sophisticated support for bounds should be used instead. [#16994]
The optional use_min_max_bounds keyword argument in TRFLSQFitter and DogBoxLSQFitter has now been deprecated and should not be used. These fitters handle bounds correctly by default and this keyword argument was only provided to opt-in to a more basic form of bounds handling. [#16995]
The deprecated comb() function has been removed. Use math.comb() from the Python standard library instead. [#17248]
Integer inputs to sigma_clip and SigmaClip are not converted to np.float32 instead of float if necessary. [#17116]
Change the default type for the meta attribute in Table and Column (and subclasses) from OrderedDict to dict. Since Python 3.8 the dict class is ordered by default, so there is no need to use OrderedDict.
In addition the ECSV table writer in astropy.io.ascii was updated to consistently write the meta attribute as an ordered map using the !!omap tag. This convention conforms to the ECSV specification and is supported by existing ECSV readers. Previously the meta attribute could be written as an ordinary YAML map, which is not guaranteed to preserve the order of the keys. [#16250]
An exception is now raised when trying to add a multi-dimensional column as an index via Table.add_index. [#16360]
Aggregating table groups for MaskedColumn no longer converts fully masked groups to NaN, but instead returns a masked element. [#16498]
Always use MaskedQuantity in QTable to represent masked Quantity data or when the QTable is created with masked=True. Previously the default was to use a normal Quantity with a mask attribute of type FalseArray as a stub to allow a minimal level of compatibility for certain operations. This update brings more consistent behavior and fixes functions like reading of table data from a list of dict that includes quantities with missing entries, and aggregation of MaskedQuantity in table groups. [#16500]
Setting an empty table to a scalar no longer raises an exception, but creates an empty column. This is to support cases where the number of elements in a table is not known in advance, and could be zero. [#17102]
show_in_notebook method for Astropy tables has been un-deprecated and the API has been updated to accept a backend keyword and require only keyword arguments. The new default backend="ipydatagrid" relies on an optional dependency, ipydatagrid. The previous default table viewer (prior to v7.0) is still available as backend="classic", but it has been deprecated since v6.1 and will be removed in a future release. [#17165]
The default behavior of Table.pformat was changed to include all rows and columns instead of truncating the outputs to fit the current terminal. The new default keyword arguments max_width=-1 and max_lines=-1 now match those in Table.pformat_all. Since the Table.pformat_all method is now redundant, it is pending deprecation. Similarly, the default behavior of Column.pformat was changed to include all rows instead of truncating the outputs to fit the current terminal. [#17184]
Time.ptp now properly emits a deprecation warning independently of NumPy's version. This method was previously deprecated in astropy 6.1, but the warning was not visible for users that had NumPy 1.x installed. Because of this, the warning message was updated to state that Time.ptp is deprecated since version 7.0 instead. [#17212]
The deprecated Quantity.nansum() method has been removed. Use np.nansum instead. [#15642]
The factor parameter of the spectral_density equivalency, the use of which has been discouraged in the documentation since version 0.3, is now deprecated. Use the wav parameter as a Quantity, not as a bare unit. [#16343]
The format.Fits formatter class has been renamed to format.FITS and the old name is deprecated. Specifying the FITS format for converting Quantity and UnitBase instances to and from strings is not affected by this change. [#16455]
Conversion from one unit to another using old_unit.to(new_unit, value) no longer converts value automatically to a numpy array, but passes through array duck types such as dask arrays, with equivalencies properly accounted for. [#16613]
The format_exponential_notation() method of the Base unit formatter has changed. Any unit formatters that inherit directly from Base but have not implemented their own format_exponential_notation() and wish to retain previous behavior should implement it as:
def format_exponential_notation(cls, val, format_spec):
return format(val, format_spec)
Any formatters that inherit directly from Base and call super().format_exponential_notation(val, format_spec) should instead call format(val, format_spec) The specific unit formatters in astropy.units and custom formatters that inherit from any of them are not affected. [#16676]
The deprecated units.format.Unscaled has been removed. Use units.format.Generic instead. [#16707]
Added a __round__() dunder method to Quantity in order to support the built-in round() function. [#16784]
For Masked initialization in which a mask is passed in, ensure that that mask is combined with any mask present on the input. [#16875]
The get_format_name() method of NamedUnit and its subclasses is deprecated. The to_string() method can be used instead. [#16958]
The UnitBase.in_units() method is deprecated. The to() method can be used as a drop-in replacement. [#17121]
Unit conversions to a given system with unit.to_system(), unit.si, and unit.cgs, will now prefer the simplest unit if it is in the given system, rather than prioritizing more complicated units if those had a base unit component. E.g., u.Pa.si will now simply return Unit("Pa") rather than Unit("N / m2"). However, the case where a unit can be simply described in base units remains unchanged: u.Gal.cgs will still give Unit("cm / s2"). [#17122]
The CDS, OGIP and VOUnit unit formatters are now subclasses of the FITS unit formatter. [#17178]
The eV and rydberg units were moved to astropy.units.misc (from astropy.units.si and astropy.units.astrophys, respectively). Practically, this means that Unit.to_system(u.si) no longer includes eV as a SI-compatible unit. [#17246]
IERS_Auto.open() now always returns a table of type IERS_Auto that contains the combination of IERS-A and IERS-B data, even if automatic updating of the IERS-A file is disabled or if downloading the new file fails. Previously, under those conditions, it would return a table of a different type (IERS_B) with only IERS-B data. [#16187]
astropy.utils.check_broadcast is now deprecated in favor of numpy.broadcast_shapes [#16346]
Added a new keyword pending_warning_type to deprecated decorator so downstream developers could customize the type of warning for pending deprecation state. [#16463]
The introspection.resolve_name() function is deprecated. It is better to use the standard library importlib instead. [#16479]
format_exception() is deprecated because it provides little benefit, if any, over normal Python tracebacks. [#16807]
The utils.masked module has gained a mixin class, MaskableShapedLikeNDArray, as well as two utility functions, get_data_and_mask and combine_masks, that can help make a container classes carry masked data. Within astropy, these are now used in the implementation of masks for Time. [#16844]
The deprecated compat.override__dir__() utility has been removed. [#17190]
Removed deprecated exp attribute in the LogStretch, InvertedLogStretch, PowerDistStretch, and InvertedPowerDistStretch stretch classes, and the power attribute in the PowerStretch. Instead, use the a attribute, which matches the input keyword. [#15751]
Removes the unintended NumPy export previously at astropy.visualization.np. [#15781]
Accessing or setting the following attributes on CoordinateHelper has been deprecated:
ticks
ticklabels
axislabels
Setting the following attributes on CoordinateHelper directly has been deprecated:
parent_axes
parent_map
transform
coord_index
coord_unit
coord_type (use set_coord_type instead)
coord_wrap (use set_coord_type instead)
frame
default_label
Accessing or setting the following attributes on CoordinateHelper has been removed (without deprecation, as these were clearly internal variables):
grid_lines_kwargs
grid_lines
lblinfo
lbl_world
minor_frequency (there were already public methods to set/get this) [#16685]
The deprecated nsamples parameter of ZScaleInterval is removed. [#17186]
Errors may now occur if a BaseLowLevelWCS class defines world_axis_object_components which returns values that are not scalars or plain Numpy arrays as per APE 14. [#16287]
WCS.pixel_to_world_values, WCS.world_to_pixel_values, WCS.pixel_to_world and WCS.world_to_pixel now correctly return NaN values for pixel positions that are outside of pixel_bounds. [#16328]
Fix the broken behavior of reading an ASCII table and filling values using column names. This PR addresses the issue and improves the functionality. [#15774]
Fix a number of bugs in CompImageHDU:
Fix the ability to pickle CompImageHDU objects
Ensure that compression settings are not lost if initializing CompImageHDU without data but with compression settings and setting the data later
Make sure that keywords are properly updated when setting the header of a CompImageHDU to an existing image header.
Fix the ability to use CompImageHDU.section on instances that have not yet been written to disk
Fix the image checksum/datasum in CompImageHDU.header to be those for the image HDU instead of for the underlying binary table. [#15474]
Fix a spurious exception when reading integer compressed images with blanks. [#17099]
Fix creating CompImageHDU from header with BSCALE/BZERO: keywords are now ignored, as done in ImageHDU. [#17237]
Making the "votable.parquet" format available as a reader format to ensure consistency with the writer formats, even though the format it recognised automatically by "votable". [#16488]
Explicitly set usedforsecurity=False when using hashlib.md5. Without this, hashlib.md5 will be blocked in FIPS mode. FIPS (Federal Information Processing Standards) is a set of standards created by NIST (National Institute of Standards and Technology) for US government agencies regarding computer security and interoperability. This affects validation results ingestion. [#17156]
Fixed the output representation of models with parameters that have units of dimensionless_unscaled. [#16829]
Fixed accuracy of sigma clipping for large float32 arrays when bottleneck is installed. Performance may be impacted for computations involving arrays with dtype other than float64. This change has no impact for environments that do not have bottleneck installed. [#17204]
Fix an issue in sigma-clipping where the use of np.copy() was causing the input data mask to be discarded in cases where grow was set. [#17402]
Fix a bug where column names would be lost when instantiating Table from a list of Row objects. [#15735]
Aggregating table groups for MaskedColumn now ensures that fully-masked groups result in masked elements rather than NaN. [#16498]
Ensure that tables holding coordinates or representations can also be stacked if they have zero length. This fix also ensures that the insert method works correctly with a zero-length table holding a coordinate object. [#17380]
Fixed table aggregate with empty columns when float is present. [#17385]
Allow SI-prefixes for radioactivity units becquerel and curie in astropy.units.si, conforming to BIPM's guidelines for SI units. [#16529]
The OGIP unit parser no longer accepts strings where a component unit is followed by a parenthesized unit without a separator in between, such as 'm(s)' or 'm(s)**2'. Such strings are not allowed by the OGIP standard. [#16749]
A few edge cases that could result in a power of a unit to be a numerical value from numpy, instead of the intended Python int, float or fractions.Fraction instance, have been fixed. [#16779]
The OGIP unit parser now detects negative powers that are not enclosed in parenthesis. For example, u.Unit("s**-1", format="ogip") now raises an error because the OGIP standard expects the string to be written as "s**(-1)" instead, but it is still possible to parse the unit with u.Unit("s**-1", format="ogip", parse_strict="warn") or parse_strict="silent". [#16788]
UnitScaleError can now be imported from the astropy.units namespace. [#16861]
Parsing custom units with u.Unit() using the "vounit" format now obeys the parse_strict parameter, unless the custom units are made explicit with quotation marks. For example, u.Unit("custom_unit", format="vounit") now raises an error, but u.Unit("custom_unit", format="vounit", parse_strict="silent") or u.Unit("'custom_unit'", format="vounit") do not. [#17232]
It is now possible to use Unit to create dimensionless units with a scale factor that is a complex number or a fractions.Fraction instance. It was already possible to create such units directly with CompositeUnit. [#17355]
Fixed the unintended behavior where the IERS-A file bundled in astropy-iers-data would be ignored if automatic updating of the IERS-A file were disabled or if downloading the new file failed. [#16187]
Ensure MaskedQuantity can be initialized with a list of masked quantities (as long as their shapes match), just like regular Quantity and ndarray. [#16503]
For Masked instances, np.put, np.putmask, np.place and np.copyto can now handle putting/copying not just np.ma.masked but also np.ma.nomask; for both cases, only the mask of the relevant entries will be set. [#17014]
Explicitly set usedforsecurity=False when using hashlib.md5. Without this, hashlib.md5 will be blocked in FIPS mode. FIPS (Federal Information Processing Standards) is a set of standards created by NIST (National Institute of Standards and Technology) for US government agencies regarding computer security and interoperability. This affects download caching. [#17156]
Fixed a bug where an old IERS-A table with stale predictive values could trigger the download of a new IERS-A table even if automatic downloading was disabled. [#17387]
Avoid a RuntimeWarning in WCS.world_to_array_index by converting NaN inputs to int. [#17236]
The performance of guessing the table format when reading large files with astropy.io.ascii has been improved. Now the process uses at most 10000 lines of the file to check if it matches the format. This behavior can be configured using the astropy.io.ascii.conf.guess_limit_lines configuration item, including disabling the limit entirely. [#16840]
Optimize checksum computation. [#17209]
Improved the performance of 1D models, models with scalar parameters, and models without units, when evaluating them with scalar or small arrays of inputs. For models that satisfy all of the conditions above, the improvement can be on the order of 30-40% in execution time. [#16670]
Performance of most non-linear fitters has been significantly improved by reducing the overhead in evaluating models inside the objective function. [#16673]
Improved the performance of parallel_fit_dask by avoiding unnecessary copies of the model inside the fitter. [#17033]
CompoundModel now implements numerical derivatives of parameters when using the +, -, * or / operators. This improves the speed of fitting these models because numerical derivatives of the parameters are not calculated. [#17034]
The performance of biweight_location, biweight_scale, biweight_midvariance, and median_absolute_deviation has been improved by using the bottleneck nan* functions when available. This requires the bottleneck optional dependency to be installed. [#16967]
The units.quantity_input decorator has been optimized, especially in the case that no equivalencies are provided to the decorator, and the speed-up is very noticeable when wrapping short functions. [#16742]
Parsing composite units with the OGIP formatter is now up to 25% faster. [#16761]
Parsing units with scale factors is now up to 50% faster. [#16813]
Parsing strings representing non-composite units with Unit is now up to 25% faster. [#17004]
Converting composite units to strings with the "cds", "fits", "ogip" and "vounit" formatters is now at least twice as fast. [#17043]
Removed redundant transformations when WCSAxes determines the coordinate ranges for ticks/gridlines, which speeds up typical plot generation by ~10%, and by much more if astropy.visualization.wcsaxes.conf.coordinate_range_samples is set to a large value [#16366]
Updated minimum supported Python version to 3.11. As a result, minimum requirements were updated to compatible versions. Astropy now requires - numpy>=1.23.2 - PyYAML>=6.0.0 - packaging>=22.0.0 [#16903]
The minimum supported version of Pandas is now v2.0. This is in line with https://scientific-python.org/specs/spec-0000/. [#16308]
Update minimal recommendation for matplotlib from version 3.3.4 to 3.6.0 [#16557]
The Contributor documentation has been significantly improved. It now includes a Quickstart Guide with concise instructions on setting up a development environment and making a pull request. In addition, the developer documentation was reorganized and simplified where possible to improve readability and accessibility. [#16561]
Nothing published for this version
See https://docs.astropy.org/en/v6.1.7/changelog.html
See https://docs.astropy.org/en/v6.1.7/changelog.html
Fix an issue in sigma-clipping where the use of np.copy() was causing the input data mask to be discarded in cases where grow was set. [#17402]
astropy.coordinates ^^^^^^^^^^^^^^^^^^^
Fixed instantiating Angle from a pandas Series object. [#17358]
Fixed calling np.nanvar and np.nanstd with Quantity out argument. [#17354]
See https://docs.astropy.org/en/v6.1.5/changelog.html
See https://docs.astropy.org/en/v6.1.5/changelog.html
Ensure that coordinates can be transformed to other coordinate frames also if they have size zero (i.e., hold empty data arrays). [#17013]
Longitude and Latitude can no longer be initialized with strings ending in "N" or "S", and "E" or "W", respectively, since those suggest the other type. [#17132]
np.nanvar(angle) now produces a Quantity with the correct unit, rather than raising an exception. [#17239]
Fix a crash when instantiating Angle (or Latitude, or Longitude) from a non-numpy array (for instance pyarrow arrays). [#17263]
Fix access to VLA columns after slicing .data. [#16996]
Updated xml writer for VOTable Resource elements to include groups. [#17344]
Add support for positional only and keyword only arguments when using the support_nddata decorator. [#17281]
Fixed a bug where float32 inputs to sigma_clip and SigmaClip were changed to float. [#17086]
Fix a crash when calling Column.pprint on a scalar column. [#15749]
Ensure that setting an existing column to a scalar always properly fills it (rather than breaking the table if there was only one column in it). [#17105]
The unit parsers are now better at recognizing unusual composite units:
units involving special unicode symbols, like "L☉/pc²";
units that include CDS units ending in a 0, like "eps0/s";
units including the degree symbol, "°". For example, "°C/s" is no longer incorrectly interpreted as "°C/s^2". [#17011]
Converting the ohm to a string with the OGIP unit formatter (e.g. f"{u.ohm:ogip}") previously produced the string 'V / A', but now produces 'ohm' as expected. [#17200]
The OGIP unit formatter now handles the unit day and the corresponding string "d" in full compliance with the standard. [#17216]
The "ogip" unit format now represents the unit angstrom as "angstrom" instead of "0.1 nm". [#17241]
Ensure that queries of .ut1_utc() and .pm_xy() return the correct results also when passing in an empty array of times. [#17013]
Fixed a bug where astropy's logger wouldn't perform lazy string interpolation. [#17196]
Fixed a bug that caused CoordinateHelper.get_axislabel() to return an empty string instead of the default label if no label has been explicitly provided. [#17175]
Fixed a bug that caused WCS.slice to ignore numpy_order and always interpret the slices as if numpy_order was True, in the specific case where the slices were such that dimensions in the WCS would be dropped. [#17147]
See https://docs.astropy.org/en/v6.1.4/changelog.html
See https://docs.astropy.org/en/v6.1.4/changelog.html
Keep Latitude from printing long input arrays in their entirety when failing limits check in _validate_angles, indicating their range instead. [#13997]
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". [#16999]
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. [#16091]
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. [#16964]
Ensure that initializing a QTable with explicit units` also succeeds if one of the units is u.one. [#17048]
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). [#17048]
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) [#17003]
Minimal requirement for (optional dependency) matplotlib was bumped to 3.5.0, which is the oldest version with support for Python 3.10 [#16993]
See https://docs.astropy.org/en/v6.1.3/changelog.html
See https://docs.astropy.org/en/v6.1.3/changelog.html
Fix reading zero-width columns such as 0A fields. [#16894]
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. [#16898]
Fix KeyError when parsing certain VOTables. [#16830]
Fixed the fit_deriv calculations in the Lorentz1D model. [#16794]
Pretty-printing of Tables now also works in the presence of zero-length string columns (which sometimes are present in FITS tables). [#16898]
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. [#16842]
Fix a bug where wcs_info_str's results would look different in numpy 2 VS numpy 1. [#16586]
The minimum required version of PyArrow is now v7.0.0. [#16785]
See https://docs.astropy.org/en/v6.1.2/changelog.html
See https://docs.astropy.org/en/v6.1.2/changelog.html
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. [#16735]
Fix a spurious exception when reading integer compressed images with blanks. [#16550]
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. [#16581]
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. [#16664]
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. [#16678]
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. [#16743]
Fixed an edge-case bug in overlap_slices where the function could return an empty slice for non-overlapping slices. [#16544]
Fixed a WCSAxes bug when overlaying a frame with default units that are not degrees. [#16662]
See https://docs.astropy.org/en/v6.1.1/changelog.html
See https://docs.astropy.org/en/v6.1.1/changelog.html
Let fitsdiff compare files with lower case HIERARCH keywords [#16357]
Fix writing a HDUList to file when numpy 2 is installed and at least some of the data is represented as dask arrays. [#16384]
Fix display of diff reports with numpy 2. [#16426]
Ensure that also zero-length tables preserve whether integer data are signed or unsigned. [#16505]
Fix YAML table serialization compatibility with numpy 2. [#16416]
Fix bugs in io.votable related to numpy 2's representation of scalars. [#16442]
Ensure that return types from sigma_clip cenfunc and stdfunc are np.float64 for scalar values. [#16431]
Ensure structured MaskedColumn are serialized correctly, including the mask. [#16380]
Fix problems converting Pandas Series to Table with numpy >=2.0. [#16439]
Ensure Time in ymdhms format can also be serialized to files as part of a table if it is masked. [#16380]
Ensure Masked versions of np.recarray will show the correct class name of MaskedRecarray in their repr, and that they will be serialized correctly if part of a table. [#16380]
Fix bugs with how masked structured arrays were represented with numpy 2. [#16443]
MaskedQuantity now works properly with np.block. [#16499]
Fix a bug where WCSAxes could be missing negative signs on axis labels when using matplotlib's usetex mode. [#16406]
Fix compilation with gcc 14, avoid implicit pointer conversions. [#16450]
Updated bundled WCSLIB version to 8.3. This update changes the behavior of various *set functions in order to improve stability of WCSLIB in threaded applications. For a full list of changes - see astropy/cextern/wcslib/CHANGES. [#16451]
See https://docs.astropy.org/en/v6.1.0/changelog.html
See https://docs.astropy.org/en/v6.1.0/changelog.html
BaseCoordinateFrame now has a position_angle() method, which is the same as the position_angle method of SkyCoord instances. [#15737]
By default the SkyCoord and BaseCoordinateFrame separation() methods now emit a warning if they have to perform a coordinate transformation that is not a pure rotation to inform the user that the angular separation can depend on the direction of the transformation. It is possible to modify this behaviour with the new optional keyword-only origin_mismatch argument. Specifying origin_mismatch="ignore" allows any transformation to succeed without warning, which has been the behaviour so far. origin_mismatch="error" forbids all transformations that are not pure rotations. [#16246]
Clearer error message in reading ASCII tables when there is a mismatch between converter type and column type. [#15991]
The module astropy.io.typing has been added to provide type annotations for I/O-related functionality. [#15916]
SAMP web profile CORS HTTP server implements Private Network Access proposal. [#16193]
Table now has a setdefault() method, analogous to dict.setdefault(). [#16188]
Added a new module astropy.units.typing that provides support for type annotations related to astropy.units. [#15860]
Added a new CGS unit Oersted. [#15962]
Added "surface brightness", "surface brightness wav", "photon surface brightness", and "photon surface brightness wav" to recognized physical types. [#16032]
Added magnetic helicity as a physical type. [#16101]
For gufuncs on Masked instances, add support for the axes argument. [#16121]
Masked instances now support the various numpy array set operations, such as np.unique and np.isin. [#16224]
Added support for slicing WCS objects containing cpdis or det2im distortions, which previously were ignored. [#16163]
The astropy.coordinates.transformations module has been refactored into a module. There should be no user-visible changes, but if you notice any, please open an Issue. [#15895]
Changed the default value of the copy argument in astropy.coordinates.representation.CylindricalDifferential.__init__ from False to True, which is the intended behaviour for all subclasses of astropy.coordinates.representation.BaseDifferential. [#16198]
Cosmology and its subclasses are now frozen dataclass objects. [#15484]
The argument verbose in the function z_at_value is now keyword-only. [#15855]
The io.ascii Python and C table readers were updated to use a 64-bit integer field by default when reading a column of integer numeric data. This changes the default behavior on Windows and potentially 32-bit architectures. Previously on those platforms, table columns with any long integers which overflowed the 32-bit integer would be returned as string columns. The new default behavior is consistent with numpy v2 and pandas. [#16005]
The parallel fast-reader parser for reading ASCII files has been removed. Since astropy v4.0.4 requesting this option has issued a warning that this option is broken and that the serial parser will be used. The parallel key in the fast_reader argument for reading ASCII tables is no longer available. [#16103]
show_in_notebook is deprecated and it is recommended to use dedicated tools in the Jupyter ecosystem to create interactive plots in notebooks. [#15905]
A warning is now emitted when Quantity values are inserted into empty Column objects via Table.insert_row or Table.add_row. [#16038]
show_in_browser is deprecated (pending feedback from the community). Please use https://github.com/astropy/astropy/issues/16067 if you are actively using the function. [#16068]
TableColumns.setdefault() and TableColumns.update() methods (which would typically be called as Table.columns.setdefault() and Table.columns.update()) have been deprecated because they can easily corrupt the Table instance the TableColumns instance is attached to. The Table.setdefault() and Table.update() methods are safe. [#16154]
TIME_FORMATS and TIME_DELTA_FORMATS in astropy.time.formats are changed from OrderedDict to Python dict. [#15491]
A FutureWarning is now emitted when mutating Time.location post-initialization. [#16063]
Following the removal of np.ndarray.ptp in Numpy v2, Time.ptp is now deprecated in favor of np.ptp. [#16212]
If any iterable such as a list of tuple was input to Quantity, a check was done to see if they contained only quantities, and, if so, the quantities were concatenated. This makes sense for list and tuple, but is not necessarily logical for all iterables and indeed was broken for those that do not have a length (such as array_api array instances). Hence, the check will now be done only for values where it makes sense, i.e., instances of list and tuple. [#15752]
Units now exposes get_converter which returns a function that will convert a scalar or array from one unit to another. This can be useful to speed up code that converts many quantities with the same unit to another one, especially if the quantity has not many elements, so that the overhead of creating a conversion function is relatively large. [#16139]
Deprecate importing ErfaError and ErfaWarning from astropy.utils.exceptions. They should be imported directly from erfa instead. [#15777]
introspection.isinstancemethod() and introspection.find_mod_objs() are deprecated. [#15934]
astropy.utils.console.terminal_size is now deprecated in favour of shutil.get_terminal_size from the standard library. [#16045]
indent() is deprecated. Use textwrap.indent() from Python standard library instead. [#16223]
Unmasked Masked scalar instances are now considered hashable, to match the implicit behaviour of regular arrays, where if an operation leads to a scalar, a hashable array scalar is returned. [#16224]
Renamed the min_cut and max_cut keywords in simple_norm and fits2bitmap to vmin and vmax. The old names are deprecated. [#15621]
If vmin == vmax, the ImageNormalize class now maps the input data to 0. If vmin > vmax, the ImageNormalize class now raises a ValueError. [#15622]
Avoid a segfault when calling astropy.convolution.convolve on an empty array. An exception is now raised instead. [#15840]
Previously passing a SkyCoord instance to the BaseCoordinateFrame separation() or separation_3d() methods could produce wrong results, depending on what additional frame attributes were defined on the SkyCoord, but now SkyCoord input can be used safely. [#15659]
Distance now accepts as parallax any angle-like value. This includes types like Column which have a unit but are not Quantity subclasses. [#15712]
The new default for the class method SkyCoord.from_name() is to look for coordinates first in SIMBAD, then in NED, and then in VizieR, instead of having no specific order. [#16046]
Fix Angle.to_string() for angles in degrees represented in 'hms' and angles in hours represented in 'dms'. [#16085]
Fix a bug where SkyCoord.spherical_offsets_by would crash when a wrap was needed. [#16241]
search_around_3d() now always raises a UnitConversionError if the units of the distances in coord1 and coord2 and the unit of distlimit do not agree. Previously the error was not raised if at least one of the coordinates was empty. [#16280]
Fixed a bug where the attribute ParametersAttribute.attr_name could be None instead of a string. [#15882]
Reading of CDS header files with multi-line descriptions where the continued line started with a number was broken. This is now fixed. [#15617]
Ensure that the names of mixin columns are properly propagated as labels for the MRT format. [#15848]
Fixed reading IPAC tables for long column type on some platforms, e.g., Windows. [#16005]
Avoid WinError 1455 in opening some large files with memory mapping on windows. [#15388]
Fix TDISP parsing for floating numbers. [#16007]
Fix a crash when calling FITS writeto methods with stdout as the output stream. [#16008]
Fix TDISP parsing for floating numbers in formats ES / EN. [#16015]
Fix conversion of Table to BinTableHDU with character_as_bytes=True. [#16358]
Improved error message when instantiating a fits table with an ill-formed array. [#16363]
Reading an empty table stored in parquet format now creates an empty table instead of raising an unexpected error. [#16237]
When reading a VOTable, if some user-requested columns were not present then the resulting error message previously listed all the requested column names. Now only columns that are actually missing are shown. [#15956]
Fix a spurious warning when calling sigma_clipped_stats on a MaskedColumn. [#15844]
Fix a Table bug when setting items (via slice or index list) in a bytes type MaskedColumn would cause the column mask to be set to all False. A common way to trigger this bug was reading a FITS file with masked string data and then sorting the table. [#15669]
Fix slicing logic for Row. Previously, slicing a astropy.table.row.Row object would incorrectly return a column, now it correctly returns a list of values from that row. [#15733]
Fix a ValueError raised by table.join when fed with large tables. This would typically happen in situations when the result joined table would be too large to fit in memory. In those situations, the error message is now much more clearly about the necessary memory size. [#15734]
Fix an unintended exception being raised when attempting to compare two unequal Table instances. [#15845]
Ensure that if a Column is initialized with a Quantity it will use by default a possible name defined on the quantity's .info. [#15848]
Fix a bug where columns with dtype=object wouldn't be properly deep-copied using copy.deepcopy. [#15871]
Fix hasattr(Table, "iloc") raising an exception, preventing use of tables e.g. with scikit-learn. [#15913]
Calling Table.group_by on an empty table no longer raises an exception. [#16093]
The unit conversion convert_unit_to with MaskedColumn was broken as it was storing the old unit in a dictionary attached to underlying np.ma.MaskedArray. This fixes it by overwriting the old unit after unit conversion. [#16118]
astropy.table.vstack will no longer modify the input list even when it contains non-Table objects like astropy.table.Row. [#16130]
Update old dataTables.js version. This should not affect the end user. [#16315]
Fix comparing NaN Quantity with TimeDelta object. [#15830]
Scalar Time instances are now hashable if they are not masked, also if one uses Masked internally, matching the behaviour prior to astropy 6.0 (and the current behaviour when masking using np.ma.MaskedArray). [#16224]
Fix rare signature incompatibilities between helper and helped array functions. Most involve cases where the corresponding numpy function has had its arguments renamed between numpy versions. Since all those generally changed the first arguments, which are typically passed as positional arguments, this should not affect user code. Affected functions: - numpy.array_str - numpy.choose - numpy.convolve - numpy.correlate - numpy.histogram - numpy.histogramdd - numpy.histogram2d - numpy.isin - numpy.inner - numpy.nanmedian - numpy.unique - numpy.matrix_rank - numpy.unwrap - numpy.vdot - numpy.lib.recfunctions.unstructured_to_structured [#15710]
Fix an issue with unicode string representations of units shown as superscripts (like degree) when raised to some power. Like for LaTeX representations, now the superscript unicode character is replaced by the literal short name before adding the power. [#15755]
Fix a missing Sun unit in the list of VOUnits simple_units. [#15832]
Fix an unhelpful TypeError when attempting truediv, lshift (<<) or mul (*) or truediv (/) with a Unit for right operand and a numpy array with non-numerical dtype for left operand. [#15883]
Fix write/read roundtrips with empty Table dumped to ECSV. [#15885]
Fix a bug where LaTeX formatter would return empty strings for unity (1) input. [#15923]
Fix extraneous space in LaTeX repr for Quantity objects with superscript units (e.g. angles or temperatures in degree Celsius). [#16043]
Ensure powers of units are consistently as simple as possible. So, an integer if possible, otherwise a float, or a fraction if the float is really close to that. This also ensures the hash of a unit is unique for any given unit (previously, the same power could be represented as float, int or fraction, which made the hash different). [#16058]
Ensure that find_equivalent_units only returns actual units, not units that raised to some power match the requested one. With this fix, (u.m**-3).find_equivalent_units() properly finds nothing, rather than all units of length. [#16127]
Using a dimensionless Quantity as an exponent works anew. In astropy 6.0.1 an exception was erroneously raised. [#16261]
Fix rare signature incompatibilities between helper and helped array functions. These typically cover corner cases and should not affect user code. Some arguments weren't being re-exposed correctly or at all, depending on numpy's version. Affected functions: - numpy.broadcast_arrays - numpy.median - numpy.quantile - numpy.empty_like - numpy.ones_like - numpy.zeros_like - numpy.full_like [#16025]
Fix a bug where astropy.utils.console.Spinner would leak newlines for messages longer than terminal width. [#16040]
Update report_diff_values so the diff no longer depends on the console terminal size. [#16065]
Fix support in Masked for generalized ufuncs with more than a single core dimension (such as erfa.rxp). [#16120]
Masked array instances now deal more properly with structured dtypes, combining field masks to get element masks for generalized ufuncs, and allowing .view() any time the mask can be viewed as well. This allows a larger number of erfa routines to work with masked data. [#16125]
WCSAxes will correctly set certain defaults when wcs.world_axis_physical_types contains custom: prefixes. [#15626]
Fix an edge case where quantity_support would produce duplicate tick labels for small data ranges. [#15841]
Fix a bug where AngleFormatterLocator and ScalarFormatterLocator wouldn't respect matplotlib.rc's axes.unicode_minus parameter. [#15902]
Fixed a bug in CoordinateHelper.grid method to properly handle draw_grid=False and draw_grid=None, ensuring grid lines are controlled correctly even when not explicitly called. [#15985]
Updated bundled WCSLIB version to 8.2.2. This update fixes character buffer overflows in the comment string for the longitude and latitude axes triggered by some projections in wcshdo(), and also the formatting for generic coordinate systems. For a full list of changes - see http://www.atnf.csiro.au/people/mcalabre/WCS/CHANGES or astropy/cextern/wcslib/CHANGES [#15795]
Fixed a bug in fit_wcs_from_points that does not set the default value of the cdelt of the returned WCS object. [#16027]
Fixed a bug in DistortionLookupTable (which implements cpdis and det2im projection corrections to a WCS) in which image pixels received an incorrect distortion value, from a location in the lookup table incorrectly offset by about 1 table pixel. [#16163]
Update minimum supported Python version to 3.10 [#15603]
The minimum required NumPy version is now 1.23 and the minimum required SciPy version is 1.8. [#15706]
Fix loading parser tabs on pyc-only installations.
Fix a bug in the wrappers for the lex and yacc wrappers that are used for parsing Astropy units so that they work on pyc-only installations.
According to the Python module loading flow chart, when evaluating import foo and foo.py is not found, Python then reads foo.pyc.
One can take advantage of this fact to strip source files and leave only Python bytecode files for deployment inspace-constrained execution environments such as AWS Lambda. Astropy is now compatible with pyc-only deployments. [#16159]
Change the default value of copy arguments in public APIs from False to None if Numpy 2.0 or newer is installed. For details, see the "Copy semantics" section on the What's New page for Astropy 6.1 . [#16181]
astropy is now compiled against NumPy 2.0, enabling runtime compatibility with this new major release. Compatibility with NumPy 1.23 and newer versions of NumPy 1.x is preserved through this change. [#16252]
BaseCoordinateFrame now has a position_angle() method, which is the same as the position_angle method of SkyCoord instances. [ #15737 ]
By default the SkyCoord and BaseCoordinateFrame separation() methods now emit a warning if they have to perform a coordinate transformation that is not a pure rotation to inform the user that the angular separation can depend on the direction of the transformation. It is possible to modify this behaviour with the new optional keyword-only origin_mismatch argument. Specifying origin_mismatch="ignore" allows any transformation to succeed without warning, which has been the behaviour so far. origin_mismatch="error" forbids all transformations that are not pure rotations. [ #16246 ]
Clearer error message in reading ASCII tables when there is a mismatch between converter type and column type. [ #15991 ]
The module astropy.io.typing has been added to provide type annotations for I/O-related functionality. [ #15916 ]
SAMP web profile CORS HTTP server implements Private Network Access proposal . [ #16193 ]
Table now has a setdefault() method, analogous to dict.setdefault() . [ #16188 ]
Added a new module astropy.units.typing that provides support for type annotations related to astropy.units . [ #15860 ]
Added a new CGS unit Oersted. [ #15962 ]
Added “surface brightness”, “surface brightness wav”, “photon surface brightness”, and “photon surface brightness wav” to recognized physical types. [ #16032 ]
Added magnetic helicity as a physical type. [ #16101 ]
For gufuncs on Masked instances, add support for the axes argument. [ #16121 ]
Masked instances now support the various numpy array set operations, such as np.unique and np.isin . [ #16224 ]
Added support for slicing WCS objects containing cpdis or det2im distortions, which previously were ignored. [ #16163 ]
The astropy.coordinates.transformations module has been refactored into a module. There should be no user-visible changes, but if you notice any, please open an Issue. [ #15895 ]
Changed the default value of the copy argument in astropy.coordinates.representation.CylindricalDifferential.init from False to True , which is the intended behaviour for all subclasses of astropy.coordinates.representation.BaseDifferential . [ #16198 ]
Cosmology and its subclasses are now frozen dataclass objects. [ #15484 ]
The argument verbose in the function z_at_value is now keyword-only. [ #15855 ]
The io.ascii Python and C table readers were updated to use a 64-bit integer field by default when reading a column of integer numeric data. This changes the default behavior on Windows and potentially 32-bit architectures. Previously on those platforms, table columns with any long integers which overflowed the 32-bit integer would be returned as string columns. The new default behavior is consistent with numpy v2 and pandas . [ #16005 ]
The parallel fast-reader parser for reading ASCII files has been removed. Since astropy v4.0.4 requesting this option has issued a warning that this option is broken and that the serial parser will be used. The parallel key in the fast_reader argument for reading ASCII tables is no longer available. [ #16103 ]
show_in_notebook is deprecated and it is recommended to use dedicated tools in the Jupyter ecosystem to create interactive plots in notebooks. [ #15905 ]
A warning is now emitted when Quantity values are inserted into empty Column objects via Table.insert_row or Table.add_row . [ #16038 ]
show_in_browser is deprecated (pending feedback from the community). Please use astropy/astropy#16067 if you are actively using the function. [ #16068 ]
TableColumns.setdefault() and TableColumns.update() methods (which would typically be called as Table.columns.setdefault() and Table.columns.update() ) have been deprecated because they can easily corrupt the Table instance the TableColumns instance is attached to. The Table.setdefault() and Table.update() methods are safe. [ #16154 ]
TIME_FORMATS and TIME_DELTA_FORMATS in astropy.time.formats are changed from OrderedDict to Python dict . [ #15491 ]
A FutureWarning is now emitted when mutating Time.location post-initialization. [ #16063 ]
Following the removal of np.ndarray.ptp in Numpy v2, Time.ptp is now deprecated in favor of np.ptp . [ #16212 ]
If any iterable such as a list of tuple was input to Quantity , a check was done to see if they contained only quantities, and, if so, the quantities were concatenated. This makes sense for list and tuple, but is not necessarily logical for all iterables and indeed was broken for those that do not have a length (such as array_api array instances). Hence, the check will now be done only for values where it makes sense, i.e., instances of list and tuple. [ #15752 ]
Units now exposes get_converter which returns a function that will convert a scalar or array from one unit to another. This can be useful to speed up code that converts many quantities with the same unit to another one, especially if the quantity has not many elements, so that the overhead of creating a conversion function is relatively large. [ #16139 ]
Deprecate importing ErfaError and ErfaWarning from astropy.utils.exceptions . They should be imported directly from erfa instead. [ #15777 ]
introspection.isinstancemethod() and introspection.find_mod_objs() are deprecated. [ #15934 ]
astropy.utils.console.terminal_size is now deprecated in favour of shutil.get_terminal_size from the standard library. [ #16045 ]
indent() is deprecated. Use textwrap.indent() from Python standard library instead. [ #16223 ]
Unmasked Masked scalar instances are now considered hashable, to match the implicit behaviour of regular arrays, where if an operation leads to a scalar, a hashable array scalar is returned. [ #16224 ]
Renamed the min_cut and max_cut keywords in simple_norm and fits2bitmap to vmin and vmax . The old names are deprecated. [ #15621 ]
If vmin == vmax , the ImageNormalize class now maps the input data to 0. If vmin > vmax , the ImageNormalize class now raises a ValueError . [ #15622 ]
Avoid a segfault when calling astropy.convolution.convolve on an empty array. An exception is now raised instead. [ #15840 ]
Previously passing a SkyCoord instance to the BaseCoordinateFrame separation() or separation_3d() methods could produce wrong results, depending on what additional frame attributes were defined on the SkyCoord , but now SkyCoord input can be used safely. [ #15659 ]
Distance now accepts as parallax any angle-like value. This includes types like Column which have a unit but are not Quantity subclasses. [ #15712 ]
The new default for the class method SkyCoord.from_name() is to look for coordinates first in SIMBAD, then in NED, and then in VizieR, instead of having no specific order. [ #16046 ]
Fix Angle.to_string() for angles in degrees represented in ‘hms’ and angles in hours represented in ‘dms’. [ #16085 ]
Fix a bug where SkyCoord.spherical_offsets_by would crash when a wrap was needed. [ #16241 ]
search_around_3d() now always raises a UnitConversionError if the units of the distances in coord1 and coord2 and the unit of distlimit do not agree. Previously the error was not raised if at least one of the coordinates was empty. [ #16280 ]
Fixed a bug where the attribute ParametersAttribute.attr_name could be None instead of a string. [ #15882 ]
Reading of CDS header files with multi-line descriptions where the continued line started with a number was broken. This is now fixed. [ #15617 ]
Ensure that the names of mixin columns are properly propagated as labels for the MRT format. [ #15848 ]
Fixed reading IPAC tables for long column type on some platforms, e.g., Windows. [ #16005 ]
Avoid WinError 1455 in opening some large files with memory mapping on windows. [ #15388 ]
Fix TDISP parsing for floating numbers. [ #16007 ]
Fix a crash when calling FITS writeto methods with stdout as the output stream. [ #16008 ]
Fix TDISP parsing for floating numbers in formats ES / EN. [ #16015 ]
Fix conversion of Table to BinTableHDU with character_as_bytes=True . [ #16358 ]
Improved error message when instantiating a fits table with an ill-formed array. [ #16363 ]
Reading an empty table stored in parquet format now creates an empty table instead of raising an unexpected error. [ #16237 ]
When reading a VOTable, if some user-requested columns were not present then the resulting error message previously listed all the requested column names. Now only columns that are actually missing are shown. [ #15956 ]
Fix a spurious warning when calling sigma_clipped_stats on a MaskedColumn . [ #15844 ]
Fix a Table bug when setting items (via slice or index list) in a bytes type MaskedColumn would cause the column mask to be set to all False . A common way to trigger this bug was reading a FITS file with masked string data and then sorting the table. [ #15669 ]
Fix slicing logic for Row. Previously, slicing a astropy.table.row.Row object would incorrectly return a column, now it correctly returns a list of values from that row. [ #15733 ]
Fix a ValueError raised by table.join when fed with large tables. This would typically happen in situations when the result joined table would be too large to fit in memory. In those situations, the error message is now much more clearly about the necessary memory size. [ #15734 ]
Fix an unintended exception being raised when attempting to compare two unequal Table instances. [ #15845 ]
Ensure that if a Column is initialized with a Quantity it will use by default a possible name defined on the quantity’s .info . [ #15848 ]
Fix a bug where columns with dtype=object wouldn’t be properly deep-copied using copy.deepcopy . [ #15871 ]
Fix hasattr(Table, "iloc") raising an exception, preventing use of tables e.g. with scikit-learn. [ #15913 ]
Calling Table.group_by on an empty table no longer raises an exception. [ #16093 ]
The unit conversion convert_unit_to with MaskedColumn was broken as it was storing the old unit in a dictionary attached to underlying np.ma.MaskedArray. This fixes it by overwriting the old unit after unit conversion. [ #16118 ]
astropy.table.vstack will no longer modify the input list even when it contains non-Table objects like astropy.table.Row . [ #16130 ]
Update old dataTables.js version. This should not affect the end user. [ #16315 ]
Fix comparing NaN Quantity with TimeDelta object. [ #15830 ]
Scalar Time instances are now hashable if they are not masked, also if one uses Masked internally, matching the behaviour prior to astropy 6.0 (and the current behaviour when masking using np.ma.MaskedArray ). [ #16224 ]
Fix rare signature incompatibilities between helper and helped array functions. Most involve cases where the corresponding numpy function has had its arguments renamed between numpy versions. Since all those generally changed the first arguments, which are typically passed as positional arguments, this should not affect user code. Affected functions:
numpy.array_str - numpy.choose - numpy.convolve - numpy.correlate - numpy.histogram - numpy.histogramdd - numpy.histogram2d - numpy.isin - numpy.inner - numpy.nanmedian - numpy.unique - numpy.matrix_rank - numpy.unwrap - numpy.vdot - numpy.lib.recfunctions.unstructured_to_structured [ #15710 ]
Fix an issue with unicode string representations of units shown as superscripts (like degree) when raised to some power. Like for LaTeX representations, now the superscript unicode character is replaced by the literal short name before adding the power. [ #15755 ]
Fix a missing Sun unit in the list of VOUnits simple_units. [ #15832 ]
Fix an unhelpful TypeError when attempting truediv, lshift ( << ) or mul ( * ) or truediv ( / ) with a Unit for right operand and a numpy array with non-numerical dtype for left operand. [ #15883 ]
Fix write/read roundtrips with empty Table dumped to ECSV. [ #15885 ]
Fix a bug where LaTeX formatter would return empty strings for unity (1) input. [ #15923 ]
Fix extraneous space in LaTeX repr for Quantity objects with superscript units (e.g. angles or temperatures in degree Celsius). [ #16043 ]
Ensure powers of units are consistently as simple as possible. So, an integer if possible, otherwise a float, or a fraction if the float is really close to that. This also ensures the hash of a unit is unique for any given unit (previously, the same power could be represented as float, int or fraction, which made the hash different). [ #16058 ]
Ensure that find_equivalent_units only returns actual units, not units that raised to some power match the requested one. With this fix, (u.m**-3).find_equivalent_units() properly finds nothing, rather than all units of length. [ #16127 ]
Using a dimensionless Quantity as an exponent works anew. In astropy 6.0.1 an exception was erroneously raised. [ #16261 ]
Fix rare signature incompatibilities between helper and helped array functions. These typically cover corner cases and should not affect user code. Some arguments weren’t being re-exposed correctly or at all, depending on numpy’s version. Affected functions:
numpy.broadcast_arrays - numpy.median - numpy.quantile - numpy.empty_like - numpy.ones_like - numpy.zeros_like - numpy.full_like [ #16025 ]
Fix a bug where astropy.utils.console.Spinner would leak newlines for messages longer than terminal width. [ #16040 ]
Update report_diff_values so the diff no longer depends on the console terminal size. [ #16065 ]
Fix support in Masked for generalized ufuncs with more than a single core dimension (such as erfa.rxp ). [ #16120 ]
Masked array instances now deal more properly with structured dtypes, combining field masks to get element masks for generalized ufuncs, and allowing .view() any time the mask can be viewed as well. This allows a larger number of erfa routines to work with masked data. [ #16125 ]
WCSAxes will correctly set certain defaults when wcs.world_axis_physical_types contains custom: prefixes. [ #15626 ]
Fix an edge case where quantity_support would produce duplicate tick labels for small data ranges. [ #15841 ]
Fix a bug where AngleFormatterLocator and ScalarFormatterLocator wouldn’t respect matplotlib.rc’s axes.unicode_minus parameter. [ #15902 ]
Fixed a bug in CoordinateHelper.grid method to properly handle draw_grid=False and draw_grid=None , ensuring grid lines are controlled correctly even when not explicitly called. [ #15985 ]
Updated bundled WCSLIB version to 8.2.2. This update fixes character buffer overflows in the comment string for the longitude and latitude axes triggered by some projections in wcshdo() , and also the formatting for generic coordinate systems. For a full list of changes - see http://www.atnf.csiro.au/people/mcalabre/WCS/CHANGES or astropy/cextern/wcslib/CHANGES [ #15795 ]
Fixed a bug in fit_wcs_from_points that does not set the default value of the cdelt of the returned WCS object. [ #16027 ]
Fixed a bug in DistortionLookupTable (which implements cpdis and det2im projection corrections to a WCS) in which image pixels received an incorrect distortion value, from a location in the lookup table incorrectly offset by about 1 table pixel. [ #16163 ]
Update minimum supported Python version to 3.10 [ #15603 ]
The minimum required NumPy version is now 1.23 and the minimum required SciPy version is 1.8. [ #15706 ]
Fix loading parser tabs on pyc-only installations.
Fix a bug in the wrappers for the lex and yacc wrappers that are used for parsing Astropy units so that they work on pyc-only installations.
According to the Python module loading flow chart , when evaluating import foo and foo.py is not found, Python then reads foo.pyc .
One can take advantage of this fact to strip source files and leave only Python bytecode files for deployment inspace-constrained execution environments such as AWS Lambda. Astropy is now compatible with pyc-only deployments. [ #16159 ]
Change the default value of copy arguments in public APIs from False to None if Numpy 2.0 or newer is installed. For details, see the “Copy semantics” section on the What’s New page for Astropy 6.1 . [ #16181 ]
astropy is now compiled against NumPy 2.0, enabling runtime compatibility with this new major release. Compatibility with NumPy 1.23 and newer versions of NumPy 1.x is preserved through this change. [ #16252 ]
Nothing published for this version
See https://docs.astropy.org/en/v6.0.1/changelog.html
See https://docs.astropy.org/en/v6.0.1/changelog.html
Previously passing a SkyCoord instance to the BaseCoordinateFrame separation() or separation_3d() methods could produce wrong results, depending on what additional frame attributes were defined on the SkyCoord, but now SkyCoord input can be used safely. [#15659]
Distance now accepts as parallax any angle-like value. This includes types like Column which have a unit but are not Quantity subclasses. [#15712]
The new default for the class method SkyCoord.from_name() is to look for coordinates first in SIMBAD, then in NED, and then in VizieR, instead of having no specific order. [#16046]
Reading of CDS header files with multi-line descriptions where the continued line started with a number was broken. This is now fixed. [#15617]
Ensure that the names of mixin columns are properly propagated as labels for the MRT format. [#15848]
Fixed reading IPAC tables for long column type on some platforms, e.g., Windows. [#15992]
Fix TDISP parsing for floating numbers. [#16007]
Fix a crash when calling FITS writeto methods with stdout as the output stream. [#16008]
Fix TDISP parsing for floating numbers in formats ES / EN. [#16015]
Fix a spurious warning when calling sigma_clipped_stats on a MaskedColumn. [#15844]
Fix a Table bug when setting items (via slice or index list) in a bytes type MaskedColumn would cause the column mask to be set to all False. A common way to trigger this bug was reading a FITS file with masked string data and then sorting the table. [#15669]
Fix slicing logic for Row. Previously, slicing a astropy.table.row.Row object would incorrectly return a column, now it correctly returns a list of values from that row. [#15733]
Fix a ValueError raised by table.join when fed with large tables. This would typically happen in situations when the result joined table would be too large to fit in memory. In those situations, the error message is now much more clearly about the necessary memory size. [#15734]
Fix an unintended exception being raised when attempting to compare two unequal Table instances. [#15845]
Ensure that if a Column is initialized with a Quantity it will use by default a possible name defined on the quantity's .info. [#15848]
The unit conversion convert_unit_to with MaskedColumn was broken as it was storing the old unit in a dictionary attached to underlying np.ma.MaskedArray. This fixes it by overwriting the old unit after unit conversion. [#16118]
astropy.table.vstack will no longer modify the input list even when it contains non-Table objects like astropy.table.Row. [#16130]
Fix an issue with unicode string representations of units shown as superscripts (like degree) when raised to some power. Like for LaTeX representations, now the superscript unicode character is replaced by the literal short name before adding the power. [#15755]
Fix a missing Sun unit in the list of VOUnits simple_units. [#15832]
Fix write/read roundtrips with empty Table dumped to ECSV. [#15885]
Fix a bug where LaTeX formatter would return empty strings for unity (1) input. [#15923]
Ensure powers of units are consistently as simple as possible. So, an integer if possible, otherwise a float, or a fraction if the float is really close to that. This also ensures the hash of a unit is unique for any given unit (previously, the same power could be represented as float, int or fraction, which made the hash different). [#16058]
Ensure that find_equivalent_units only returns actual units, not units that raised to some power match the requested one. With this fix, (u.m**-3).find_equivalent_units() properly finds nothing, rather than all units of length. [#16127]
Fix a bug where astropy.utils.console.Spinner would leak newlines for messages longer than terminal width. [#16040]
Update report_diff_values so the diff no longer depends on the console terminal size. [#16065]
Fix support in Masked for generalized ufuncs with more than a single core dimension (such as erfa.rxp). [#16120]
Fix an edge case where quantity_support would produce duplicate tick labels for small data ranges. [#15841]
Updated bundled WCSLIB version to 8.2.2. This update fixes character buffer overflows in the comment string for the longitude and latitude axes triggered by some projections in wcshdo(), and also the formatting for generic coordinate systems. For a full list of changes - see http://www.atnf.csiro.au/people/mcalabre/WCS/CHANGES or astropy/cextern/wcslib/CHANGES [#15795]
Fixed a bug in fit_wcs_from_points that does not set the default value of the cdelt of the returned WCS object. [#16027]
Given the potential breaking changes with the upcoming Numpy 2.0 release, this release pins Numpy<2.0 and support for Numpy 2.0 will be added in the v6.1.0 release.
See https://docs.astropy.org/en/v6.0.0/changelog.html
See https://docs.astropy.org/en/v6.0.0/changelog.html
The new ConfigNamespace.help() method provides a convenient way to get information about configuration items. [#13499]
Support has been added to create geodetic representations not just for existing ellipsoids from ERFA, but also with explicitly provided values, by defining a subclass of BaseGeodeticRepresentation with the equatorial radius and flattening assigned to _equatorial_radius and _flattening attributes. [#14763]
Add BaseBodycentricRepresentation, a new spheroidal representation for bodycentric latitudes and longitudes. [#14851]
Support Numpy broadcasting over frame data and attributes. [#15121]
Registered a latex writer for exporting a Cosmology object to a LaTex table. [#14701]
Added argument rename to Cosmology's I/O, allowing for input and output symbols to be renamed. [#14780]
All non-abstract Cosmology subclasses are now automatically registered to work with Astropy's YAML serialization. [#14979]
Cosmology I/O now auto-identifies the '.tex' suffix with the 'ascii.latex' format. [#15088]
The Cosmology class now has a new property to access the parameters of the cosmology: .parameters. This property return a read-only dictionary of all the non-derived parameter values on the cosmology object. When accessed from the class (not an instance) the dictionary contains Parameter instances, not the values. [#15168]
The field default has been added to Parameter. This can be used to introspect the default value of a parameter on a cosmology class e.g. LambdaCDM.H0.default. [#15400]
Add new option decompress_in_memory to fits.open, to decompress the whole file in memory at once, instead of decompressing the file progressively as data is needed. Default behavior is better for memory usage but sometimes slow, especially for files with many small HDUs. [#15501]
Add support for Parquet serialization of VOTables. Writing of this serialization is available with using the new 'votable.parquet' format. [#15281]
Added MIVOT feature through the MivotBlock class that allows model annotations reading and writing in VOTable. [#15390]
Added a GeneralSersic2D model that can have "boxy" or "disky" isophotes. [#15545]
A more flexible and/or compact string representation is now available for NDData objects which visually indicates masked entries, and provides for better for dask array support. [#14438]
The new Row.get() method, analogous to dict.get(), returns the value of the specified column from the row if the column present, otherwise it returns a fallback value, which by default is None. [#14878]
Masked Time instances now use astropy's own Masked class internally. This means that Masked input is now properly recognized, and that masks get propagated also to Quantity output (such as from a TimeDelta converted to a unit of time), creating MaskedQuantity instances. [#15231]
Added a TimeDelta format quantity_str that represents the time delta as a string with one or more Quantity components. This format provides a human-readable multi-scale string representation of a time delta. The default output sub-format is not considered stable in this release, please see https://github.com/astropy/astropy/issues/15485 for more information. [#15264]
Uncertainty Distribution now support structured data types, and as a result it now works also with EarthLocation. [#15304]
Uncertainty Distribution can now be used inside representations, which also allows basic support in SkyCoord. While most calculations work, there are remaining issues. For instance, the repr does not show that the coordinates are distributions. [#15395]
Add support for gc2gde and gd2gce erfa functions to allow geodetic representations using equatorial radius and flattening. [#14729]
The astropy.utils.metadata.MetaData default dictionary can now be set with the default_factory keyword argument. [#15265]
astropy.utils.decorators.deprecated now adds the __deprecated__ attribute to the objects it wraps, following the practice in https://peps.python.org/pep-0702/. [#15310]
Add WCSAxes.text_coord method to print text using SkyCoord objects parallel to plotting data points with WCSAxes.plot_coord. [#14661]
Support WCS descriptions of basic planetary coordinate frames. [#14820]
Updated bundled WCSLIB version to 8.1. This update adds support planetary keywords A_RADIUS, B_RADIUS, C_RADIUS, BLON_OBS, BLAT_OBS, and BDIS_OBS in auxprm and adds wcsprm::time to the wcsprm struct to record the TIME axis. This update also includes several bug fixes. For a full list of changes - see http://www.atnf.csiro.au/people/mcalabre/WCS/CHANGES [#15035]
Removed deprecated ConfigurationMissingWarning class and update_default_config function; There are no replacements as they should no be used anymore. [#15466]
Invalid kernel arithmetic operations now raise a KernelArithmeticError instead of a bare Exception. [#14728]
Added base KernelError error class and removed DiscretizationError error class (a ValueError will be raised instead). [#14732]
discretize_model will now raise a ValueError if mode='oversample' and factor does not have an integer value. [#14794]
Removed deprecated angle parsing and formatting utilities from angle_utilities. Use the functions from angle_formats instead. [#14675]
The deprecated functionality of initializing Angle or Longitude from a tuple is no longer supported. [#15205]
Angle-related classes and functions have been moved within astropy.coordinates. There is no change to public API as everything moved should still be imported from astropy.coordinates, not a sub-module. If you are using private API, try importing from astropy.coordinates instead. If you need something that has been moved and is not available in astropy.coordinates, please open an issue on the Astropy issue tracker. [#15220]
It is no longer possible to pass frame classes to the transform_to() method of a low-level coordinate-frame class. It is still possible to pass frame instances. The transform_to() method of the high-level SkyCoord class is unaffected. [#15500]
Removed support of importing private constants and functions from astropy.cosmology.flrw. [#14672]
Removed deprecated Cosmology Parameter argument fmt. [#14673]
Removed deprecated vectorize_if_needed and inf_like from cosmology.utils. [#14677]
Removed deprecated import paths from astropy.cosmology.core. [#14782]
Cosmology Parameter is now a dataclass, and can work with all of Python's dataclasses machinery, like field introspection and type conversion. [#14874]
A new property -- scale_factor0 -- has been added to Cosmology objects. This is the scale factor at redshift 0, and is defined to be 1.0. [#14931]
Added registration label ascii.latex to Cosmology IO. [#14938]
The private module astropy.cosmology.utils has been deprecated. [#14980]
Removed deprecated get_cosmology_from_string class method in default_cosmology; use get instead. [#15467]
Several arguments in functions within astropy.io.ascii have been deprecated and are either renamed or scheduled to be removed.
read(): - Reader will be removed. Instead supply the equivalent format argument. - Inputter has been renamed to inputter_cls. - Outputter has been renamed to outputter_cls.
get_reader(): - Reader has been renamed to reader_cls. - Inputter has been renamed to inputter_cls. - Outputter has been renamed to outputter_cls.
write(): - Writer will be removed. Instead supply the equivalent format argument.
get_writer(): - Writer has been renamed to writer_cls. [#14914]
Removed deprecated astropy.io.ascii.tests.common.raises test helper; use pytest.raises instead. [#15470]
Deprecate _ExtensionHDU and _NonstandardExtHDU (use ExtensionHDU or NonstandardExtHDU instead). [#15396]
Remove special handling of TCTYP TCUNI TCRPX TCRVL TCDLT TRPOS (#7157). [#15396]
Rename and deprecate TableHDU.update to TableHDU.update_header, for consistency with ImageHDU. [#15396]
Removed deprecated astropy.io.misc.asdf subpackage. Use asdf-astropy package instead. [#14668]
fnunpickle and fnpickle are deprecated because they are not used anywhere within astropy. If you must, use the module from Python standard library but be advised that pickle is insecure so you should only unpickle data that you trust. [#15418]
Removed deprecated pedantic option from the astropy.io.votable.table.parse() function and the corresponding configuration setting. Use the verify option instead. [#14669]
Class astropy.io.votable.tree.Table has been renamed to TableElement to avoid sharing the name with astropy.table.Table. [#15372]
Fully removed support for version = '1.0' on VOTableFile__init__() and changed its tests to check correctly. It was raising a DeprecationWarning and now is raising a ValueError. [#15490]
Removed the AliasDict class from modeling.utils. [#12943]
Creating a model instance with parameters that have incompatible shapes will now raise a ValueError rather than an IncompatibleShapeError. [#15209]
Removal of deprecated code _model_to_fit_params and _fitter_to_model_params from fitting.py. [#15461]
The BoxLeastSquares, BoxLeastSquaresResults and LombScargle classes are not available from astropy.stats anymore, they are now available only from astropy.timeseries. [#15530]
Removed deprecated deprecation, warning, and exception handling functionality provided by astropy.tests.helper. [#14670]
astropy.tests.command.FixRemoteDataOption and astropy.tests.command.AstropyTest are deprecated. They are no longer necessary after sunsetting astropy-helpers. [#15204]
Time has switched to use Masked arrays internally, instead of indicating masked values using NaN in the internal jd2 attribute. As a result, any output from instances, such as one gets with, say, the .isot format, will also use Masked by default.
For backwards compatibility, a new configuration item, astropy.time.conf.masked_array_type is introduced which is set to "astropy" by default (which indicates one wants to use Masked), but can also be set to "numpy", in which case numpy.ma.MaskedArray will be used where possible (essentially, for all but Quantity). [#15231]
Changed the TimeDelta init signature to be consistent with that of Time. Previously the argument order was val, val2, format, scale, copy. Now the order is val, val2, format, scale, *, precision, in_subfmt, out_subfmt, copy, where the arguments after the * must be specified by keyword. [#15264]
Removed deprecated midpoint_epoch in fold function; use epoch_time instead. [#15462]
The .dtype attribute exposed by Distribution is now that of the samples, rather than one that has a "samples" entry. This makes quantities with structured data types and units easier to support, and generally makes the Distribution appear more similar to regular arrays. It should have little effect on code. For instance, distribution["samples"] still will return the actual distribution.
As a consequence of this refactoring, most arrays that are not C-contiguous can now be viewed and will thus not be copied on input any more. The only exceptions are arrays for which the strides are negative.
Note that the true data type is considered an implementation detail. But for reference, it now is a structured data type with a single field, "samples", which itself is an array of "sample" fields, which contain the actual data. [#15304]
Like np.ndarray, under numpy 2.0 Quantity and all its subclasses (Angle, Masked, etc.) will no longer support the .ptp() method. Use np.ptp(...) instead.
Similarly, support for the much less frequently used .newbyteorder() and .itemset() methods has been removed. [#15378]
The following deprecated functionality has been removed:
littleh unit and with_H0 equivalency. They are still available from cosmology.units.
brightness_temperature equivalency no longer automatically swaps the order of its arguments if it does not match the expectation.
PhysicalType no longer supports str methods and attributes. [#15514]
Removed deprecated OrderedDescriptor, OrderedDescriptorContainer, and set_locale in astropy.utils.misc. [#14679]
is_path_hidden() and walk_skip_hidden() are deprecated. [#14759]
The structure of utils.metadata has been refactored, but all the available functions and classes are still present and should be imported as before. [#15166]
The astropy.utils.metadata.MetaData class, which is used throughout astropy to carry metadata on tables, columns, etc., can now also be used on dataclasses.
When accessing the meta attribute on a class astropy.utils.metadata.MetaData now returns None instead of itself. [#15237]
The astropy.utils.metadata.MetaData class, which is used throughout astropy to carry metadata on tables, columns, etc., can now also be used on frozen dataclasses. [#15404]
Removed deprecated version_path in minversion function; it is no longer used. [#15468]
The bboxes, ticklabels_bbox, and tick_out_size arguments to astropy.visualization.wcaxes.ticklabels.TickLabels.draw() now have no effect and are deprecated. This is to allow rasterized ticks to be drawn correctly on WCSAxes. [#14760]
It is now not possible to pass any keyword arguments to astropy.visualization.wcsaxes.WCSAxes.draw(). Previously passing any keyword arguments would have errored anyway, as matplotlib.axes.Axes.draw() does not accept keyword arguments. [#14772]
Deprecated the exp attribute in the LogStretch, InvertedLogStretch, PowerDistStretch, and InvertedPowerDistStretch stretch classes, and the power attribute in the PowerStretch. Instead, use the a attribute, which matches the input keyword. [#15538]
Removed the maximum value of the a parameter in the AsinhStretch and SinhStretch stretch classes. [#15539]
Removed deprecated accuracy from all_world2pix method in WCS; use tolerance instead. [#15464]
NoConvergence no longer accepts arbitrary keyword arguments. [#15504]
Fixed minor bug when getting solar system positions of objects from Type 3 SPICE kernel files. [#15612]
The exponent in w0wzCDM.de_density_scale has been corrected to 3, from -3. This correction has also been made to the scalar inv_efunc cpython functions. [#14991]
pandas.Series are now uniformly converted to their underlying data type when given as an argument to a Cosmology method. [#15600]
Reading a table from FITS now respects the TNULL property of a column, passing it into the column's fill_value. [#14723]
Fix crash when a PrimaryHDU has a GROUPS keyword with a non-boolean value (i.e. not a random-groups HDU). [#14998]
Fixed a bug that caused Cutout2D to not work correctly with CompImageHDU.section [#14999]
Fixed a bug that caused compressed images with TFORM missing the optional '1' prefix to not be readable. [#15001]
Ensure that tables written to FITS with both masked and unmasked columns roundtrip properly (previously, all integer columns would become masked if any column was masked). [#15473]
Fix segfault with error report in tile decompression. [#15489]
Output of repr for VOTable instance now clearly shows it is a VOTable and not generic astropy Table. [#14702]
All models can be pickled now. [#14902]
Restore bitmask propagation behavior in NDData.mask, plus a fix for arithmetic between masked and unmasked NDData objects. [#14995]
Table.as_array now respects the fill_value property of masked columns. [#14723]
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. [#14907]
Fixed issue #14964 that when grouping a Table on a mixin column such as Quantity or Time, the grouped table keys did not reflect the original column values. For Quantity this meant that the key values were pure float values without the unit, while for Time the key values were the pair of jd1 and jd2 float values. [#14966]
Ensure that the Time caches of formats and scales do not get out of sync with the actual data, even if another instance, holding a view of the data is written to. E.g., if one does t01 = t[:2], and sets t[0] after, it is now guaranteed that t01.value will correctly reflect that change in value. [#15453]
In VOunits, "pix", "au", "a", and "ct" are removed from the list of deprecated units. [#14885]
Ufuncs with more than 2 operands (such as erfa.dtf2d) now work also if all inputs are scalars and more than two inputs have masks. [#15450]
Ensured that str(masked_array) looks like str(unmasked_array) also for array scalars. Thus, like regular array scalars, the precision is ignored for float, and strings do not include extra quoting. [#15451]
The location of ticklabels on a WCSAxes is now correctly calculated when the figure is rasterized. [#14760]
Fixed a bug where a ValueError would be raised in the AsinhStretch and SinhStretch classes for valid a parameter values. [#15539]
wcs.validate(filename) now properly closes the file handler. [#15054]
Fix a regression in custom WCS mapping due to the recent introduction of Solar System frames. [#15630]
The minimum supported version of NumPy is now 1.22. [#15006]
Moved International Earth Rotation and Reference Systems (IERS) and Leap Second files out into standalone astropy-iers-data package, maintaining full backward-compatibility in the astropy.utils.iers API. Deprecation warnings may be issued when certain files are accessed directly. [#14819]
Switch from using setup.cfg for project configuration to using pyproject.toml. [#15247]
Update bundled expat to 2.5.0. [#15585]
Nothing published for this version
Nothing published for this version
See https://docs.astropy.org/en/v5.3.4/changelog.html
See https://docs.astropy.org/en/v5.3.4/changelog.html
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. [#15373]
Fixed a bug in convert_to_writable_filelike where GzipFile was not closed properly. [#15359]
In VOUnit, the spaces around the slash were removed in the formatting of fractions, and fractional powers now also use the "**" operator. [#15282]
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"). [#15368]
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). [#15380]
Compatibility with Python 3.12. [#14784]
Replaced the URL of IETF_LEAP_SECOND_URL because the original is now defunct and IETF now defers to IANA for such look-up. [#15421]
See https://docs.astropy.org/en/v5.3.3/changelog.html
See https://docs.astropy.org/en/v5.3.3/changelog.html
TransformGraph.to_dot_graph() now throws an exception for invalid savelayout.
The exponent of w0wzCDM functions in inv_efunc has been corrected to 3, from -3. [#15224]
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. [#15215]
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. [#15228]
v5.3.x will not support NumPy 2.0 or later. [#15234]
See https://docs.astropy.org/en/v5.3.2/changelog.html
See https://docs.astropy.org/en/v5.3.2/changelog.html
Fixed import when called with Python -OO flag. [#15037]
Fix for collapse operations on NDData without masks or units. [#15082]
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. [#15101]
See CHANGES.rst for the full changelog
See CHANGES.rst for the full changelog
The exponent in wowzCDM.de_density_scale has been corrected to 3, from -3. [#14991]
Fix crash when a PrimaryHDU has a GROUPS keyword with a non-boolean value (i.e. not a random-groups HDU). [#14998]
Fixed a bug that caused Cutout2D to not work correctly with CompImageHDU.section [#14999]
Fixed a bug that caused compressed images with TFORM missing the optional '1' prefix to not be readable. [#15001]
All models can be pickled now. [#14902]
Restore bitmask propagation behavior in NDData.mask, plus a fix for arithmetic between masked and unmasked NDData objects. [#14995]
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. [#14907]
In VOunits, "pix", "au", "a", and "ct" are removed from the list of deprecated units. [#14885]
See CHANGES.rst for the full changelog
See CHANGES.rst for the full changelog
Add optional parameter refresh_cache to EarthLocation.of_site() and EarthLocation.get_site_names() to force the download of the latest site registry. [#13993]
Added atol argument to function is_O3 and is_rotation in matrix utilities. [#14371]
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. [#14482]
Add an optional parameter location to EarthLocation.get_itrs() to allow the generation of topocentric ITRS coordinates with respect to a specific location. [#14628]
Two new cosmologies have been added, FlatwpwaCDM and Flatw0wzCDM, which are the flat variants of wpwaCDM and w0wzCDM, respectively. [#12353]
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. [#14182]
Added support for >3D data in CompImageHDU [#14252]
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. [#14353]
Added support for 'NOCOMPRESS' for the compression_type option in CompImageHDU. [#14408]
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. [#14428]
Do not call gc.collect() when closing a CompImageHDU object as it has a large performance penalty. [#14576]
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. [#14578]
Add support for writing/reading fixed-size and variable-length array columns to the parquet formatter. [#14237]
Added a method get_infos_by_name to make it easier to implement DALI-compliant protocols [#14212]
Updating the built-in UCD list to upstream 1.5 (which requires a minor update to the parser) [#14554]
Enable check for poorly conditioned fits in LinearLSQFitter for polynomial models with fixed inputs. [#14037]
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. [#14175]
vonmisesmle has now functioning "weights" and "axis" parameters that work equivalently to the rest of the functions in the circstats module (circmean, rayleightest, etc.) [#14533]
Table and QTable can now use the | and |= operators for dictionary-style merge and update. [#14187]
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. [#14606]
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. [#14016]
Add unit_parse_strict parameter to the Kepler reader to control the warnings emitted when reading files. [#14294]
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". [#14042]
Enabled the equal_nan keyword argument for np.array_equal() when the arguments are astropy.units.Quantity instances. [#14135]
Allow "console" and "unicode" formats for conversion to string of function units. [#14407]
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'). [#14449]
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). [#14341]
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. [#14382]
get_moon() is deprecated and may be removed in a future version of astropy. Calling get_moon(...) should be replaced with get_body("moon", ...). [#14354]
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. [#14410]
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. [#14428]
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. [#14013]
Deprecated astropy.modeling.utils.comb() function in favor of comb() from math standard library. [#14038]
Propagate measurement uncertainties via the weights keyword argument into the parameter covariances. [#14519]
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. [#14124]
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. [#14253]
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. [#14267]
The unused units.format.Unscaled format class has been deprecated. [#14417]
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. [#14439]
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)). [#14590]
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. [#13989]
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. [#14050]
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). [#14379]
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. [#14365]
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. [#14252]
Card now uses the default Python representation for floating point values. [#14508]
ImageHDU now properly rejects Numpy scalars, avoiding data corruption. [#14528]
Fix issues with double quotes in CONTINUE cards. [#14598]
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'. [#14810]
Columns with big-endian byte ordering (such as those read in from a FITS table) can now be serialized with Parquet. [#14373]
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. [#14512]
Fix issue with filter_non_finite option when fitting with weights via passing the weights through the non-finite-filter alongside the input data. [#14695]
Fixed an issue with Parameter where a getter could be input without a setter (or vice versa). [#14708]
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. [#14566]
Ensure that Distribution can be compared with == and != with regular arrays or scalars, and that inplace operations like dist[dist<0] *= -1 work. [#14421]
Modified astropy.units.Quantity.__array_ufunc__() to return NotImplemented instead of raising a ValueError if the inputs are incompatible. [#13977]
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. [#14163]
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. [#14413]
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. [#14419]
Ensure the unit is kept in np.median even if the result is a scalar nan (the unit was lost for numpy < 1.22). [#14635]
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. [#14680]
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. [#13730]
Ensure masks are propagated correctly for outer methods of ufuncs also if one of the inputs is not actually masked. [#14624]
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. [#13989]
CoordinateHelper.set_ticks() now accepts number=0. Previously it errored. [#14160]
WCSAxes.plot_coord and plot_scatter now work correctly for APE 14 compliant WCSes where the units are not always converted to degrees. [#14251]
Fixed a bug where coordinate overlays did not automatically determine the longitude wrap angle or the appropriate units. [#14326]
Fix bugs with high-level WCS API on wcs.WCS object when using -TAB coordinates. [#13571]
Fixed a bug in how WCS handles PVi_ja header coefficients when CTYPE has -SIP suffix and in how code detects TPV distortions. [#14295]
The minimum supported version of Python is now 3.9, changing from 3.8. [#14286]
The minimum supported version of Numpy is now 1.21. [#14349]
The minimum supported version of matplotlib is now 3.3. [#14286, #14321]
astropy no longer publishes wheels for i686 architecture. [#14517]
Added a pre-commit configuration for codespell. [#13985]
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). [#14252]
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. [#14311]
Updated CDS URL for Sesame look-up as the old URL is deprecated. [#14681]
Nothing published for this version
See CHANGES.rst for the full changelog.
See CHANGES.rst for the full changelog.
CDS and MRT tables with units that contain with multiple divisions, such as km/s/Mpc now parse correctly as being equal to km/(s.Mpc). [#14369]
Fix FITSDiff when table contains a VLA column with the Q type. [#14539]
Fix a bug when creating a QTable when a Quantity input column is present and the units argument modifies the unit of that column. This now works as expected where previously this caused an exception. [#14357]
CDS units with multiple divisions, such as km/s/Mpc now parse correctly as being equal to km/(s.Mpc). [#14369]
Fixed a bug that caused subclasses of BaseHighLevelWCS and HighLevelWCSMixin to not work correctly under certain conditions if they did not have world_n_dim and pixel_n_dim defined on them. [#14495]
See CHANGES.rst for the full changelog.
See CHANGES.rst for the full changelog.
Fix to ITRS frame earth_location attribute to give the correct result for a topocentric frame. [#14180]
Bounds are no longer passed to the scipy minimizer for methods Brent and Golden. The scipy minimizer never used the bounds but silently accepted them. In scipy v1.11.0.dev0+ an error is raised, so we now pass None as the bounds to the minimizer. Users should not be affected by this change. [#14232]
Tables with multidimensional variable length array can now be properly read and written. [#13417]
Modified the behavior of numpy.histogram(), numpy.histogram_bin_edges(), numpy.histogram2d(), and numpy.histogramdd() so that the range argument must a compatible instance of astropy.units.Quantity if the other arguments are instances of astropy.units.Quantity. [#14213]
Improved the performance of drawing WCSAxes grids by skipping some unnecessary computations. [#14164]
Fixed WCSAxes sometimes triggering a NumPy RuntimeWarning when determining the coordinate range of the axes. [#14211]
Fix compatibility with Numpy 1.24. [#14193]
See CHANGES.rst for the full changelog
See CHANGES.rst for the full changelog
Adds new topocentric ITRS frame and direct transforms to and from the observed frames AltAz and HADec with the ability to add or remove refraction corrections as required. Since these frames are all within the ITRS, there are no corrections applied other than refraction in the transforms. This makes the topocentric ITRS frame and these transforms convenient for observers of near Earth objects where stellar aberration should be omitted. [#13398]
Allow comparing SkyCoord to frames with data. [#13477]
Cosmology instance can be parsed from or converted to a HTML table using the new HTML methods in Cosmology's to/from_format I/O. [#13075]
A new comparison function has been added -- cosmology_equal() -- that mirrors its numpy counterpart but allows for the arguments to be converted to a Cosmology and to compare flat cosmologies with their non-flat equivalents. [#13104]
Cosmology equivalence for flat FLRW cosmologies has been generalized to apply to all cosmologies using the FlatCosmology mixin. [#13261]
The cosmological redshift unit now has a physical type of "redshift". [#13561]
Add ability to read and write a fixed width ASCII table that includes additional header rows specifying any or all of the column dtype, unit, format, and description. This is available in the fixed_width and fixed_width_two_line formats via the new header_rows keyword argument. [#13734]
Added support to the io.fits API for reading and writing file paths of the form ~/file.fits or ~<username>/file.fits, referring to the home directory of the current user or the specified user, respectively. [#13131]
Added support for opening remote and cloud-hosted FITS files using the fsspec package, which has been added as an optional dependency. [#13238]
Added support in io.votable for reading and writing file paths of the form ~/file.xml or ~<username>/file.xml, referring to the home directory of the current user or the specified user, respectively. [#13149]
Add option to non-linear fitters which enables automatic exclusion of non-finite values from the fit data. [#13259]
Modified Cutout2D to allow objects of type astropy.io.fits.Section to be passed to the data parameter. [#13238]
Add a PSF image representation to astropy.nddata.NDData and astropy.nddata.CCDData. [#13743]
An Astropy table can now be converted to a scalar NumPy object array. For NumPy >= 1.20, a list of Astropy tables can be converted to an NumPy object array of tables. [#13469]
Added the astropy.time.Time.mean() method which also enables the numpy.mean() function to be used on instances of astropy.time.Time. [#13508]
Improve the performance of getting the string representation of a large Time or TimeDelta object. This is done via a new to_string() method that does the time string format conversion only for the outputted values. Previously the entire array was formatted in advance. [#13555]
It is now possible to use unit format names as string format specifiers for a Quantity, e.g. f'{1e12*u.m/u.s:latex_inline}' now produces the string '$1 \\times 10^{12} \\; \\mathrm{m\\,s^{-1}}$'. [#13050]
Ensure that the argmin and argmax methods of Quantity support the keepdims argument when numpy does (numpy version 1.22 and later). [#13329]
numpy.lib.recfunctions.merge_arrays() is registered with numpy overload for Quantity. [#13669]
Added SI prefixes for quecto ("q", 10^{-30}), ronto ("r", 10^{-27}), ronna ("R", 10^{27}), and quetta ("Q", 10^{30}). [#14046]
Added the use_fsspec, fsspec_kwargs, and close_files arguments to utils.data.get_readable_fileobj. [#13238]
Ensure that the argmin and argmax methods of Masked instances support the keepdims argument when numpy does (numpy version 1.22 and later). [#13329]
Add helper functions for WCSAxes instances to draw the instrument beam and a physical scale. [#12102]
Add a scatter_coord method to the wcsaxes functionality based on the existing plot_coord method but that calls matplotlib.pyplot.scatter. [#13562]
Added a sinh stretch option to simple_norm. [#13746]
It is now possible to define "tickable" gridlines for the purpose of placing ticks or tick labels in the interior of WCSAxes plots. [#13829]
Removed deprecated MexicanHat1DKernel and MexicanHat2DKernel classes. Please use RickerWavelet1DKernel and RickerWavelet2DKernel instead. [#13300]
Multiplying a LogQuantity like Magnitude with dimensionless physical units by an array will no longer downcast to Quantity. [#12579]
Quantity normally upcasts integer dtypes to floats, unless the dtype is specifically provided. Before this happened when dtype=None; now the default has been changed to dtype=numpy.inexact and dtype=None has the same meaning as in numpy. [#12941]
In "in-place unit changes" of the form quantity <<= new_unit, the result will now share memory with the original only if the conversion could be done through a simple multiplication with a scale factor. Hence, memory will not be shared if the quantity has integer `dtype` or is structured, or when the conversion is through an equivalency. [#13638]
When Quantity is constructed from a structured array and unit is None, the default unit is now structured like the input data. [#13676]
astropy.utils.misc.suppress has been removed, use contextlib.suppress instead. astropy.utils.namedtuple_asdict has been removed, instead use method ._asdict on a namedtuple. override__dir__ has been deprecated and will be removed in a future version, see the docstring for the better alternative. [#13636]
astropy.utils.misc.possible_filename has been removed. [#13661]
Rename number-of-samples keyword nsamples in ZScaleInterval to align with the n_samples keyword used in all other Interval classes in this module. [#13810]
Fixed convolution Kernels to ensure the that returned kernels are normalized to sum to one (e.g., Gaussian1DKernel, Gaussian2DKernel). Also fixed the Kernel truncation calculation. [#13299]
Fix import error with setuptools v65.6.0 by replacing numpy.ctypeslib.load_library with Cython to load the C convolution extension. [#14035]
BaseCoordinateFrame.get_frame_attr_names() had a misleading name, because it actually provided a dict of attribute names and their default values. It is now deprecated and replaced by BaseCoordinateFrame.get_frame_attr_defaults(). The fastest way to obtain the attribute names is BaseFrame.frame_attributes.keys(). [#13484]
Fixed bug that caused earth_orientation.nutation_matrix() to error instead of returning output. [#13572]
Ensure that angle.to_string() continues to work after pickling, and that units passed on to to_string() or the Angle initializer can be composite units (like u.hour**1), which might result from preceding calculations. [#13933]
report_diff_values() have now two new parameters rtol and atol to make the report consistent with numpy.allclose results. This fixes FITSDiff with multi-dimensional columns. [#13465]
Fixed two bugs in validator.validator.make_validation_report: - ProgressBar iterator was not called correctly. - make_validation_report now handles input string urls correctly. [#14102]
Fixed a performance regression in timeseries.aggregate_downsample introduced in Astropy 5.0 / #11266. [#13069]
Unit changes of the form quantity <<= new_unit will now work also if the quantity is integer. The result will always be float. This means that the result will not share memory with the original. [#13638]
Ensure dimensionless quantities can be added inplace to regular ndarray. [#13913]
Fixed an incompatibility with latest Python 3.1x versions that kept astropy.utils.data.download_file from switching to TLS+FTP mode. [#14092]
arrays and quantities also with keepdims=True. [#14113]
Significantly improve performance of ManualInterval when both limits are specified manually. [#13898]
The deprecated private astropy._erfa module has been removed. Use pyerfa, which is a dependency of astropy and can be imported directly using import erfa. [#13317]
The minimum version required for numpy is now 1.20 and that for scipy 1.5. [#13885]
Updated the bundled CFITSIO library to 4.2.0. [#14020]
Nothing published for this version
Nothing published for this version
See CHANGES.rst for the full changelog
See CHANGES.rst for the full changelog
The pixel argument to astropy.visualization.wcsaxes.ticklabels.TickLabels.add no longer does anything, is deprecated, and will be removed in a future astropy version. It has been replaced by a new required data argument, which should be used to specify the data coordinates of the tick label being added.
This changes has been made because it is (in general) not possible to correctly calculate pixel coordinates before Matplotlib is drawing a figure. [#12630]
Fixed a bug that prevented SkyOffsetFrame instances to be pickled by adding a custom __reduce__ method to the class (see issue #9249). [#13305]
Fixed the check for invalid Latitude values for float32 values. Latitude now accepts the float32 value of pi/2, which was rejected before because a comparison was made using the slightly smaller float64 representation. See issue #13708. [#13745]
Fixed confusing chained exception messages of read() function when it fails. [#13170]
When writing out a ~astropy.table.Table to HTML format, the formats keyword argument to the ~astropy.table.Table.write method will now be applied. [#13453]
heapsize is now checked for VLA tables. An error is thrown whether P format is used but the heap size is bigger than what can be indexed with a 32 bit signed int. [#13429]
Fix parsing of ascii TFORM when precision is missing. [#13520]
A compressed image HDU created from the header of a PRIMARY HDU, now correctly updates 'XTENSION' and 'SIMPLE' keywords. [#13557]
Empty variable-length arrays are now properly handled when pathological combinations of heapoffset and heapsize are encountered. [#13621]
PCOUNT and GCOUNT keywords are now removed from an uncompressed Primary header, for compliance with fitsverify behavior. [#13753]
Bugfix for using MagUnit units on model parameters. [#13158]
Fix bug in using non-linear fitters to fit 0-degree polynomials using weights. [#13628]
Fix a problem where accessing one field of a structured column returned a Column with the same info as the original column. This resulted in unintuitive behavior in general and an exception if the format for the column was set. [#13269]
Tables with columns with structured data can now be properly stacked and joined. [#13306]
Update jQuery to 3.6.0, to pick up security fixes. [#13438]
Fix a Python 3.11 compatibility issue. Ensure that when removing a table column that the pprint_include_names or pprint_exclude_names attributes get updated correctly. [#13639]
When using add_columns with same indexes in indexes option or without specifying the option, the order of the new columns will now be kept. [#13783]
Fix a bug when printing or getting the representation of a multidimensional table column that has a zero dimension. [#13838]
Ensure that mixin columns and their info are not shared between tables even when their underlying data is shared with copy=False. [#13842]
Fix Time.insert() on times which have their out_subfmt set. [#12732]
Prevent Time() from being initialized with an invalid precision leading to incorrect results when representing the time as a string. [#13068]
Fix a bug in Time where a date string like "2022-08-01.123" was being parsed as an ISO-format time "2022-08-01 00:00:00.123". The fractional part at the end of the string was being taken as seconds. Now this raises an exception because the string is not in ISO format. [#13731]
Significantly improved the performance of parsing composite units with the FITS format, by ensuring the detailed_exception argument is properly passed on and thus used. [#12699]
Ensure that np.concatenate on quantities can take a dtype argument (added in numpy 1.20). [#13323]
Ensure that the units of any initial argument to reductions such as np.add.reduce (which underlies np.sum) are properly taken into account. [#13340]
Ensure that np.concatenate on masked data can take a dtype argument (added in numpy 1.20). [#13323]
Fix error when suppressing download progress bar while using non-default sys.stdout stream. [#13352]
Ensure str and repr work properly for Masked versions of structured subarrays. [#13404]
If an attribute is created using deprecated_attribute() with the alternative argument then getting or setting the value of the deprecated attribute now accesses its replacement. [#13824]
Fixed calling .tight_layout() on a WCSAxes. [#12418]
WCS.pixel_to_world now creates an EarthLocation object using MJD-AVG if present before falling back to the old behaviour of using MJD-OBS. [#12598]
The locations of WCSAxes ticks and tick-labels are now correctly calculated when the DPI of a figure changes between a WCSAxes being created and the figure being drawn, or when a rasterized artist is added to the WCSAxes. [#12630]
Fix a bug where SlicedLowLevelWCS.world_to_pixel_values would break when the result of the transform is dependent on the coordinate of a sliced out pixel. [#13579]
Updated bundled WCSLIB version to 7.12. This update includes bug fixes to wcssub() in how it handles temporal axes with -TAB and fixes handling of status returns from linp2x() and linx2p() relating to distortion functions, in particular affecting TPV distortions - see #13509. For a full list of changes - see http://www.atnf.csiro.au/people/mcalabre/WCS/CHANGES or astropy/cextern/wcslib/CHANGES. [#13635]
Fixed WCS validation not working properly if HDUList is needed for multi-extension FITS file. [#13668]
Development wheels of astropy should now be installed from https://pypi.anaconda.org/astropy/simple instead of from https://pkgs.dev.azure.com/astropy-project/astropy/_packaging/nightly/pypi/simple. [#13431]
Compatibility with Python 3.11, 3.10.7, 3.9.14, 3.8.14 [#13614]
Your coding agent can read these notes before it upgrades. Set up the MCP server →