Skip to content

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

[0.4.0] - 2026-10-19

Added

  • Measurement.get_heat_between(start_s, end_s) returns the heat released between two times. The limits can be one time for all samples or one time per sample (dict or pd.Series keyed by sample_short), e.g. the onset from get_mainpeak_params().

Fixed

  • Measurement.apply_tian_correction() without processparams crashed with an AttributeError; it now uses the instance's parameters.
  • Measurement.get_ascending_flank_tangent() crashed because it called a removed method. It works again, and flank_fraction_start, flank_fraction_end, window_size and cutoff_min override the corresponding processparams values.
  • regex was dropped by the maximum-slope analysis, so get_maximum_slope(), get_mainpeak_params() and get_peak_onset_via_max_slope() returned max-slope results for all samples.
  • Measurement.plot_by_category() was an empty stub; it again yields one plot per metadata group, as documented.
  • PlottingParameters.plot_title is now a proper dataclass field and can be passed to the constructor.
  • calocem no longer changes matplotlib's font settings. Importing it used to set the global font.family to serif; plots now use your matplotlib style.
  • Plots: get_peaks marks the peaks in the color of each curve, without a file path in the title or repeated legend entries; get_astm_c1679_characteristics shows one legend entry for the ASTM markers; the main peak plot of get_mainpeak_params no longer shows the maximum slope point twice, labels the y axis correctly (W g⁻¹), and shows the dormant heat flow and the gradient in the selected heat unit instead of rounding the former to 0.
  • Exceptions re-raised by calocem now chain the original error (raise ... from e).

Deprecated

  • Measurement.get_cumulated_heat_at_hours() is renamed to get_cumulative_heat_at_hours(), and its result column cumulated_heat_at_hours to cumulative_heat_j_g. The old method emits a DeprecationWarning; the old column is still included.
  • Arguments that had no effect now emit a DeprecationWarning when passed: get_dormant_period_heatflow(cutoff_min, prominence, plot_right_boundary, show_plot), get_peak_onsets(show_plot, ax), get_maximum_slope(save_path, xunit), get_average_slope(save_path, xunit), get_peak_onset_via_max_slope(time_discarded_s, save_path, xscale, xunit, intersection), get_astm_c1679_characteristics(xscale), get_ascending_flank_tangent(show_plot, plotpath, ax) and Measurement(new_code). Use ProcessingParameters instead.

Removed

  • Internal plotting helpers that could no longer run (SimplePlotter.plot_flank_tangent, SimplePlotter.plot_onset_intersections and their private Measurement callers).
  • Unused requests dependency.

Documentation

  • Restructured the documentation: new quickstart on the home page, new pages Loading Data and Processing Parameters, revised Characteristic Values, Plotting and Tian Correction pages. The outdated how-to guide was merged into these pages.
  • The reference now covers ProcessingParameters and all parameter groups; the public Measurement methods have numpy-style docstrings listing parameters, returned columns and units.
  • Fixed the Tian correction docs: a single time constant requires tau2 = None.
  • Added a changelog page and a quickstart to the README.
  • The figures of Characteristic Values are generated from the current code by scripts/make_doc_figures.py; an ASTM C1679 figure was added.
  • The main peak example on Characteristic Values uses smoothing_1st_deriv = 1e-13; the former 1e-12 underestimated the maximum slope by about 40 %.

Internal

  • CI now runs ruff and mypy; both pass. The example scripts are run in CI.
  • Replaced two test scripts that swallowed exceptions with real tests.

[0.3.4] - 2026-05-28

Added

  • Measurement.save(path) and Measurement.load(path). Persist a processed Measurement to a single, user-named pickle file and restore it in a downstream script. The whole object is stored, so processed (e.g. downsampled) data, info, added metadata and processparams are all preserved. This is a convenience cache, not an archive — the raw source files remain the source of truth, and a file that fails to load can be regenerated by re-running from the original folder. The .pkl extension is recommended to keep the format explicit.
m = Measurement(folder, processparams=processparams)
m.save("run01.pkl")

