Add PORTING_MAP.md, Trial plot methods, and Example 04 parity fixes#57
Merged
iahncajigas merged 4 commits intomainfrom Mar 11, 2026
Merged
Add PORTING_MAP.md, Trial plot methods, and Example 04 parity fixes#57iahncajigas merged 4 commits intomainfrom
iahncajigas merged 4 commits intomainfrom
Conversation
Phase 0 inventory complete: comprehensive Matlab→Python mapping document covering all 16 classes (484+ methods), standalone functions, library functions, paper examples, and helpfile notebooks. Trial now exposes plotRaster() and plotCovariates() as standalone methods matching the Matlab API, in addition to the combined plot(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Two discrepancies found via cross-repo verification against Matlab: 1. dAIC/dBIC sign convention: Matlab uses getDiffAIC(1) which computes Zernike - Gaussian, but Python manually computed Gaussian - Zernike (opposite sign). Fixed to match Matlab. dKS was already correct. 2. _compute_place_field missing sampleRate: Matlab's evalLambda computes exp(X*b) * sampleRate to produce firing rates in Hz. Python helper omitted the sampleRate multiplication. Added sample_rate parameter and wired through all call sites. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Documented ~80 public methods across Analysis (21), CIF (22), History (7), Events (3), ConfidenceInterval (8), TrialConfig (5), and ConfigCollection (5). All docstrings translated from Matlab help text with NumPy convention (Parameters/Returns/See Also sections). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Complete docstring coverage for all public methods across: - SignalObj, Covariate, nspikeTrain (core.py — ~60, ~15, ~25 methods) - FitResult, FitSummary (fit.py — ~30, ~15 methods) - CovariateCollection, SpikeTrainCollection, Trial, TrialConfig, ConfigCollection (trial.py — ~40, ~50, ~30+, ~5, ~10 methods) - DecodingAlgorithms (decoding_algorithms.py — class + 12 public methods) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PORTING_MAP.mddocumenting full class-level architecture mapping between Matlab and Python repos (484+ methods across 16 classes)Trial.plotRaster()andTrial.plotCovariates()methods_compute_place_fieldsampleRate scalingExample 04 fixes (found via cross-repo behavioral verification):
getDiffAIC(1)computes Zernike − Gaussian; Python was computing Gaussian − Zernike (opposite sign). dKS was already correct.evalLambdaproducesexp(Xβ) × sampleRate(firing rate in Hz); Python's_compute_place_fieldhelper omitted the sampleRate factor.Test plan
--export-figuresMean dAIC (Zern-Gauss): -43.79🤖 Generated with Claude Code