# v0.25.x series

## v0.25.0 (20th December 2023)

In this major release, we change the atmospheric profile interface for improved
flexibility.

* Eradiate's atmospheric thermophysical profiles are no longer restricted to
  the built-in profiles. You can now use any profile, including data curated by
  yourself. Of course, the built-in profiles are still available.
  Thermophysical property handling is now externalized to a new library
  [Joseki](https://github.com/rayference/joseki). Joseki's output format is
  [documented here](https://rayference.github.io/joseki/2.5/explanation/#dataset-schema).
* We added an interface to customize atmospheric absorption data. If you need to
  fit the data for a specific use case (*e.g.* to work with an atmosphere from
  another planet than Earth), it is now possible. The data format is described
  in our {ref}`data guide <sec-data-molecular_absorption>`.
* The quadrature rule used for spectral discretization in CKD mode can now be
  specified in a flexible way. The number of quadrature points is no longer set
  to a built-in value, and the atmospheric absorption datasets ship metadata
  that can be leveraged to dynamically select a quadrature that minimizes the
  error on atmospheric transmittance.

```{important}
This update changes the {class}`.MolecularAtmosphere` constructor. While we
believe the new defaults improve consistency and convenience, existing codebases
will require adaptation. In particular, the spectral range specified for data
loading must be consistent with the spectral range covered by the sensor's
spectral response function. We strongly recommend going through the
{doc}`/tutorials/getting_started/molecular_atmosphere` tutorial. See also the
*Changed* section below for more detail.
```

### Added

* The quadrature rule used for spectral discretization in CKD mode can now be
  specified in a flexible way using the {class}`.QuadSpec` class and subclasses
  ({ghpr}`344`, {ghpr}`375`). This is configured at the {class}`.Experiment`
  through the `quad_spec` attribute.
* Added the Ross Thick-Li Sparse (RTLS) surface reflection model ({ghpr}`355`).
* Added the {meth}`.HeterogeneousAtmosphere.eval_transmittance` method
  ({ghpr}`375`).

### Changed

* ⚠️ The {meth}`.MolecularAtmosphere.afgl_1986` and
  {meth}`.MolecularAtmosphere.ussa_1976` constructors are removed ({ghpr}`344`).
  Radiative property profile setup is now entirely controlled by the
  {class}`MolecularAtmosphere.thermoprops <.MolecularAtmosphere>` parameter.
  To construct these profiles, set ``MolecularAtmosphere.thermoprops`` to
  `{"identifier": "afgl_1986-us_standard"}` or `{"identifier": "ussa_1976"}`.
  See the API reference for details.
* ⚠️ Standard profile-specific radiative profile classes
  {class}`.AFGL1986RadProfile` and {class}`.US76ApproxRadProfile` are replaced
  by the generic {class}`.AtmosphereRadProfile` ({ghpr}`344`).
* ⚠️ Thermophysical profile components have been offloaded to
  [Joseki](https://github.com/rayference/joseki) ({ghpr}`344`), a new
  independent library that extends what was in our {mod}`.thermoprops`
  subpackage.
* Eradiate now uses Pint's application registry ({ghpr}`366`). This improves
  compatibility with other software using Pint. The duplicate unit definition
  handling policy silently ignores repeated definitions of identical units.
* Updated default data file lists available for usage with the
  `eradiate data fetch` tool (see {ref}`sec-reference_cli` for details)
  ({ghpr}`375`).
* 📖 Many documentation updates and cleanup.

### Fixed

* Fixed atmosphere state update during experiment setup (ensures that experiment
  scene geometry propagates down to each component of a
  {class}`.HeterogeneousAtmosphere`) ({ghpr}`344`).
* Fixed the default path to the download directory when not using a development
  setup ({ghpr}`375`).

### Internal changes

* 🖥️ Dependencies: added `joseki` (required; {ghpr}`344`, {ghpr}`375`); removed
  `iapws` ({ghpr}`344`); upgraded Mitsuba kernel from `0.1.0` to `0.1.1`
  ({ghpr}`375`).
* 🖥️ Added a `cfconventions.py` module to store variable attributes ({ghpr}`375`).
* 🖥️ Added wavenumber to the physical quantity definitions ({ghpr}`344`).
* 🖥️ Add unit test for experiment with CAMS atmosphere ({ghpr}`375`).
* 🖥️ Added converters {func}`convert_thermoprops` and
  {func}`convert_absorption_data` to convert atmospheric thermophysical profiles
  and absorption data specifications ({ghpr}`344`).
* 🖥️ Added function {func}`.locate_absorption_data` to locate the absorption
  data on the Eradiate online stable data store corresponding to a given
  codename and wavelength range ({ghpr}`344`).
* 🖥️ Added interpolated-related exception types ({ghpr}`344`).
* 🖥️ Modified the `.AggregateCKDQuad` pipeline step to work with a `g` coordinate
  instead of the previously used `index` coordinate ({ghpr}`344`).
* 🖥️ Updated the reference dataset for regression test
  `test_rami4atm_hom00_bla_sd2s_m03_z30a000_brfpp.py` ({ghpr}`344`).
* 🖥️ Renamed module `_molecular_atmosphere.py` to `_molecular.py` ({ghpr}`344`).
* 🖥️ Modified `BinSet` class methods to take into account quadrature
  specifications ({ghpr}`344`).
* 🖥️ Defined two convenient pytest fixtures for molecular atmospheres:
  `us_standard_mono` and `us_standard_ckd_550nm` ({ghpr}`344`).
* 🖥️ Our codebase is now linted using [Ruff](https://github.com/astral-sh/ruff).
