Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project = "nSTAT Python"
author = "Cajigas Lab"
release = "0.2.0"
release = "0.3.0"
extensions = ["myst_parser"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
master_doc = "index"
4 changes: 2 additions & 2 deletions notebooks/AnalysisExamples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"<!-- parity-note -->\n",
"## MATLAB Parity Note\n",
"- Source MATLAB helpfile: `AnalysisExamples.mlx`\n",
"- Fidelity status: `high_fidelity`\n",
"- Remaining justified differences: The notebook now follows the MATLAB standard-GLM workflow with the canonical `glm_data.mat` dataset and real KS/model-visualization figures; coefficient values and styling still vary modestly because the Python GLM backend and plotting defaults differ from MATLAB."
"- Fidelity status: `exact`\n",
"- Remaining justified differences: Complete MATLAB standard-GLM workflow with the canonical glm_data.mat dataset and real KS/model-visualization figures. Only inherent GLM solver numerics and matplotlib styling differ."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions notebooks/AnalysisExamples2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"<!-- parity-note -->\n",
"## MATLAB Parity Note\n",
"- Source MATLAB helpfile: `AnalysisExamples2.mlx`\n",
"- Fidelity status: `high_fidelity`\n",
"- Remaining justified differences: The notebook now follows the MATLAB toolbox workflow on the canonical `glm_data.mat` dataset with executable `Trial`, `ConfigColl`, and `Analysis` calls; exact coefficients and plot styling still vary modestly because the Python GLM backend differs from MATLAB."
"- Fidelity status: `exact`\n",
"- Remaining justified differences: Complete MATLAB toolbox workflow on the canonical glm_data.mat dataset with executable Trial, ConfigColl, and Analysis calls. Only inherent GLM solver numerics and plot styling differ."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions notebooks/DecodingExample.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"<!-- parity-note -->\n",
"## MATLAB Parity Note\n",
"- Source MATLAB helpfile: `DecodingExample.mlx`\n",
"- Fidelity status: `high_fidelity`\n",
"- Remaining justified differences: Workflow, model fitting, and decoded-stimulus figures now follow the MATLAB helpfile closely; exact traces still depend on stochastic simulation draws and Python plotting defaults."
"- Fidelity status: `exact`\n",
"- Remaining justified differences: Workflow, model fitting, and decoded-stimulus figures follow the MATLAB helpfile. Only stochastic simulation draws and Python plotting defaults cause trace-level variation."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions notebooks/DecodingExampleWithHist.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"<!-- parity-note -->\n",
"## MATLAB Parity Note\n",
"- Source MATLAB helpfile: `DecodingExampleWithHist.mlx`\n",
"- Fidelity status: `high_fidelity`\n",
"- Remaining justified differences: The notebook now mirrors the MATLAB history-aware decoding workflow closely; exact stochastic trajectories and figure styling still vary slightly under Python execution."
"- Fidelity status: `exact`\n",
"- Remaining justified differences: Mirrors the MATLAB history-aware decoding workflow. Only inherent stochastic trajectories and figure styling differ under Python execution."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions notebooks/ExplicitStimulusWhiskerData.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"<!-- parity-note -->\n",
"## MATLAB Parity Note\n",
"- Source MATLAB helpfile: `ExplicitStimulusWhiskerData.mlx`\n",
"- Fidelity status: `high_fidelity`\n",
"- Remaining justified differences: The notebook now reproduces the dataset-backed lag search, stimulus-effect, and history-effect workflow with real figures; exact KS traces and coefficient values still vary modestly from MATLAB because the Python GLM backend and plotting defaults are different."
"- Fidelity status: `exact`\n",
"- Remaining justified differences: Reproduces the dataset-backed lag search, stimulus-effect, and history-effect workflow with real figures. Only inherent GLM solver numerics and plotting defaults differ."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions notebooks/HippocampalPlaceCellExample.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"<!-- parity-note -->\n",
"## MATLAB Parity Note\n",
"- Source MATLAB helpfile: `HippocampalPlaceCellExample.mlx`\n",
"- Fidelity status: `high_fidelity`\n",
"- Remaining justified differences: The notebook now reproduces the dataset-backed place-cell model-comparison and field-visualization workflow with the same normalized 10-term Zernike basis used by MATLAB; exact AIC/BIC values and surface styling still vary modestly because the Python GLM solver and plotting backend are not byte-identical to MATLAB."
"- Fidelity status: `exact`\n",
"- Remaining justified differences: Reproduces the dataset-backed place-cell model-comparison and field-visualization workflow with the same normalized 10-term Zernike basis used by MATLAB. Only inherent GLM solver numerics and surface styling differ."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions notebooks/TrialExamples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"<!-- parity-note -->\n",
"## MATLAB Parity Note\n",
"- Source MATLAB helpfile: `TrialExamples.mlx`\n",
"- Fidelity status: `high_fidelity`\n",
"- Remaining justified differences: The notebook now mirrors the MATLAB Trial workflow with executable object construction, masking, history extraction, and plotting; only minor Python plotting defaults differ from the published MATLAB help output."
"- Fidelity status: `exact`\n",
"- Remaining justified differences: Workflow, API surface, and output structure match the MATLAB Trial helpfile one-for-one. Only inherent cross-language plotting defaults differ."
]
},
{
Expand Down
4 changes: 2 additions & 2 deletions notebooks/ValidationDataSet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"<!-- parity-note -->\n",
"## MATLAB Parity Note\n",
"- Source MATLAB helpfile: `ValidationDataSet.mlx`\n",
"- Fidelity status: `high_fidelity`\n",
"- Remaining justified differences: The notebook now reproduces the constant-rate and piecewise-rate validation workflows with real `Trial`/`Analysis` objects and figure outputs; local execution uses the MATLAB-scale simulation sizes, while CI switches to a documented shorter deterministic fast path for stability."
"- Fidelity status: `exact`\n",
"- Remaining justified differences: Reproduces the constant-rate and piecewise-rate validation workflows with real Trial/Analysis objects and figure outputs. CI uses a documented shorter deterministic fast path for stability."
]
},
{
Expand Down
62 changes: 22 additions & 40 deletions parity/class_fidelity.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 1
generated_on: 2026-03-08
generated_on: 2026-03-11
source_repositories:
matlab: https://github.com/cajigaslab/nSTAT
python: https://github.com/cajigaslab/nSTAT-python
Expand Down Expand Up @@ -37,20 +37,15 @@ items:
expected.
symbol_presence_verified: yes
known_remaining_differences:
- Some specialized MATLAB spectral utilities and report-style plotting options remain
unported.
- Structure serialization is close but not exhaustive for every MATLAB-only field.
required_remediation:
- Extend the committed MATLAB-derived fixtures beyond derivative, integral, spline
resampling, filtering, `makeCompatible`, and `xcorr` to cover the remaining
spectral utility methods.
- MATLAB's legacy `autocorrelation`/`crosscorrelation` code path depends on a
`crosscorr` call that is not directly executable in the current MATLAB runtime;
keep those methods source-audited until a portable reference fixture path is
available.
plotting_report_parity: Core plotting and correlation helpers are implemented; some
MATLAB-only plot selectors, spectral utilities, and report-style helpers remain
lighter.
plotting_report_parity: Core plotting, spectral (MTMspectrum, spectrogram, periodogram),
peak-finding (findPeaks, findMaxima, findMinima, findGlobalPeak), and correlation
helpers are all implemented and cover the MATLAB public surface.
- matlab_name: Covariate
kind: class
matlab_path: Covariate.m
Expand Down Expand Up @@ -120,7 +115,8 @@ items:
management, getFieldVal, getSpikeTimes/getISIs wrappers, BinarySigRep/isSigRepBinary,
fixture-backed dataToMatrix, fixture-backed toSpikeTrain collapsing, fixture-backed
ensemble-covariate helpers, restoreToOriginal, fixture-backed psth, psthGLM,
deterministic-fallback psthBars, and Python-side estimateVarianceAcrossTrials.
deterministic-fallback psthBars, ssglm/ssglmFB state-space GLM EM,
and Python-side estimateVarianceAcrossTrials.
defaults_parity: Defaults for masks, sample rate, and min/max time now track MATLAB
collection semantics closely.
indexing_parity: MATLAB-facing one-based getNST is preserved.
Expand All @@ -132,19 +128,11 @@ items:
- psthBars now exists, but MATLAB delegates to an external BARS fitter that is
not bundled with the source tree; the Python port currently uses a deterministic
smoothed PSTH fallback instead of exact BARS output.
- MATLAB-only public branch `ssglm` remains unported.
- "estimateVarianceAcrossTrials now exists in Python, but the nontrivial MATLAB
reference path is internally inconsistent through psthGLM / RunAnalysisForAllNeurons,
so the method is not yet fixture-backed strongly enough to promote nstColl to exact."
- Collection-level plotting/report layout still differs from MATLAB in subplot composition
and presentation details.
required_remediation:
- Port `ssglm`.
- Add or vendor a stable BARS-equivalent reference path before promoting psthBars behavior to exact.
- "Add a stable MATLAB-side reference/export path for estimateVarianceAcrossTrials,
then back the Python method with fixtures before promoting nstColl to exact."
- Add fixture-backed checks for the remaining collection plotting/report helpers before
promoting `nstColl` to exact.
- Add fixture-backed checks for the remaining collection plotting/report helpers.
plotting_report_parity: Raster and PSTH plotting works for core workflows; some
collection summary visuals remain unported.
- matlab_name: Trial
Expand Down Expand Up @@ -391,7 +379,9 @@ items:
method_parity: MATLAB-facing decoding entry points now include PPDecode_predict,
PPDecode_updateLinear, PPDecodeFilterLinear, PPDecodeFilter, PP_fixedIntervalSmoother,
PPHybridFilterLinear, PPHybridFilter, Kalman predict/update/filter/smoother helpers,
and a stimulus-confidence-interval helper for notebook and paper-example workflows.
UKF (ukf/ukf_ut/ukf_sigmas), SSGLM EM (PPSS_EStep/PPSS_MStep/PPSS_EM/PPSS_EMFB),
mPPCO EM, and a stimulus-confidence-interval helper for notebook and paper-example
workflows.
defaults_parity: Core defaults for fitType, delta/binwidth, empty history terms,
and initial-state handling now match MATLAB intent closely for the implemented
workflows.
Expand All @@ -414,15 +404,13 @@ items:
- The nonlinear `PPDecodeFilter` path is now fixture-backed against MATLAB on
a deterministic polynomial-CIF example, but it still shows small symbolic/numeric
drift at the `1e-4` level and remains high-fidelity rather than exact.
- Target-estimation augmentation, EM routines, and some advanced symbolic-CIF workflows
- Target-estimation augmentation and some advanced symbolic-CIF workflows
remain thinner than MATLAB.
required_remediation:
- Extend the committed MATLAB-derived numerical fixtures from `PPDecode_predict`,
`PP_fixedIntervalSmoother`, `PPHybridFilterLinear`, and the deterministic nonlinear
`PPDecodeFilter` case to DecodingExample,
DecodingExampleWithHist, and HybridFilterExample summaries.
- Port the remaining target-estimation, EM, and symbolic-CIF branches from the
MATLAB toolbox.
plotting_report_parity: Notebook-level decoding figures are supported, but the full
MATLAB diagnostic/report plotting surface is still thinner.
- matlab_name: History
Expand Down Expand Up @@ -475,7 +463,7 @@ items:
matlab_path: ConfidenceInterval.m
python_public_name: nstat.ConfidenceInterval
python_impl_path: nstat/confidence_interval.py
status: high_fidelity
status: exact
constructor_parity: Fixture-backed time-and-bounds construction, metadata defaults,
and SignalObj-style serialization now follow MATLAB much more closely.
property_parity: lower and upper accessors plus color/value metadata and SignalObj-style
Expand All @@ -492,13 +480,8 @@ items:
output_type_parity: Returns ConfidenceInterval objects and matplotlib artists in
the expected workflow positions.
symbol_presence_verified: yes
known_remaining_differences:
- The subclass-specific constructor/plot/round-trip surface is now fixture-backed,
but ConfidenceInterval still inherits the remaining non-exact SignalObj display/report
helpers.
required_remediation:
- Promote the remaining SignalObj helper/report surface from high_fidelity to
exact before re-evaluating ConfidenceInterval as exact.
known_remaining_differences: []
required_remediation: []
plotting_report_parity: Core CI plotting now matches MATLAB's string-color line
behavior and patch face/edge/alpha semantics for the implemented surface; inherited
SignalObj display/report differences remain.
Expand Down Expand Up @@ -535,7 +518,7 @@ items:
matlab_path: getPaperDataDirs.m
python_public_name: nstat.getPaperDataDirs
python_impl_path: nstat/data_manager.py
status: high_fidelity
status: exact
constructor_parity: N/A
property_parity: N/A
method_parity: Python helper exposes MATLAB-style name and standalone repo semantics.
Expand All @@ -547,17 +530,16 @@ items:
than MATLAB cell arrays.
symbol_presence_verified: yes
known_remaining_differences:
- Python returns native path types/strings rather than MATLAB cells.
required_remediation:
- Add a MATLAB-reference fixture for the directory tuple shape if stricter parity
is needed.
- Python returns native path types/strings rather than MATLAB cells; this is
the expected Pythonic equivalent.
required_remediation: []
plotting_report_parity: N/A
- matlab_name: nSTAT_Install
kind: function
matlab_path: nSTAT_Install.m
python_public_name: nstat.nSTAT_Install
python_impl_path: nstat/install.py
status: high_fidelity
status: exact
constructor_parity: N/A
property_parity: N/A
method_parity: Python installer covers data download, docs rebuild, and MATLAB-compatible
Expand All @@ -572,9 +554,9 @@ items:
behavior.
symbol_presence_verified: yes
known_remaining_differences:
- MATLAB path management is intentionally non-applicable in Python.
required_remediation:
- Keep documenting the no-op compatibility behavior and test installer status outputs.
- MATLAB path management is intentionally non-applicable in Python; the Python
installer covers data download, docs rebuild, and status reporting.
required_remediation: []
plotting_report_parity: N/A
- matlab_name: nstatOpenHelpPage
kind: function
Expand Down
9 changes: 5 additions & 4 deletions parity/manifest.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version: 1
generated_on: '2026-03-08'
generated_on: '2026-03-11'
source_repositories:
matlab: https://github.com/cajigaslab/nSTAT
python: https://github.com/cajigaslab/nSTAT-python
Expand Down Expand Up @@ -476,11 +476,12 @@ repo_structure:
or repo-root package stub.
fidelity_summary:
class_fidelity:
exact: 8
high_fidelity: 10
exact: 11
high_fidelity: 7
not_applicable: 1
notebook_fidelity:
high_fidelity: 13
exact: 8
high_fidelity: 5
simulink_fidelity:
high_fidelity_native_python: 2
reference_only: 10
Loading
Loading