Skip to content

Add p-values to plotSeqCorr legend and fix LaTeX rendering#62

Merged
iahncajigas merged 2 commits intomainfrom
fix/seqcorr-pvalues-latex
Mar 14, 2026
Merged

Add p-values to plotSeqCorr legend and fix LaTeX rendering#62
iahncajigas merged 2 commits intomainfrom
fix/seqcorr-pvalues-latex

Conversation

@iahncajigas
Copy link
Copy Markdown
Contributor

Summary

  • plotSeqCorr: Rewritten to match MATLAB — plots all models with color cycling, displays ρ and p-value in legend (e.g. λ_PSTH, ρ=0.21 (p=0.17))
  • LaTeX rendering: Added _ensure_mathtext() helper that wraps \lambda labels in $...$ for proper matplotlib rendering (λ₁ instead of \lambda_1)
  • KSPlot: Legend labels now render LaTeX symbols correctly
  • plotResults: Calls plotSeqCorr(fit_num=None) to show all models (matching MATLAB)

Test plan

  • 257 tests pass, 3 skipped
  • Example 01 figure verified: KS plot shows λ_const, SeqCorr shows ρ=0.06 (p=0.15)
  • Example 03 figure verified: multi-model SeqCorr shows λ_PSTH and λ_SSGLM with distinct p-values

🤖 Generated with Claude Code

Iahn Cajigas and others added 2 commits March 13, 2026 20:26
…labels

- Rewrite plotSeqCorr to match MATLAB: plot all models with color cycling,
  compute ρ and p-value via scipy.stats.pearsonr, show in legend
- Add _ensure_mathtext() helper to wrap \lambda labels in $...$ for
  matplotlib mathtext rendering
- Apply _ensure_mathtext to KSPlot legend labels
- Update plotResults to call plotSeqCorr with fit_num=None (all models)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…e layout

- b0/b1 distributions: N(0,1) matching MATLAB randn (was N(0,0.3) and N(1,0.5))
- Q process noise: std(diff(stimulus)) matching MATLAB (was fixed 0.001)
- CI: use z=1.96 with min/max ordering matching MATLAB (was ±2σ)
- Figure 1: add CIF panel (3-panel layout matching MATLAB)
- Figure 2: black=decoded, blue=actual matching MATLAB color convention
- Also fix paper_examples.py b0/b1 distributions for consistency
- Regenerate affected docs figures (examples 01, 03, 05)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@iahncajigas iahncajigas merged commit 8f5402b into main Mar 14, 2026
13 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.

1 participant