Skip to content

Add SP2-XR I/O support (HK, sp2b binary, PbP CSV)#90

Merged
rcjackson merged 10 commits into
ARM-DOE:mainfrom
BarbaraBertozzi:bbertozzi/sp2xr-io
Jul 16, 2026
Merged

Add SP2-XR I/O support (HK, sp2b binary, PbP CSV)#90
rcjackson merged 10 commits into
ARM-DOE:mainfrom
BarbaraBertozzi:bbertozzi/sp2xr-io

Conversation

@BarbaraBertozzi

Copy link
Copy Markdown
Contributor

Summary

Adds I/O support for the SP2-XR (Single Particle Soot Photometer Extended
Range) instrument variant.

What's included

  • pysp2.io.read_sp2xr_hk_file — housekeeping reader (CSV/ZIP), excluding
    firmware-computed PSD bin columns
  • pysp2.io.read_sp2xr_hk_psd — accesses the firmware-computed PSD
    histograms as a 2D dataset shaped (time, num_bins)
  • pysp2.io.read_sp2xr — binary .sp2b reader
  • pysp2.io.read_sp2xr_pbp — Particle-by-Particle CSV/ZIP reader with
    auto-detection of the matching HK file for absolute datetimes. Firmware-
    calibrated Scatter Size (nm) and Incand Mass (fg) dropped by default to
    encourage recalibration with consistent curves
  • Calibration provenance: scattering and incandescence calibration CSVs
    (matching *_Scatt_*.csv / *_Incan_*.csv) are auto-located and attached
    as dataset attributes wherever firmware-calibrated values are kept
  • Example scripts (plot_read_sp2xr.py, plot_hk_sp2xr.py)
  • pytest coverage for the four readers
  • Small SP2-XR sample dataset under pysp2/testing/data/SP2XR/

@rcjackson

Copy link
Copy Markdown
Collaborator

Examples, unit tests, and docs are all here! We welcome this new contribution @BarbaraBertozzi!

@rcjackson
rcjackson merged commit 477d3b0 into ARM-DOE:main Jul 16, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants