##############
Release notes
##############

Version 3.8.0 (2026-07-10)
==========================

* Added in-air oxygen optode gain calibration: ``RSKinairO2calibration`` and the ``routines.inairO2calibration`` routine add a corrected dissolved-O2 saturation and/or concentration channel.
* Barometric correction of sea pressure: ``RSKimportbarometer`` loads an atmospheric-pressure series (from a barometer ``.rsk``, a ``.csv``, a measured pressure channel of the same RSK, or an Nx2 ``[utc_ms, dbar]`` matrix) and attaches it to the marine RSK; ``RSKderiveseapressure`` (called without ``patm``) then subtracts it for a corrected sea pressure, and ``RSKremovebarometer`` reverts to the constant atmospheric pressure. Marine samples outside the barometer's coverage take the nearest reading held constant.
* ``RSKopen`` reads back a previously imported barometer; ``RSK2RSKFULL`` (v3) and ``RSK2RSK`` (v2) persist it on export.
* Eligible files are schema 3.2.0+, or 2.18.2/2.19.0 with dbType ``full``/``live``/``EPdesktop``.
* ``RSKopen``/``RSKreaddata`` now handle files with no deployment/epoch metadata by falling back to a wide time window; ``RSKderiveseapressure`` falls back to the default atmospheric pressure when there is no ``ATMOSPHERE`` parameter; also fixed ``readpowertable`` erroring on an empty ``firmwareType``.
* User-facing output (logs, warnings/errors, plot titles, export filenames) now always uses the schedule label, never the numeric schedule id.
* Fixed a channel/data column index shift when a channel is hidden on pre-3.0.0 schema files.
* Restyled the Sphinx documentation.

Version 3.7.0 (2026-06-08)
============================

* Support for 3.0.0 and 3.2.0 schema RSK files: the new metadata/data table structure, multi-schedule data stored per schedule in ``RSK.dataArrays``, and a label-based schedule API (functions take a schedule label such as ``'s.CTD'`` rather than a numeric ID)
* Multi-schedule support across the toolbox: read, ``RSKderive*``, post-processing, region/profile, export, and plot/view functions all operate per schedule
* Cross-schedule fill (``getrefdataset``/``filldataset``) so derivations whose inputs live on different schedules (e.g. dissolved O2 saturation, where O2 and temperature are on different schedules) are populated instead of NaN
* Stricter derive-dependency policy (aligned with pyRSKtools): a required channel that exists but is entirely NaN now raises instead of producing NaN; an *absent* sea pressure channel is still auto-derived (with a warning); salinity is never auto-derived. Added the ``channelallnan`` helper (true if a channel is entirely NaN, or absent, across all schedules)
* ``RSKderivesalinity`` and ``RSKderiveseapressure`` now return only the RSK structure; ``RSKderiveseapressure`` accepts a per-schedule atmospheric pressure (a cell array with one scalar or vector per schedule)
* Added the ``+routines`` package of standalone, array-in / array-out processing functions, each in its own versioned file so it can be lifted into another project unchanged
* Added ``routines.correcttempADCcal`` (removes the periodic once-per-minute A2D self-calibration outliers from a temperature series) and its post-processor ``RSKcorrecttempADCcal`` (adds a "Temperature Corrected" channel inheriting the source temperature channel's type and units, and on files with no confirmable self-cal signature returns the series unchanged with no error, rather than fabricating a correction)
* Added ``RSK2RSKFULL`` for exporting full 3.0.0+ schema RSK files (renamed from ``RSK2RSKV300``), with channel/data alignment fixes; fixed ``CSV2RSK`` and ``RSK2RSK`` and added ``scheduleNumber``
* Fixed ``RSK2RSK`` leaving the mode-specific schedule table empty, which made Ruskin throw a Schedule-to-ContinuousSchedule cast error when opening an exported file; it now writes the full ``schedules`` table plus the matching mode table (``continuous``/``burst``/``wave``/``tide``/``average``/``directional``)
* ``RSK2RSK`` now writes ``channels.label`` (set to ``longName``), so a derived channel that inherited its source's ``shortName`` (e.g. "Temperature Corrected") shows its own name in Ruskin instead of the source channel's name
* Unified the channel naming convention with pyRSKtools; temperature channels are renamed to descriptive names by sensor type (e.g. conductivity cell temperature, pressure gauge temperature)
* Added a ``QuickStart``/``Demo.m`` mirroring the pyRSKtools demo notebook, runnable end-to-end in MATLAB
* Added Sphinx documentation and unified the help-text formatting across the toolbox
* User-facing messages now refer to schedule labels rather than numeric schedule IDs
* Extended ``RSKwarning``/``RSKerror`` to accept printf-style arguments
* Aligned plot parameters with pyRSKtools and fixed a plotting failure when a threshold option is empty
* Fixed channel order when hidden channels are present, and fixed hidden channels appearing in ``RSK.channels``
* Fixed ``RSKderiveO2`` appending a redundant O2 channel; ``RSKcalculateCTlag`` now requires conductivity and temperature in a single schedule
* Detect the burst-data table name (``dataWave``) on v3.2.0 files; fixed the downsample query table name and a ``tstamp`` read error on the new schema
* Fixed ``RSKopen`` reading the v3 channel ranging table on the wrong join key (joining ``instrumentChannel`` to ``channel`` by ``ic.id`` instead of ``ic.channelId``), which mismatched the per-channel range metadata in ``RSK.ranging`` on 3.0.0/3.2.0 files
* Fixed default-schedule resolution (``resolvedefaultschedule``/``resolvedefaultschedulect``) erroring on multi-schedule files, where a global channel index could overrun a schedule's narrower per-schedule values matrix; it is now bounds-checked before counting valid samples
* Fixed ``RSKderiveseapressure`` erroring on a multi-schedule file with no pressure channel (the no-pressure sentinel reached the cross-schedule fetch as an invalid column index)
* Normalised prose to British English, fixed typos, and corrected docstring/code mismatches found in an audit

For releases before 3.7.0, see the ``Contents.m`` file.
