Releases: AdrianCurtin/processFNIRS2
Release list
v1.0.1
v1.0.1 — Reproducibility, CI, and API curation
A maintenance and infrastructure release: gated continuous-integration test
lanes, deterministic identity/fingerprinting primitives, MCP integration docs,
a curated public API surface, and targeted fixes. It builds on the v1.0.0
two-layer toolbox without changing its workflows.
Testing & continuous integration
- Authoritative test-suite builder (
buildSuite) and arunCIgate that runs
the headless, UI, clean-process, and quick lanes and fails on Failed or
Incomplete tests. runQuickTestsnow returns a pass flag and errors on failure when no output
is captured, so it can act as a gate.- Manual GitHub Actions workflow (
workflow_dispatch) running the quick and
identity lanes, including cross-platform matrix jobs. - Golden-file regression fixtures and notes under
tests/golden/.
Identity & reproducibility primitives (+pf2_base/+identity/)
- Deterministic canonical byte encoding, domain-separated (named) hashing, and
SHA-256 digests. - A tagged JSON/MAT transport for round-tripping values canonically.
- Source and imported-data fingerprinting, plus a fail-closed expected-digest
preflight that gates importers.
Processing methods
- Shipped Takizawa oxy seed methods (
takizawa_easy/takizawa_hard, lenient
and strict automatic channel rejection — Takizawa et al. 2008) added to the
default library. - Method reference tables and examples updated to the live registry and to the
OD_TDDRraw method.
Public API & namespace curation
- The
Contextprocessing option now uses the publicpf2.ProcessingContext;
the publicfromRecipehelper was removed. - Method-authoring internals moved out of the primary
pf2.*surface into
pf2_base: seed factories and discovery topf2_base.methods.seeds,
function-metadata validation topf2_base.methods.validateFunction, the
add/edit-function tools topf2_base.methods.functions, and the tutorial
demo-pipeline setup topf2_base.examples.addDemoPipelines. - Retired the
pf2.GUI.configureRawMethods/configureOxyMethods/
functionswrappers; the supported method editors are
pf2.methods.raw.configureMethodsandpf2.methods.oxy.configureMethods.
MCP integration
mcp/README.mdandmcp/TOOL_CARD.md: how to drive processFNIRS2 from an MCP
client through the MATLAB MCP Server.
Documentation
pf2_sSMARTheader references added (Curtin & Ayaz 2019; Ayaz et al. 2010 for
the SMAR detection stage) and an expanded Notes section on the DC-offset
(ShiftCorrect) correction and its caveats;pf2_functions_default.cfg
argument list, role, defaults, and parameter metadata corrected to match the
function.- Docs clarify
pf2_baseas an advanced-and-internal package.
Fixes
getTakizawaRejectionnow uses the first FFT bin above 1 Hz as a scalar index
rather than the full index vector.- Signed-zero handling: negative zero round-trips canonically as
+0through
the JSON transport, with explicit test coverage.
Full Changelog: v1.0.0...v1.0.1
v1.0.0: Two-Layer fNIRS Toolbox
v1.0.0 — Two-Layer fNIRS Toolbox
This release brings processFNIRS2 to a complete two-layer toolbox: single-subject
processing (pf2) and group analysis / statistics (exploreFNIRS), spanning the
full workflow from raw device import through preprocessing, hemoglobin conversion,
block/GLM modeling, group-level statistics, and publication-grade visualization.
Single-subject processing (pf2)
- Programmatic Pipeline API (
RawPipeline/OxyPipeline,PipelineFunction)
for building, editing, saving, and reloading named processing methods. ProcessingContextfor global-state isolation, enabling reproducible and
parallel (parfor) processing viacopy(), recipes, and per-worker settings.- Modular raw→OD→Hb staged pipeline with DPF modes (None/Fixed/Calc), improved
error handling, and reduced duplication. - Block averaging (
defineBlocks→extractBlocks→blockAverage) and
marker-free sliding-window epoching for dynamic FC / model input.
Group analysis & statistics (exploreFNIRS)
- Experiment class: grouping, aggregation, averaging modes, behavioral
variables, ROI, and temporal/bar plotting. - LME engine with contrasts, FDR correction, growth-curve (TimeModel)
analysis, and stats formatting. - Connectivity and coupling (Pearson, partial correlation, mutual
information, wavelet coherence), graph metrics, and HB-ICA /
hyperscanning inter-brain synchrony (including PPI). - GLM / AR-IRLS first-level modeling with design matrices, contrasts,
diagnostics, and optional GPU support.
Signal processing
- First-party DSP:
butter,fir1,sgolay, window functions, and a
first-party wavelet package (FFT-based CWT, translation-invariant transforms).
The bundled WaveLab850 dependency has been removed. - Motion correction (TDDR, SMAR), filtering, and global/systemic interference
removal (CAR, PCA-GSR, short-channel regression).
Auxiliary signals
- Typed, first-class Aux handling (HR, EKG, PPG, ACCEL, GSR/EDA, RESP, TEMP,
EEG): canonical form, type inference, grid alignment, feature extractors, and
use as GLM nuisance regressors, LME covariates, and motion gates.
Spatial modeling & visualization
- Diffuse Optical Tomography: PMDF forward sensitivity model, coverage,
honest banana projection, and depth-weighted Tikhonov image reconstruction with
cortical render (layered head model, resolution diagnostics). - High-quality 3D rendering with style presets (showcase/publication),
matcap materials, ambient occlusion, brain colormaps, and an interactive
Explore3Dexplorer. - Spatial visualizations: topographic maps, activation movies, Brodmann
parcel projection, optode parcel maps, brain-anchored connectome, circular
connectogram, dual-brain synchrony, and statistical projections (p-values,
F-stats, correlations). - Consistent dark-mode theming with white-background export.
Import / export
- Import: fNIR Devices/Biopac, SNIRF (auto BIDS
events.tsv), Hitachi, Artinis
Oxy3, directory-tree batch import, tidy-table import (fromTable), and
foundation-model embedding re-import. - Export: NIR, SNIRF, BIDS-NIRS dataset export, and a self-describing HDF5
tensor export contract for foundation-model consumers. - Marker dictionary subsystem unifying COBI/BIDS event labels; markers are
now a canonical table. - Montage descriptor, cross-device anatomical canonicalization, and
device.cfgsave.
Devices, QC & probe anatomy
- Added/expanded device support (fNIR3000, Artinis, LD) with robust probe
detection and MNI/2D layout fallback. - Headless QC pipeline (
assess/apply/report/snapshot), refactored
Takizawa rejection, and an enhanced multi-fileChannelCheckGUI with headless
gating. - Probe anatomy: nearest-Brodmann mapping and forward/sensitivity models.
Infrastructure
- Expanded unit/integration, golden, and benchmark test suites; Octave and
Statistics Toolbox compatibility shims; standardized error identifiers and a
warning-suppression API; tutorial scripts and documentation.
Full Changelog: v0.9a...v1.0.0
v0.8.1: Documentation & SNIRF Improvements
What's New
-
Comprehensive function documentation: Added detailed headers across import, export, data manipulation, plotting, and methods configuration modules. Headers include input/output specifications, examples, and algorithm references where applicable.
-
New concatenateHorizontal function: Added
pf2.data.concatenateHorizontalfor joining fNIRS segments side-by-side (channel dimension) with probe geometry merging. -
exploreFNIRS version info: Added
exploreFNIRS.versInfofor version tracking in the analysis module.
Bug Fixes
- Fixed
pf2.data.resampleto skip missing fields gracefully instead of erroring - Fixed SNIRF import to use stable sort for consistent channel ordering
- Fixed SNIRF export to handle NaN wavelengths correctly
- Improved SNIRF import/export support for fNIRS data
- Improved probe layout ordering to prefer source/detector index
- Fixed channel filter to determine channels in advance during processing
- Fixed probe check GUI
- Fixed help file to reflect moved export functions
- Fixed "strip extra raw" functionality
Spelling Corrections
- Renamed
ConcatonatetoConcatenateandConcatonateHorizontaltoConcatenateHorizontal
Full Changelog: v0.8a...v8.1
v0.9a: API Standardization & Testing Infrastructure
v0.9a — API Standardization & Testing Infrastructure
This release standardizes the public API naming and lays down a comprehensive
testing foundation ahead of the v1.0 feature work.
Breaking Changes
-
camelCase API migration. All public
pf2.*namespaces now use camelCase:pf2.Import.*→pf2.import.*pf2.Export.*→pf2.export.*pf2.Data.*→pf2.data.*pf2.Process.*→pf2.process.*pf2.Methods.*→pf2.methods.*pf2.Settings.*→pf2.settings.*pf2.Probe.*→pf2.probe.*
Function names follow suit (e.g.
pf2.Import.ImportNIR()→pf2.import.importNIR(),
pf2.Methods.Raw.SetMethod()→pf2.methods.raw.setMethod()). Update call
sites accordingly.
New Features
- Unit and integration testing infrastructure built on MATLAB's
unittest
framework, with runnerspf2_base.tests.runAllTests()and
pf2_base.tests.runQuickTests(). - Coverage across import, data-structure invariants, signal processing,
Beer-Lambert conversion, TDDR motion correction, ROI definition/building,
NIR/SNIRF export, FDR correction, method configuration, and auxiliary data;
end-to-end pipeline and SNIRF round-trip integration tests. - Synthetic fNIRS data generators with configurable HRF, cardiac/respiratory,
noise, and motion-artifact components for reproducible testing. - Quick validation scripts for rapid sanity checks.
Documentation
- Added
CHANGELOG.mdand a testing strategy document (testing_plan.md). - Added golden-file infrastructure documentation.
Full Changelog: v0.8.1...v0.9a
v0.8a: SNIRF Support & Visualization Enhancements
What's New
-
SNIRF format support: Added import and export for the standardized SNIRF file format, including embedded probe information and short separation channel handling
-
NIR export: Added
pf2.export.asNIRto export fNIRS structs back to .nir file format -
Violin plots: Added violin plot support in exploreFNIRS bar charts with kernel density estimation
-
IQR error bars: Added interquartile range (IQR) and IQR-without-outliers options for error bar display
-
Non-ordinal optode support: Channels no longer require sequential optode numbering
-
Datetime support in SetT0:
pf2.data.setT0now accepts datetime parameters -
Auxiliary data splitting:
pf2.data.splitnow properly splits and flattens auxiliary data channels -
Short separation filtering: 3D interpolation plots filter short separation channels by default
Bug Fixes
- Fixed scatter plots displaying flipped orientation
- Fixed barchart plotting with model indices
- Fixed temporal ROI plotting
- Fixed export for long and wide table formats
- Fixed channel ordering after Beer-Lambert conversion
- Fixed crash when markers are missing
- Fixed crash with mismatched channel numbers
- Fixed t0 calculation from datetime/unix timestamps
- Fixed marker sorting on SNIRF import
- Fixed probe check GUI in auto mode
- Fixed errorbar means calculation
- Fixed autocontrast indexing
Full Changelog: v0.7a...v0.8a
v0.7a: 3D Visualization & Multi-Probe Support
What's New
-
MNI coordinate system: Migrated 3D visualization to MNI coordinates for standardized brain mapping
-
Brodmann area visualization: Added Brodmann area plotting, labeling, and legend support on 3D brain models
-
Multi-probe support: Added ability to plot and concatenate data from multiple probes
-
EEG 10-20 integration: Added 10-20 EEG probe plotting and ability to overlay EEG/fNIRS data
-
Voxel brain display: Added voxel-based brain visualization mode
-
External plot functions: Moved temporal, scatter, and barchart plotting to standalone functions in
exploreFNIRS.plot -
Auxiliary data plotting: Added Aux channel support in temporal, scatter, and barchart plots
-
Categorical variable support: exploreFNIRS now handles categorical values in grouping and analysis
-
Improved marker matching: Enhanced regex pattern matching for marker extraction
-
Hitachi import improvements: Faster import and datetime extraction
-
Resample enhancements: Support for datetime/duration fields and recursive struct/table resampling
Bug Fixes
- Fixed autocontrast sorting and indexing
- Fixed LME model failures with categorical types
- Fixed vline support for datetime/duration axes
- Fixed interpolate values chart orientation
- Fixed grandavg for auxiliary data with time integration
- Fixed suptitle spacing issues
- Fixed ICA clean and wavelet clean functionality
Full Changelog: v0.5a...v0.7a
v0.5a: Initial Package Release
What's New
-
Package architecture: Migrated codebase to MATLAB package format (
+pf2,+pf2_base) -
ROI support: Added region of interest functionality with automatic channel grouping
-
Automatic channel rejection: Added threshold-based channel quality assessment
-
Plotting functions: Added
pf2.data.plot.Oxy,pf2.data.plot.Raw, arranged values, and interpolate values visualization -
Method management: Added
pf2.methods.raw.setMethod,pf2.methods.oxy.setMethod, and method listing/description functions -
Device configuration: Devices now use source/detector geometry information when available
-
fNIR Devices support: Updated import for newer COBI format files
-
Automatic demographic loading: ImportNIR now extracts demographic data from file headers
-
Channel rejection loading: Auto-loads channel rejection data when present in files
-
Help documentation: Added built-in help document and version information
-
exploreFNIRS: Initial group analysis GUI with LME modeling, FDR correction, and temporal/bar/scatter plots
Full Changelog: https://github.com/AdrianCurtin/processFNIRS2/commits/v0.5a