<!-- markdownlint-disable=MD025 -->
# Version 0.20.0 (2026-11-17)
- dependencies:
- MSRV updated to 1.88.0
- mwalib v4.0.0
- Bumped hifitime to 4.3
- Added `precession::get_last` (local apparent sidereal time, as astropy and pyuvdata compute LSTs) and `math::tiles_to_baseline` / `math::tiles_to_cross_correlation_baseline` (the inverses of `baseline_to_tiles` / `cross_correlation_baseline_to_tiles`).
- `precession::precess_time` now rotates the array by the apparent sidereal time. It applies a precession-nutation matrix, which takes positions from the true equator and equinox of date, but rotated the array by the mean sidereal time (as cotter does), so the J2000 positions were turned about the pole by the equation of the equinoxes (up to ~17 arcsec): `w` was out by up to 8 cm per km of baseline, and `PrecessionInfo::lmst_j2000` and `hadec_j2000` by the same angle. `PrecessionInfo::lmst` is still the mean sidereal time. UVWs now agree with CALC 11 (the delay model DiFX uses) to 4 mm per km in `w`, and in `u` and `v` once CALC's aberration scale (1 - v.s/c, < 1e-4) is allowed for.
- `precession::precess_time` now takes the annual aberration of the phase centre out of the precessed positions with a rigid rotation (as casacore's `MBaseline` conversion does), and `PrecessionInfo::hadec_j2000` is the catalogue phase centre, `phase_centre.to_hadec(lmst_j2000)`. Previously (as in cotter) the positions were projected onto the aberrated phase centre, which gets `w` right but rolls `u` and `v` about the phase centre by the RA aberration times sin(dec) (up to ~9 arcsec; e.g. 3 arcsec, 10 cm on 6.4 km baselines for an ASKAP field at dec -31), and disagreed with modellers that project onto `to_hadec(lmst_j2000)` (hyperdrive: ~1% model error at 1 GHz on 6 km baselines). `w`, and so phase tracking that uses it, is unchanged to < 0.1 mm per km; written UVWs now differ from cotter's by that roll. This is how python-casacore and pyuvdata handle the aberration (checked against python-casacore to 1.3 mm on 6.4 km, apart from casacore's apparent sidereal time and antenna2 - antenna1 baseline sign).
- Added `UvwFrame::Cotter` and `precession::precess_time_cotter`: cotter's (and Marlu's before these changes) precession, with the mean sidereal time and projection onto the aberrated phase centre, for reproducing cotter's UVWs (Birli's `--emulate-cotter`). It differs from the default frame by up to ~8 cm per km in `w`.
- Added the `convention` module: `PolConvention` (MWA, IAU, ASKAP mappings between Stokes parameters and XX/XY/YX/YY, with conversions both ways), `UvwFrame` (the hyperdrive or casacore J2000 frames, or OSKAR's unprecessed frame of date) and `Convention` presets (mwa, iau, lofar, casacore, askap, oskar; OSKAR's X element is east-west, as its Measurement Sets record in `RECEPTOR_ANGLE`), all with `FromStr`/`Display` (with the usual aliases) and optional serde. The `casa` alias names the convention of the Measurement Sets `CASA` itself writes (IAU polarisations, antenna 1 minus antenna 2 baselines): `Convention::Iau` and `UvwFrame::Hyperdrive`, not the casacore frame.
- Added `precession::precess_time_in_frame` and `precession::precess_time_casacore`, which place the array in the frame of the UVWs casacore's calculators (`derivedmscal`, DP3) compute (apparent sidereal time, annual aberration of the phase centre taken out with a rigid rotation, antenna2 - antenna1 baselines), and `precession::get_last` (apparent sidereal time). Checked against python-casacore UVWs to better than 1 cm on 2 km baselines.
- The Measurement Set and uvfits writers take `.with_conventions(PolConvention, UvwFrame)` (default: the MWA's, as before) and record them the way each format can: the `FEED` table's `RECEPTOR_ANGLE` and the `AIPS AN` table's `POLAA`/`POLAB` now give the X feed's real orientation (X east-west is `[pi/2, 0]` for MWA data; cotter wrote the IAU `[0, pi/2]`), the `UVW` column's `MEASINFO` reference is `J2000` when precessing (`APP` otherwise) rather than `ITRF`, and the UVWs are computed in the requested frame. Because neither format can express the Stokes sum/average convention, writers also add the keyword pyuvdata reads and writes for it (`pyuvdata_polconv` on the MS main table, `POLCONV` in the uvfits primary header; "avg" or "sum", as UVH5's `pol_convention`), and a `marlu_uvw_frame` keyword ("hyperdrive"/"casacore"/"oskar"; an MS table keyword, a uvfits HIERARCH keyword) for the UVW frame, which no format can express. The X orientation is only recorded through the feed angles, as pyuvdata does since it replaced `x_orientation` with `feed_angle`.
- Measurement Sets record the baseline sign in the `pyuvdata_flip_conj` keyword (false for the casacore frame's antenna2 - antenna1 baselines, true otherwise), without which pyuvdata assumes antenna1 - antenna2 (as CASA, cotter and Birli write) and misreads casacore-frame files. uvfits files are always written with antenna1 - antenna2 baselines, as AIPS and pyuvdata read them, so casacore-frame visibilities are written conjugated. Unprecessed MS UVWs now also take the frame's baseline sign.
- The MS `ANTENNA` table's `MOUNT` is "phased" and the uvfits `MNTSTA` 6 (a phased/aperture array) rather than ALT-AZ (0), so that readers such as pyuvdata measure the feed angles from north rather than from the parallactic angle.
- Tile heights from a metafits file are now taken relative to the array centre. Metafits heights are altitudes (about 368-377 m for the MWA), but `XyzGeodetic::get_tiles` and `ObsContext::from_mwalib` used them as heights above the array centre, so the array's height was counted twice: every tile in a written Measurement Set's `ANTENNA` table (and a uvfits `AIPS AN` table) was about 378 m too high, as in cotter's files. Baselines computed from these positions (e.g. by DP3 or casacore) were out by up to 6 cm per km, and an array position averaged from them was 378 m too high. The new `ENH::from_mwalib_antenna` takes `MWA_HEIGHT_M` off the metafits height. With mwalib 4, whose `height_m` is already corrected for the Earth's curvature for tiles with ellipsoidal metafits heights (the long-baseline tiles), this gives every tile's local up. UVWs Marlu computes are unchanged, since a common height offset cancels in baselines.
- Long-baseline (`LB*`) tile heights now include the Earth's curvature. The MWA database stores the 128T and hex tiles' heights as their local "up" plus the array's altitude, but the long-baseline tiles' as their raw surveyed heights above the ellipsoid, so these tiles were too high (relative to the array centre's tangent plane) by about (e² + n²) / 2R: 0.08 m at 1 km, 0.97 m for LBD7 at 3.5 km. Unlike the common offset above, this does not cancel in baselines, so UVWs of baselines with long-baseline tiles change. mwalib 4.0.0 makes this correction itself (`Antenna::height_m`; the metafits value is `height_uncorrected_m`), so `ENH::from_mwalib_antenna` does not repeat it. The new `ENH::from_ellipsoidal_height` does the same conversion for other ellipsoidal heights; it agrees with mwalib 4's correction to 1 mm and with the MWA wiki's survey reprocessing to 2 mm.
- The uvfits `AIPS AN` table's `IATUTC` is now IAT - UTC (the number of leap seconds) on `RDATE`, from hifitime's leap second table, rather than a hard-coded 33 (as cotter writes; correct only from 2006 to 2008). It is 37 for every observation since 2017. Fixes [#29](https://github.com/MWATelescope/Marlu/issues/29).
- The Measurement Set writer no longer creates every MAIN-table row in `initialize`; each `write_vis` batch adds the rows it fills. casacore zero-filled the untouched rows when `initialize` closed the table, so every MS was written to disk twice (once as zeros). The MAIN table now has 0 rows until the first `write_vis`, and an MS written with fewer rows than planned has no trailing all-zero rows.
- Fixed many clippy lints.
# Version 0.19.0 (2026-10-15)
- Measurement Set writes are much faster: the MAIN table is written in column-wise batches with one bulk put per column, and DATA, WEIGHT_SPECTRUM, FLAG, SIGMA and WEIGHT use tiled storage managers (one MWA coarse channel: 694 s to 55 s). Row ordering and column contents are unchanged.
- Updated rubbl_casatables to 0.10.0 (re-exported, hence the minor bump)
# Version 0.18.0 (2026-07-15)
- Fixed 256T uvfits baseline encoding for pyuvdata compatibility: all baselines now use the miriad convention (`ant1 * 2048 + ant2 + 65536`) when the array has more than 255 antennas, preventing mixed-encoding files that pyuvdata incorrectly decodes.
- Added `encode_uvfits_baseline_miriad` public function.
# Version 0.17.1 (2026-06-05)
- Corrected MSRV to 1.85.0
- Updated CI
# Version 0.17.0 (2026-05-15)
- Bumped MSRV to 1.85
- Updated mwalib to 2.0 rubbl_casatables 0.9.0 thiserror 2.0
- Updated CI to use most recent action versions
# Version 0.16.1 (2025-04-11)
- Fixed decode_uvfits_baseline bug (#36)
- minor code reformatting
# Version 0.16.0 (2025-04-10)
- update mwalib 1.8.7
- minor code reformatting
# Version 0.15.1 (2025-04-02)
- add antenna filtering to `VisSelection`
# Version 0.15.0 (2024-11-12)
- update mwalib 1.8.2, with:
- newer lazy_static, fitsio, fitsio-sys, msrv
- bscale in CorrelatorContext
- msrv 1.65
# Version 0.14.0 (2024-09-20)
- update mwalib 1.5.0
# Version 0.13.0 (2024-08-14)
- fix issues compiling on arm64:
- use c_char instead of i8 in uvfits interface
# Version 0.12.0 (2024-08-14)
- fix issues compiling on arm64:
- update rubbl 0.8.0 (which uses casacore v3.5.0)
- update ndarray 0.16.0
# Version 0.11.0 (2024-05-24)
- use built 0.7, to avoid an issue in dependent crates where
built can't find Cargo lock.
- additional error enums
- update mwalib 1.3.3
# Version 0.10.1 (2023-08-11)
- When writing out measurement sets, a weight of -0.0 is now considered a flag,
rather than only values < 0.0 (-0.0 is not less than 0.0).
# Version 0.10.0 (2023-07-21)
- Allow vis writers to not precess their UVWs
- Improve uvfits time precision
- A second DATE group param is now used
- INTTIM is also used, if the time resolution was supplied
- Remove progress bars
- Remove mwalib-reading functions
# Version 0.9.2 (2023-07-18)
- update modtime when writing ms
# Version 0.9.1 (2023-02-28)
- `RADec::weighted_average` was incorrect and has now been fixed.
# Version 0.9.0 (2023-02-17)
- Change measurement sets from conditionally writing UT1 or UTC reference frames
to always writing UTC frames. DUT1 is reported as the UT1UTC key.
- Fix a heap of clippy lints
- Remove CUDA convenience code for Rust callers
- Use mwalib v0.16.0 and fitsio v0.20.0
- Add the cargo-semver-checks action to CI
- Fix a bug in `RADec::weighted_average`
- Speed up XYZ related code
- Use the pure-Rust erfa crate rather than erfa-sys
- Rename coordinate "new" methods to "from", e.g. `RADec::new` is now
`RADec::from_radians`
- Rename `LatLngHeight::new_mwa` to `LatLngHeight::mwa`
- Use the newest version of hifitime
# Version 0.8.0 (2022-08-22)
- Bump dependency versions.
- `cargo` feature changes:
- `io` no longer exists
- `cfitsio` now exists. uvfits writing is possible with just `cfitsio`, and
`mwalib` depends on `cfitsio`.
- `ms` now exists. Measurement Set writing is only possible with `ms`.
- Support DUT1 usage:
- The precession API has changed
- `UvfitsWriter` reports the DUT1 with `UT1UTC`
- `MeasurementSetWriter` changes its time frame from `UTC` to `UT1`, iff the
supplied DUT1 is non zero.
- IO code changes:
- Rename `VisReadable` to `VisRead`
- Rename `VisWritable` to `VisWrite`
- Remove `write_vis_mwalib`
- Rename `write_vis_marlu` to `write_vis`
- Add a `finalise` method to `VisWrite`
- The `UvfitsWriter` API is slightly different
- Remove a bunch of needless `clone`s from the code. This may improve
performance.
- Add an optional `approx` feature that exposes trait implementations like
`approx::AbsDiffEq` on each of the coordinate types (e.g. `UVW`).
- Make `Jones` `#[repr(transparent)]`
# Version 0.7.2 (2022-08-04)
- Expose Marlu version in `built_info`
- fix a bug that caused vis_ctx.timeseries to give an additional timestep.
# Version 0.7.1 (2022-08-03)
- Re-export `LmnRime`.
- Add `to_earth` and `to_earth_wgs84` functions on `XyzGeocentric`.
# Version 0.7.0 (2022-06-24)
- ⚡ @cjordan 's lightning fast uvfits optimization: using raw cfitsio instead of fitsio_sys
- use rust 1.60
- Use erfa-sys 2.0
- use ndarray 0.15.4 (instead of a range of versions)
- use mwalib 0.15.0:
- cable lengths applied
- expose DUT1 from metafits
- use mwalib antennas instead of rfinputs
- better error messages when creating measurement sets in paths that either don't
exist, or are not a directory.
- api changes:
- io:
- uvfits `obs_name` from `Option<String>` to `Option<&str>`.
- `history` metadata in ms and uvfits
- Jones: convenience methods for array access
- constants: ecpose `FREQ_WEIGHT_FACTOR`, `TIME_WEIGHT_FACTOR`
- context: impl `Clone` for `ObsContext`
- pos/lmn: add `LmnRime` and `LMN::prepare_for_rime`
# Version 0.6.1 (2022-03-24)
- impl Clone for VisContext
- impl PartialEq for LatLngHeight
# Version 0.6.0 (2022-03-24)
- implement VisContext, ObsContext, MwaObsContext
- migrate io::uvfits from Birli
- better error handling in io
- bake flags into weights
# Version 0.5.0 (2022-02-11)
- use mwalib v0.13.0
- kill ::time with latest hifitime
- bump min rust version from 1.56 to 1.7
- set minimum dependency versions for all deps
- Jones::nan() is more... NaNny
# Version 0.4.0 (2022-01-27)
- MeasurementSetWriter keeps track of the current row in the main table, so that rows can be written in chunks.
- MeasurementSetWriter::initialize_from_mwalib now takes the baseline_idxs array so that it can initialise the main table with the correct number of rows.
- MeasurementSetWriter correctly handles the case where the number of selected channels / frequencies is not a multiple of the averaging factors
# Version 0.3.4 (2022-01-24)
- add optional progress bars for measurement sets.
# Version 0.3.3 (2022-01-19)
- bug fixes for measurement sets when averaging
# Version 0.3.2 (2022-01-14)
- implement averaging standalone and in VisWritable
- impl Display for LatLngHeight, RADec
# Version 0.3.1 (2022-01-10)
- tweak dependency versions
- Re-export more crates
- Actually do something with cuda-static feature
- Add Cargo.lock to the gitignore
- Don't label assert lines as partially covered
- add Dockerfile
# Version 0.3.0 (2021-12-17)
- use Rust 2021 Edition
- add cuda convenience functions
- implement io feature, make rubbl optional
- import approx and ndarray directly, not rubbl's
- slightly faster MS IO
# Version 0.2.3 (2021-12-07)
- update mwalib to 0.12
- update ndarray to ">=0.15.4,<0.16"
- write to feed table
- measurement sets complete
- remove hard dependency on approx
# Version 0.2.2 (2021-11-17)
- switch from mwa_rust_core to marlu
# Version 0.2.1 (2021-11-17)
- added measurement sets
- use rubbl_casatables 0.6.0