# later, in another script
m = Measurement.load("run01.pkl")
  • Measurement.get_data_with_metadata(). Returns the measurement data joined with its added metadata as one tidy DataFrame, ready to export with .to_csv(...). Works on per-sample data (joining on the metadata id column) and after average_by_metadata (joining on the group label and attaching only metadata that is constant within each group). Returns the data unchanged when no metadata has been added.

Changed

  • DownSamplingParameters.smoothing_factor is now scale-relative. It is scaled internally by the number of points and the heat-flow variance instead of being passed to the spline as an absolute residual target, so the same value behaves consistently regardless of heat-flow magnitude. The default changed from 1e-10 to 1e-6. This changes which points adaptive downsampling selects.

Fixed

  • Adaptive downsampling works again. Measurement(..., processparams=pp) with pp.downsample.apply = True had silently returned the full-resolution data since the package refactor, because _apply_adaptive_downsampling was left as a no-op stub. It now downsamples per sample as documented.
  • UnivariateSpline "s too small" warning removed. The spline fit during downsampling no longer emits a non-convergence UserWarning.

[0.3.3] - 2026-05-06

Breaking Changes

  • Pickle caching is now opt-in. Measurement(folder=...) no longer writes _data.pickle and _info.pickle to the working directory by default. Pass save_cache=True explicitly to enable it.

Migrate:

# old (implicit caching)
m = Measurement(folder)

# new — equivalent caching behavior
m = Measurement(folder, save_cache=True)

Added

  • save_cache: bool = False kwarg on Measurement.__init__. Controls whether pickle cache files are written when loading from a folder. The existing cold_start=False read path is unchanged.

Documentation

  • New tutorial notebook docs/example_get_mainpeak_params.ipynb walking through get_mainpeak_params, with notebooks executed at docs build time so outputs stay in sync with the code.
  • Replaced stale TAInstCalorimetry references and corrected the package name and PyPI URL across docs/index.md, docs/how-to-guide.md, docs/quantification.md, and docs/tian.md.

Internal

  • Notebooks are now exercised under pytest via nbmake so doc examples cannot silently rot.
  • nbstripout configured to keep notebook diffs clean.

[0.3.2] - 2026-05-02

Added

  • CSV files with a trailing comments column (e.g. annotations like "experiment interrupted and restarted") are now parsed correctly.

[0.3.0] - 2026-04-03

Breaking Changes

  • calocem.tacalorimetry has been removed. The legacy monolithic Measurement implementation (tacalorimetry.py, ~3 400 lines) has been retired. The module now exists as a stub that raises a FutureWarning on import and forwards to the refactored implementation. The old and new implementations are not guaranteed to produce identical numerical results. Users who require the previous behaviour should pin to calocem<0.3.0.

Migrate your imports:

# old
from calocem.tacalorimetry import Measurement

# new — preferred
from calocem import Measurement

# new — explicit
from calocem.measurement import Measurement

Added

  • Public package API. Measurement and ProcessingParameters are now importable directly from the top-level package:
    from calocem import Measurement, ProcessingParameters
    

Fixed

  • Eliminated all pandas Copy-on-Write FutureWarning and DeprecationWarning occurrences triggered by chained assignment patterns in utils.py and tacalorimetry.py. The package is now silent on pandas 2.x and compatible with the Copy-on-Write behaviour that becomes the default in pandas 3.0.
  • float() called on a single-element Series replaced with float(series.iloc[0]) to silence pandas DeprecationWarning.
  • Removed stray print("hallo") debug statement from the data loading path.

[0.2.5] - 2026-04-03

Fixed

  • ipykernel moved to dev dependencies — it is no longer installed as part of a normal pip install calocem. Users who need it for notebooks should install it explicitly (pip install ipykernel).
  • Replaced logging.basicConfig() call at import time with a module-level logger. CaloCem no longer writes CaloCem.log to the working directory on import or hijacks the host application's log configuration.

Internal

  • /.cache added to .gitignore to stop the mkdocs-git-committers cache from being tracked.
  • Manual exploration scripts (script_test_*.py) moved from tests/ to examples/ where the other example scripts live. They are not pytest tests and were silently collected without asserting anything.
  • Removed unused live import pysnooper from tests/test_read_calo_data_xls.py.

[0.2.4] - 2025-09-28

  • See repository history for changes prior to this changelog.