What’s New in Astropy 4.2?

Overview

Astropy 4.2 is a major release that adds new funcionality since the 4.1 release.

In particular, this release includes:

In addition to these major changes, Astropy v4.2 includes smaller improvements and bug fixes and significant cleanup, which are described in the Full Changelog. By the numbers:

  • 183 issues have been closed since v4.1

  • 105 pull requests have been merged since v4.1

  • 63 distinct people have contributed code

Planck 2018 is accepted and now the default cosmology

The accepted version of the Planck 2018 cosmological parameters has been included and has become the default cosmology. It is identical to the previous, preliminary version (Planck18_arXiv_v2), which is deprecated and will be removed in a future release.

>>> from astropy.cosmology import Planck18
>>> Planck18.age(0)
<Quantity 13.7868853 Gyr>

Time performance improvements

The performance for creating a Time object from a large array of fixed-format string times was dramatically improved. For ISO and ISOT formats the speed-up is a factor of 25 and for the year day-of-year format the speedup is a factor of 50. This is done with a new C-based time string parser which can also be used for custom user-defined Time formats. For details see Fast C-based Date String Parser.

In addition the performance for creating a scalar Time object in a epoch format like unix, unix_tai, or cxcsec was improved by a factor of 4.

Removed ERFA module

The private _erfa module has been converted to its own package PyERFA. It is now a required dependency of astropy, and can be directly imported with import erfa. Importing _erfa from astropy now issues a deprecation warning and will be removed in the future.

Full change log

To see a detailed list of all changes in version v4.2, including changes in API, please see the Full Changelog.

Contributors to the v4.2 release

The people who have contributed to the code for this release are:

  • Adrian Price-Whelan

  • Albert Y. Shih

  • Alex Conley

  • Aniket Sanghi *

  • Anne Archibald

  • Bastian Beischer *

  • Ben Greiner *

  • Benjamin Winkel

  • Bojan Nikolic *

  • Brian Soto *

  • Brigitta Sipőcz

  • Bruce Merry *

  • Chris Simpson

  • Chun Ly *

  • Clara Brasseur

  • Clare Shanahan

  • David Stansby

  • Derek Homeier

  • Diego Alonso *

  • Ed Slavich

    1. Madison Bray

  • Erik Tollerud

  • Erin Allard

  • Even Rouault *

  • Gabriel Perren

  • George Galvin *

  • Gregory Simonian *

  • Hannes Breytenbach

  • Hans Moritz Günther

  • Inada Naoki *

  • James Turner

  • Jero Bado *

  • Juan Luis Cano Rodríguez

  • Kris Stern

  • Larry Bradley

  • Lauren Glattly

  • Lee Spitler *

  • Ludwig Schwardt *

  • Marten van Kerkwijk

  • Matthew Craig

  • Maximilian Nöthe

  • Michele Costa

  • Miguel de Val-Borro

  • Mihai Cara

  • Nadia Dencheva

  • Nathaniel Starkman *

  • Nicolas Tessore *

  • Nikita Saxena *

  • Ole Streicher

  • Paul Huwe *

  • Peter Yoachim *

  • Pey Lian Lim

  • Ricardo Fonseca *

  • Rui Xue

  • Shreyas Bapat

  • Simon Conseil

  • Stuart Littlefair

  • Stuart Mumford

  • Thomas Robitaille

  • Tom Aldcroft

  • Tom Donaldson

  • Victoria Dye *

  • Zac Hatfield-Dodds *