@brainpilot/skills 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/package.json +35 -0
- package/skills/01_Meta-Skills/contribute-skill/SKILL.md +277 -0
- package/skills/01_Meta-Skills/contribute-skills-via-pr/SKILL.md +163 -0
- package/skills/01_Meta-Skills/paper-to-skill/SKILL.md +435 -0
- package/skills/01_Meta-Skills/paper-to-skill/references/extraction-guide.md +286 -0
- package/skills/01_Meta-Skills/paper-to-skill/references/skill-template.md +250 -0
- package/skills/01_Meta-Skills/repo-to-skill/SKILL.md +289 -0
- package/skills/01_Meta-Skills/share-case/SKILL.md +253 -0
- package/skills/01_Meta-Skills/share-usage/README.md +63 -0
- package/skills/01_Meta-Skills/share-usage/SKILL.md +395 -0
- package/skills/01_Meta-Skills/verify-skill/SKILL.md +331 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/SKILL.md +194 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/references/effect-sizes.md +352 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/references/sample-size-guide.md +407 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-statistics/SKILL.md +361 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-statistics/references/common-analyses.md +517 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-visualization/SKILL.md +292 -0
- package/skills/02_Cross-Domain_Foundation/cogsci-visualization/references/plot-recipes.md +709 -0
- package/skills/02_Cross-Domain_Foundation/research-literacy/SKILL.md +286 -0
- package/skills/02_Cross-Domain_Foundation/research-literacy/references/common-assumptions.md +320 -0
- package/skills/02_Cross-Domain_Foundation/research-literacy/references/planning-template.md +143 -0
- package/skills/03_Cognitive_Psychology/alternative-uses-task-designer/SKILL.md +197 -0
- package/skills/03_Cognitive_Psychology/alternative-uses-task-designer/references/instruction-templates.md +60 -0
- package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/SKILL.md +246 -0
- package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/references/classic-paradigms.md +435 -0
- package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/references/design-principles.md +256 -0
- package/skills/03_Cognitive_Psychology/creativity-self-efficacy-mediation/SKILL.md +270 -0
- package/skills/03_Cognitive_Psychology/creativity-self-efficacy-mediation/references/lavaan-templates.md +172 -0
- package/skills/03_Cognitive_Psychology/divergent-thinking-scoring/SKILL.md +238 -0
- package/skills/03_Cognitive_Psychology/divergent-thinking-scoring/references/scoring-rubric.md +143 -0
- package/skills/03_Cognitive_Psychology/drift-diffusion-model/SKILL.md +203 -0
- package/skills/03_Cognitive_Psychology/drift-diffusion-model/references/fitting-guide.md +571 -0
- package/skills/03_Cognitive_Psychology/drift-diffusion-model/references/model-variants.md +427 -0
- package/skills/03_Cognitive_Psychology/evidence-accumulation-selector/SKILL.md +310 -0
- package/skills/03_Cognitive_Psychology/evidence-accumulation-selector/references/ez-diffusion-formulas.md +137 -0
- package/skills/03_Cognitive_Psychology/signal-detection-analysis/SKILL.md +300 -0
- package/skills/03_Cognitive_Psychology/signal-detection-analysis/references/application-guide.md +278 -0
- package/skills/03_Cognitive_Psychology/signal-detection-analysis/references/sdt-formulas.md +318 -0
- package/skills/03_Cognitive_Psychology/visual-search-array-generator/SKILL.md +283 -0
- package/skills/03_Cognitive_Psychology/visual-search-array-generator/references/array-generation-parameters.yaml +111 -0
- package/skills/04_Psycholinguistics/reading-time-analysis/SKILL.md +301 -0
- package/skills/04_Psycholinguistics/reading-time-analysis/references/measure-computation-guide.md +195 -0
- package/skills/04_Psycholinguistics/self-paced-reading-designer/SKILL.md +257 -0
- package/skills/04_Psycholinguistics/self-paced-reading-designer/references/analysis-guide.md +356 -0
- package/skills/04_Psycholinguistics/self-paced-reading-designer/references/region-segmentation.md +266 -0
- package/skills/04_Psycholinguistics/sentence-stimulus-norming/SKILL.md +346 -0
- package/skills/04_Psycholinguistics/sentence-stimulus-norming/references/lexical-databases-guide.md +184 -0
- package/skills/05_EEG_ERP/eeg-paradigm-designer/SKILL.md +226 -0
- package/skills/05_EEG_ERP/eeg-paradigm-designer/references/component-paradigm-map.md +276 -0
- package/skills/05_EEG_ERP/eeg-paradigm-designer/references/timing-parameters.md +244 -0
- package/skills/05_EEG_ERP/eeg-preprocessing-pipeline-guide/SKILL.md +367 -0
- package/skills/05_EEG_ERP/eeg-preprocessing-pipeline-guide/references/parameter-lookup-tables.md +138 -0
- package/skills/05_EEG_ERP/erp-analysis/SKILL.md +185 -0
- package/skills/05_EEG_ERP/erp-analysis/references/erp-components.md +447 -0
- package/skills/05_EEG_ERP/erp-analysis/references/preprocessing-pipeline.md +277 -0
- package/skills/05_EEG_ERP/erp-analysis/references/statistical-approaches.md +351 -0
- package/skills/05_EEG_ERP/mne-python-guide/SKILL.md +174 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/decoding.md +178 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/io_formats.md +160 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/preprocessing.md +259 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/simulation.md +173 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/source_localization.md +234 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/statistics.md +196 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/time_frequency.md +165 -0
- package/skills/05_EEG_ERP/mne-python-guide/references/visualization.md +175 -0
- package/skills/06_fMRI_Neuroimaging/brain-connectivity-modeler/SKILL.md +317 -0
- package/skills/06_fMRI_Neuroimaging/brain-connectivity-modeler/references/method-implementation-guide.md +116 -0
- package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/SKILL.md +296 -0
- package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/references/design-matrix-guide.md +214 -0
- package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/references/statistical-inference.md +288 -0
- package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/SKILL.md +274 -0
- package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/references/quality-control.md +336 -0
- package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/references/step-by-step-pipeline.md +380 -0
- package/skills/06_fMRI_Neuroimaging/fmri-task-design-guide/SKILL.md +264 -0
- package/skills/06_fMRI_Neuroimaging/fmri-task-design-guide/references/design-optimization-examples.md +114 -0
- package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/SKILL.md +273 -0
- package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/references/decoding-methods.md +170 -0
- package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/references/rsa-guide.md +266 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/SKILL.md +123 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/database-subjects.md +179 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/dataset-types.md +208 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/freesurfer-fmriprep.md +162 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/mapping-transforms.md +181 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/mni-utils.md +207 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/surface-analysis.md +219 -0
- package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/visualization.md +251 -0
- package/skills/07_Computational_Modeling/act-r-model-builder/SKILL.md +297 -0
- package/skills/07_Computational_Modeling/act-r-model-builder/references/model-patterns.md +197 -0
- package/skills/07_Computational_Modeling/act-r-model-builder/references/parameter-table.yaml +204 -0
- package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/SKILL.md +294 -0
- package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/references/diagnostics-checklist.md +351 -0
- package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/references/prior-selection-guide.md +241 -0
- package/skills/07_Computational_Modeling/parameter-recovery-checker/SKILL.md +269 -0
- package/skills/07_Computational_Modeling/parameter-recovery-checker/references/recovery-diagnostics.md +207 -0
- package/skills/08_Computational_Neuroscience/brain-connectivity-modeler/SKILL.md +317 -0
- package/skills/08_Computational_Neuroscience/brain-connectivity-modeler/references/method-implementation-guide.md +116 -0
- package/skills/08_Computational_Neuroscience/neural-decoding-analysis/SKILL.md +273 -0
- package/skills/08_Computational_Neuroscience/neural-decoding-analysis/references/decoding-methods.md +170 -0
- package/skills/08_Computational_Neuroscience/neural-decoding-analysis/references/rsa-guide.md +266 -0
- package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/SKILL.md +305 -0
- package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/references/data-requirements.md +60 -0
- package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/references/method-comparison.md +151 -0
- package/skills/08_Computational_Neuroscience/spiking-network-model-builder/SKILL.md +376 -0
- package/skills/08_Computational_Neuroscience/spiking-network-model-builder/references/hh-parameters.md +117 -0
- package/skills/08_Computational_Neuroscience/spiking-network-model-builder/references/network-regimes.md +130 -0
- package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/SKILL.md +258 -0
- package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/references/indicator-parameters.md +242 -0
- package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/references/pipeline-details.md +211 -0
- package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/SKILL.md +261 -0
- package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/references/opsin-catalog.md +124 -0
- package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/references/stimulation-parameters.md +304 -0
- package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/SKILL.md +367 -0
- package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/references/disconnection-guide.md +152 -0
- package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/references/vlsm-pipeline.md +182 -0
- package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/SKILL.md +250 -0
- package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/references/deficit-profiles.md +302 -0
- package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/references/test-catalog.md +304 -0
- package/skills/11_Developmental_Cognition/infant-looking-time-designer/SKILL.md +345 -0
- package/skills/11_Developmental_Cognition/infant-looking-time-designer/references/age-parameters.yaml +186 -0
- package/skills/12_Social_Cognition/tom-task-selector/SKILL.md +379 -0
- package/skills/12_Social_Cognition/tom-task-selector/references/task-database.md +317 -0
- package/skills/13_Visualization/nature-figure/README.md +442 -0
- package/skills/13_Visualization/nature-figure/SKILL.md +60 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-01-bar-charts.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-02-line-trends.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-03-heatmaps.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-04-scatter-bubble.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-05-radar-polar.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-06-distributions.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-07-forest-interval.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-08-area-stacked.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-09-image-plates.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-10-network-matrix.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_motivation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_observation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_observation_distillation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_contrastive.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_results_CEDAR.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_results_IEDB.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_schematic.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/RNAGenScape_schematic.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/figures/ablation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/figures/comparison.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/plot_ablation.py +86 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/plot_comparison.py +109 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/diffusion_swiss_roll.py +97 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/diffusion_swiss_roll.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_GeneRegulatory.pdf +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_GeneRegulatory.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_Trajectory.pdf +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_Trajectory.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/figX_comparison_Ablation.pdf +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/figX_comparison_Ablation.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_Ablation.py +64 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_GeneRegulatory.py +74 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_Trajectory.py +74 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/figures/idea.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/figures/illustration.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/plot_idea.py +76 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/plot_illustration.py +404 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_FPGM/figures/freq_prior.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_FPGM/plot_freq_prior.py +146 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_ablation_Cancer.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_ablation_IEDB.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_comparison_Cancer.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_comparison_IEDB.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/plot_bars.py +216 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/raw_data.py +125 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/manifold.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/manifold_holes.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_comparison_optimization.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_comparison_speed.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_sweep.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_comparison.py +228 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_hole_manifold.py +82 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_manifold.py +61 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_sweep.py +77 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/figures/comparison_posttraining.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/figures/comparison_radar.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/plot_comparison_radar.py +173 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/plot_posttraining.py +82 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/brute_force.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/correctness_by_category.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/correctness_by_subcategory.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/rewriting.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/selfcorrection_math.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_brute_force.py +248 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_correctness_by_category.py +132 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_correctness_by_subcategory.py +131 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_rewriting.py +105 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_selfcorrection_math.py +99 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/figures/composition_heatmap.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/figures/trend_by_month.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/plot_composition.py +81 -0
- package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/plot_trend.py +125 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig1-material-mechanism-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig2-spatial-imaging-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig3-in-vivo-efficacy-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig4-single-cell-systems-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/assets/gallery/fig5-validation-perturbation-rich.png +0 -0
- package/skills/13_Visualization/nature-figure/evals/evals.json +37 -0
- package/skills/13_Visualization/nature-figure/manifest.yaml +57 -0
- package/skills/13_Visualization/nature-figure/references/api.md +428 -0
- package/skills/13_Visualization/nature-figure/references/backend-selection.md +100 -0
- package/skills/13_Visualization/nature-figure/references/chart-types.md +281 -0
- package/skills/13_Visualization/nature-figure/references/common-patterns.md +350 -0
- package/skills/13_Visualization/nature-figure/references/demos.md +65 -0
- package/skills/13_Visualization/nature-figure/references/design-theory.md +436 -0
- package/skills/13_Visualization/nature-figure/references/figure-contract.md +93 -0
- package/skills/13_Visualization/nature-figure/references/nature-2026-observations.md +112 -0
- package/skills/13_Visualization/nature-figure/references/qa-contract.md +119 -0
- package/skills/13_Visualization/nature-figure/references/r-template-index.md +66 -0
- package/skills/13_Visualization/nature-figure/references/r-workflow.md +161 -0
- package/skills/13_Visualization/nature-figure/references/tutorials.md +251 -0
- package/skills/13_Visualization/nature-figure/static/core/contract.md +29 -0
- package/skills/13_Visualization/nature-figure/static/core/stance.md +37 -0
- package/skills/13_Visualization/nature-figure/static/fragments/backend/python.md +37 -0
- package/skills/13_Visualization/nature-figure/static/fragments/backend/r.md +44 -0
- package/skills/14_Writing/markdown-report-writing/SKILL.md +306 -0
- package/skills/14_Writing/markdown-report-writing/references/compatibility-matrix.md +72 -0
- package/skills/14_Writing/markdown-report-writing/references/templates.md +299 -0
- package/skills/15_Others/neuroimaging-power-guide/SKILL.md +324 -0
- package/skills/15_Others/neuroimaging-power-guide/references/effect-size-lookup-tables.md +102 -0
- package/skills/15_Others/neuroimaging-sample-size-calculator/SKILL.md +330 -0
- package/skills/15_Others/neuroimaging-sample-size-calculator/references/worked-examples.md +220 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
# Statistics Reference
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
1. [Cluster-Based Permutation Tests](#cluster-permutation)
|
|
5
|
+
2. [Spatio-Temporal Cluster Tests](#spatio-temporal)
|
|
6
|
+
3. [TFCE](#tfce)
|
|
7
|
+
4. [Adjacency Matrices](#adjacency)
|
|
8
|
+
5. [Parametric Tests](#parametric)
|
|
9
|
+
6. [Multiple Comparison Correction](#correction)
|
|
10
|
+
7. [Linear Regression](#regression)
|
|
11
|
+
8. [ERP Quality Metrics](#erp-quality)
|
|
12
|
+
9. [Source Space Statistics](#source-stats)
|
|
13
|
+
|
|
14
|
+
## Cluster-Based Permutation Tests
|
|
15
|
+
|
|
16
|
+
Controls for multiple comparisons by clustering neighboring significant samples (Maris & Oostenveld, 2007):
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
from mne.stats import permutation_cluster_test, permutation_cluster_1samp_test
|
|
20
|
+
|
|
21
|
+
# Two-sample test (comparing two conditions)
|
|
22
|
+
T_obs, clusters, p_values, H0 = permutation_cluster_test(
|
|
23
|
+
[X1, X2], # list of arrays, shape (n_obs, n_times)
|
|
24
|
+
n_permutations=1000,
|
|
25
|
+
tail=0, # 0=two-tailed, 1=right, -1=left
|
|
26
|
+
threshold=None, # None=auto, float, or dict for TFCE
|
|
27
|
+
out_type='mask' # 'mask' or 'indices'
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
# One-sample test (against zero)
|
|
31
|
+
T_obs, clusters, p_values, H0 = permutation_cluster_1samp_test(
|
|
32
|
+
X, # shape (n_obs, n_times)
|
|
33
|
+
n_permutations=1000,
|
|
34
|
+
tail=0
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
# Find significant clusters
|
|
38
|
+
good_clusters = [clusters[i] for i in range(len(clusters)) if p_values[i] < 0.05]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Spatio-Temporal Cluster Tests
|
|
42
|
+
|
|
43
|
+
For data with both spatial and temporal dimensions:
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
from mne.stats import spatio_temporal_cluster_test, spatio_temporal_cluster_1samp_test
|
|
47
|
+
|
|
48
|
+
# Build adjacency matrix
|
|
49
|
+
adjacency, ch_names = mne.channels.find_ch_adjacency(epochs.info, 'eeg')
|
|
50
|
+
|
|
51
|
+
# Data shape: (n_obs, n_times, n_channels) — NOTE: time BEFORE channels!
|
|
52
|
+
X1 = cond1_epochs.get_data().transpose(0, 2, 1) # transpose from (obs, ch, time)
|
|
53
|
+
X2 = cond2_epochs.get_data().transpose(0, 2, 1)
|
|
54
|
+
|
|
55
|
+
# Two-sample
|
|
56
|
+
T_obs, clusters, p_values, H0 = spatio_temporal_cluster_test(
|
|
57
|
+
[X1, X2], adjacency=adjacency, n_permutations=1000)
|
|
58
|
+
|
|
59
|
+
# One-sample
|
|
60
|
+
T_obs, clusters, p_values, H0 = spatio_temporal_cluster_1samp_test(
|
|
61
|
+
X, adjacency=adjacency, n_permutations=1000)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## TFCE
|
|
65
|
+
|
|
66
|
+
Threshold-Free Cluster Enhancement — avoids arbitrary cluster-forming threshold:
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
tfce = dict(start=0.4, step=0.4) # TFCE parameters
|
|
70
|
+
T_obs, clusters, p_values, H0 = spatio_temporal_cluster_test(
|
|
71
|
+
[X1, X2], tfce, adjacency=adjacency, n_permutations=100)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Adjacency Matrices
|
|
75
|
+
|
|
76
|
+
```python
|
|
77
|
+
# From channel layout (most common)
|
|
78
|
+
adjacency, ch_names = mne.channels.find_ch_adjacency(info, ch_type='eeg')
|
|
79
|
+
# or from template: adjacency, ch_names = mne.channels.read_ch_adjacency('biosemi64')
|
|
80
|
+
|
|
81
|
+
# Distance-based
|
|
82
|
+
adjacency = mne.spatial_dist_adjacency(info, dist=0.04)
|
|
83
|
+
|
|
84
|
+
# Source space
|
|
85
|
+
adjacency = mne.spatial_src_adjacency(src)
|
|
86
|
+
adjacency = mne.spatio_temporal_src_adjacency(src, n_times)
|
|
87
|
+
|
|
88
|
+
# Triangulation-based
|
|
89
|
+
adjacency = mne.spatial_tris_adjacency(tris)
|
|
90
|
+
|
|
91
|
+
# Inter-hemisphere
|
|
92
|
+
adjacency = mne.spatial_inter_hemi_adjacency(src, max_dist=0.04)
|
|
93
|
+
|
|
94
|
+
# Combine for multi-dimensional data (time × freq × space)
|
|
95
|
+
adjacency = mne.stats.combine_adjacency(n_times, n_freqs, ch_adjacency)
|
|
96
|
+
|
|
97
|
+
# Visualize
|
|
98
|
+
mne.viz.plot_ch_adjacency(info, adjacency, ch_names)
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Parametric Tests
|
|
102
|
+
|
|
103
|
+
```python
|
|
104
|
+
from mne.stats import (f_oneway, f_mway_rm, f_threshold_mway_rm,
|
|
105
|
+
ttest_1samp_no_p, ttest_ind_no_p)
|
|
106
|
+
|
|
107
|
+
# One-way ANOVA
|
|
108
|
+
F_obs, p_values = f_oneway(X1, X2, X3)
|
|
109
|
+
|
|
110
|
+
# Repeated measures ANOVA
|
|
111
|
+
F_obs, p_values = f_mway_rm(data, factor_levels=[2, 3], effects='A*B')
|
|
112
|
+
# effects: 'A', 'B', 'A:B', 'A*B' (main + interaction)
|
|
113
|
+
|
|
114
|
+
# Get F-threshold for cluster test
|
|
115
|
+
threshold = f_threshold_mway_rm(n_subjects, factor_levels=[2, 3],
|
|
116
|
+
effects='A*B', pvalue=0.05)
|
|
117
|
+
|
|
118
|
+
# T-tests (return t-statistic only, no p-value — for use as cluster threshold)
|
|
119
|
+
t_obs = ttest_1samp_no_p(X)
|
|
120
|
+
t_obs = ttest_ind_no_p(X1, X2)
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Multiple Comparison Correction
|
|
124
|
+
|
|
125
|
+
```python
|
|
126
|
+
from mne.stats import bonferroni_correction, fdr_correction
|
|
127
|
+
|
|
128
|
+
# Bonferroni
|
|
129
|
+
reject_bonf, pval_bonf = bonferroni_correction(p_values, alpha=0.05)
|
|
130
|
+
|
|
131
|
+
# FDR (Benjamini-Hochberg)
|
|
132
|
+
reject_fdr, pval_fdr = fdr_correction(p_values, alpha=0.05, method='indep')
|
|
133
|
+
# method: 'indep' (Benjamini-Hochberg) or 'negcorr' (Benjamini-Yekutieli)
|
|
134
|
+
|
|
135
|
+
# Permutation t-test with t-max correction
|
|
136
|
+
from mne.stats import permutation_t_test
|
|
137
|
+
T_obs, p_values, H0 = permutation_t_test(X, n_permutations=10000, tail=0)
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Linear Regression
|
|
141
|
+
|
|
142
|
+
### On Epochs (with metadata)
|
|
143
|
+
```python
|
|
144
|
+
from mne.stats import linear_regression
|
|
145
|
+
|
|
146
|
+
# epochs.metadata must be a pandas DataFrame
|
|
147
|
+
results = linear_regression(epochs, design_matrix, names=['intercept', 'condition'])
|
|
148
|
+
results['condition'].beta.plot_joint() # regression coefficients as evoked
|
|
149
|
+
results['condition'].t_val.plot_joint() # t-values
|
|
150
|
+
results['condition'].p_val # p-values
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### On Raw (continuous regression, overlap correction)
|
|
154
|
+
```python
|
|
155
|
+
from mne.stats import linear_regression_raw
|
|
156
|
+
|
|
157
|
+
results = linear_regression_raw(
|
|
158
|
+
raw, events, event_id={'stim': 1, 'resp': 2},
|
|
159
|
+
tmin=-0.1, tmax=1.0,
|
|
160
|
+
covariates=None, # dict-like for continuous predictors
|
|
161
|
+
reject=dict(eeg=100e-6),
|
|
162
|
+
decim=10 # important for high sfreq data!
|
|
163
|
+
)
|
|
164
|
+
# Returns dict of Evoked-like objects, one per condition
|
|
165
|
+
results['stim'].plot()
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## ERP Quality Metrics
|
|
169
|
+
|
|
170
|
+
```python
|
|
171
|
+
from mne.stats.erp import compute_sme
|
|
172
|
+
|
|
173
|
+
# Standardized Measurement Error
|
|
174
|
+
sme = compute_sme(epochs) # returns Evoked-like object
|
|
175
|
+
sme.plot()
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
## Source Space Statistics
|
|
179
|
+
|
|
180
|
+
```python
|
|
181
|
+
from mne.stats import summarize_clusters_stc
|
|
182
|
+
|
|
183
|
+
# Visualize significant source-space clusters
|
|
184
|
+
stc_cluster = summarize_clusters_stc(
|
|
185
|
+
clu, # output from cluster test
|
|
186
|
+
tstep=tstep,
|
|
187
|
+
vertices=vertices,
|
|
188
|
+
subject='fsaverage'
|
|
189
|
+
)
|
|
190
|
+
stc_cluster.plot(subject='fsaverage', subjects_dir=subjects_dir)
|
|
191
|
+
|
|
192
|
+
# Bootstrap confidence intervals
|
|
193
|
+
from mne.stats import bootstrap_confidence_interval
|
|
194
|
+
ci = bootstrap_confidence_interval(data, ci=0.95, n_bootstraps=2000,
|
|
195
|
+
stat_fun='mean')
|
|
196
|
+
```
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Time-Frequency Analysis Reference
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
1. [Power Spectral Density (PSD)](#psd)
|
|
5
|
+
2. [Time-Frequency Representations (TFR)](#tfr)
|
|
6
|
+
3. [Cross-Spectral Density (CSD)](#csd)
|
|
7
|
+
4. [Array-Level Functions](#array-level)
|
|
8
|
+
5. [Baseline Correction Modes](#baseline-modes)
|
|
9
|
+
6. [Parameter Selection Guide](#parameter-guide)
|
|
10
|
+
|
|
11
|
+
## PSD
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
# New API (recommended)
|
|
15
|
+
psd = raw.compute_psd(method='welch', fmin=0.5, fmax=50.)
|
|
16
|
+
psd = raw.compute_psd(method='multitaper', fmin=0.5, fmax=50.)
|
|
17
|
+
psd = epochs.compute_psd(method='multitaper')
|
|
18
|
+
|
|
19
|
+
# Plotting
|
|
20
|
+
psd.plot() # PSD curves
|
|
21
|
+
psd.plot_topomap(normalize=True) # topographic PSD
|
|
22
|
+
psd.plot_topo() # per-channel in layout
|
|
23
|
+
|
|
24
|
+
# Array-level
|
|
25
|
+
from mne.time_frequency import psd_array_welch, psd_array_multitaper
|
|
26
|
+
psds, freqs = psd_array_welch(data, sfreq, fmin=0.5, fmax=50., n_fft=256)
|
|
27
|
+
psds, freqs = psd_array_multitaper(data, sfreq, fmin=0.5, fmax=50., bandwidth=4.)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## TFR
|
|
31
|
+
|
|
32
|
+
### New API (recommended)
|
|
33
|
+
```python
|
|
34
|
+
import numpy as np
|
|
35
|
+
freqs = np.arange(4, 30, 2)
|
|
36
|
+
|
|
37
|
+
# Morlet wavelets
|
|
38
|
+
power = epochs.compute_tfr(method="morlet", freqs=freqs, n_cycles=freqs / 2.,
|
|
39
|
+
average=True, return_itc=True, decim=3)
|
|
40
|
+
|
|
41
|
+
# Multitaper (better frequency resolution)
|
|
42
|
+
power = epochs.compute_tfr(method="multitaper", freqs=freqs,
|
|
43
|
+
n_cycles=freqs / 2., time_bandwidth=4.0)
|
|
44
|
+
|
|
45
|
+
# Stockwell transform (adaptive resolution)
|
|
46
|
+
power = epochs.compute_tfr(method="stockwell", fmin=6, fmax=35)
|
|
47
|
+
|
|
48
|
+
# Per-epoch TFR (no averaging)
|
|
49
|
+
power_epochs = epochs.compute_tfr(method="morlet", freqs=freqs,
|
|
50
|
+
n_cycles=freqs / 2., average=False)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Inter-Trial Coherence (ITC)
|
|
54
|
+
```python
|
|
55
|
+
power, itc = epochs.compute_tfr(method="morlet", freqs=freqs,
|
|
56
|
+
n_cycles=freqs / 2., return_itc=True)
|
|
57
|
+
# ITC ranges from 0 (no phase consistency) to 1 (perfect phase locking)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### TFR Visualization
|
|
61
|
+
```python
|
|
62
|
+
power.plot(picks='Cz', baseline=(-0.5, 0), mode='logratio') # single channel
|
|
63
|
+
power.plot_topo(baseline=(-0.5, 0), mode='logratio') # all channels
|
|
64
|
+
power.plot_topomap(tmin=0.1, tmax=0.3, fmin=8, fmax=12) # time-freq window
|
|
65
|
+
power.plot_joint(baseline=(-0.5, 0), mode='mean') # TFR + topomaps
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Legacy API (still works but deprecated)
|
|
69
|
+
```python
|
|
70
|
+
from mne.time_frequency import tfr_morlet, tfr_multitaper, tfr_stockwell
|
|
71
|
+
power, itc = tfr_morlet(epochs, freqs, n_cycles)
|
|
72
|
+
power = tfr_multitaper(epochs, freqs, n_cycles, time_bandwidth=4.0)
|
|
73
|
+
power = tfr_stockwell(epochs, fmin=6, fmax=35)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## CSD
|
|
77
|
+
|
|
78
|
+
Cross-spectral density for beamformer source localization:
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
from mne.time_frequency import csd_morlet, csd_multitaper, csd_fourier, csd_tfr
|
|
82
|
+
|
|
83
|
+
# From epochs
|
|
84
|
+
csd = csd_morlet(epochs, freqs=[10, 20], n_cycles=7)
|
|
85
|
+
csd = csd_multitaper(epochs, fmin=7, fmax=30, bandwidth=4.)
|
|
86
|
+
csd = csd_fourier(epochs, fmin=7, fmax=30)
|
|
87
|
+
|
|
88
|
+
# From TFR
|
|
89
|
+
csd = csd_tfr(epochs_tfr)
|
|
90
|
+
|
|
91
|
+
# Array-level
|
|
92
|
+
from mne.time_frequency import csd_array_morlet, csd_array_multitaper, csd_array_fourier
|
|
93
|
+
csd = csd_array_morlet(data, sfreq, freqs)
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Array-Level Functions
|
|
97
|
+
|
|
98
|
+
For working directly with numpy arrays:
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
from mne.time_frequency import (
|
|
102
|
+
tfr_array_morlet, tfr_array_multitaper, tfr_array_stockwell,
|
|
103
|
+
morlet, dpss_windows, fwhm, stft, istft, stftfreq
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
# TFR on arrays — data shape: (n_epochs, n_channels, n_times)
|
|
107
|
+
out = tfr_array_morlet(data, sfreq, freqs, n_cycles,
|
|
108
|
+
output='power') # 'complex', 'power', 'phase',
|
|
109
|
+
# 'avg_power', 'itc', 'avg_power_itc'
|
|
110
|
+
|
|
111
|
+
out = tfr_array_multitaper(data, sfreq, freqs, n_cycles, time_bandwidth=4.0)
|
|
112
|
+
out = tfr_array_stockwell(data, sfreq, fmin=6, fmax=35)
|
|
113
|
+
|
|
114
|
+
# Generate wavelets
|
|
115
|
+
Ws = morlet(sfreq=256., freqs=[10, 20], n_cycles=7)
|
|
116
|
+
|
|
117
|
+
# DPSS tapers
|
|
118
|
+
tapers, eigenvalues = dpss_windows(N=256, half_nbw=4, Kmax=3)
|
|
119
|
+
|
|
120
|
+
# FWHM of Morlet wavelet (Cohen, 2019)
|
|
121
|
+
width = fwhm(freq=10., n_cycles=7)
|
|
122
|
+
|
|
123
|
+
# Short-time Fourier transform
|
|
124
|
+
X = stft(data, wsize=256, tstep=128)
|
|
125
|
+
x_reconstructed = istft(X, tstep=128)
|
|
126
|
+
freqs = stftfreq(wsize=256, sfreq=256.)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Baseline Correction Modes
|
|
130
|
+
|
|
131
|
+
```python
|
|
132
|
+
power.apply_baseline(baseline=(-0.5, 0), mode='logratio')
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
| Mode | Formula | Use case |
|
|
136
|
+
|------|---------|----------|
|
|
137
|
+
| `'mean'` | data - mean | Subtract baseline mean |
|
|
138
|
+
| `'ratio'` | data / mean | Ratio to baseline |
|
|
139
|
+
| `'logratio'` | log(data / mean) | dB-like, symmetric, most common |
|
|
140
|
+
| `'percent'` | (data - mean) / mean × 100 | Percent change |
|
|
141
|
+
| `'zscore'` | (data - mean) / std | Z-score normalization |
|
|
142
|
+
| `'zlogratio'` | (log(data) - log(mean)) / std(log) | Z-score of log ratio |
|
|
143
|
+
|
|
144
|
+
## Parameter Selection Guide
|
|
145
|
+
|
|
146
|
+
### n_cycles
|
|
147
|
+
- Lower values → better time resolution, worse frequency resolution
|
|
148
|
+
- Higher values → better frequency resolution, worse time resolution
|
|
149
|
+
- `n_cycles = freqs / 2.` — adaptive heuristic (common default)
|
|
150
|
+
- `n_cycles = 7` — fixed, good for narrow-band analysis
|
|
151
|
+
|
|
152
|
+
### time_bandwidth (multitaper only)
|
|
153
|
+
- Controls number of tapers: `n_tapers = int(time_bandwidth - 1)`
|
|
154
|
+
- Higher → smoother estimate, more frequency smoothing
|
|
155
|
+
- Default: 4.0 (gives 3 tapers)
|
|
156
|
+
|
|
157
|
+
### decim
|
|
158
|
+
- Decimation factor applied after TFR computation
|
|
159
|
+
- Reduces output size and speeds up computation
|
|
160
|
+
- Set to avoid aliasing (decim should not exceed Nyquist for your frequency range)
|
|
161
|
+
|
|
162
|
+
### Choosing method
|
|
163
|
+
- **Morlet**: Good general-purpose, adjustable time-frequency tradeoff
|
|
164
|
+
- **Multitaper**: Better for narrow-band, reduces spectral leakage
|
|
165
|
+
- **Stockwell**: Adaptive resolution, no n_cycles parameter needed
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# Visualization Reference
|
|
2
|
+
|
|
3
|
+
## Table of Contents
|
|
4
|
+
1. [Raw Data](#raw)
|
|
5
|
+
2. [Epochs](#epochs)
|
|
6
|
+
3. [Evoked](#evoked)
|
|
7
|
+
4. [Topomaps](#topomaps)
|
|
8
|
+
5. [Time-Frequency](#tfr)
|
|
9
|
+
6. [Source Estimates](#source)
|
|
10
|
+
7. [ICA](#ica)
|
|
11
|
+
8. [Sensors and Layout](#sensors)
|
|
12
|
+
9. [Publication Figures](#publication)
|
|
13
|
+
10. [Report Generation](#report)
|
|
14
|
+
11. [3D Backend](#3d-backend)
|
|
15
|
+
|
|
16
|
+
## Raw Data
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
raw.plot(duration=5, n_channels=30, scalings='auto') # interactive browser
|
|
20
|
+
raw.compute_psd(fmax=50).plot() # PSD curves
|
|
21
|
+
raw.compute_psd().plot_topomap(normalize=True) # PSD topomap
|
|
22
|
+
raw.plot_sensors(show_names=True) # sensor positions
|
|
23
|
+
raw.plot_sensors(kind='3d') # 3D sensor positions
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Epochs
|
|
27
|
+
|
|
28
|
+
```python
|
|
29
|
+
epochs.plot(n_epochs=20, n_channels=20) # interactive (click to mark bad)
|
|
30
|
+
epochs.plot_image(picks='eeg') # ERP image (trials × time heatmap)
|
|
31
|
+
epochs.plot_drop_log() # rejection statistics
|
|
32
|
+
epochs.plot_topo_image() # topographic image
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Evoked
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
evoked.plot() # butterfly plot
|
|
39
|
+
evoked.plot_joint() # butterfly + topomaps at peaks
|
|
40
|
+
evoked.plot_topomap(times=[0.1, 0.2, 0.3]) # scalp topographies
|
|
41
|
+
evoked.plot_image() # channels × time heatmap
|
|
42
|
+
evoked.plot_topo() # per-channel in layout
|
|
43
|
+
evoked.plot_white(noise_cov) # whitened (check noise model)
|
|
44
|
+
|
|
45
|
+
# Compare conditions
|
|
46
|
+
mne.viz.plot_compare_evokeds(
|
|
47
|
+
{'auditory': evoked_aud, 'visual': evoked_vis},
|
|
48
|
+
picks='Cz', ci=0.95)
|
|
49
|
+
|
|
50
|
+
# Field maps
|
|
51
|
+
maps = mne.make_field_map(evoked, trans, subject, subjects_dir)
|
|
52
|
+
mne.viz.plot_evoked_field(evoked, maps)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Topomaps
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
# Generic topomap from array
|
|
59
|
+
mne.viz.plot_topomap(data, info,
|
|
60
|
+
cmap='RdBu_r',
|
|
61
|
+
vlim=(-3, 3),
|
|
62
|
+
contours=6,
|
|
63
|
+
sensors=True,
|
|
64
|
+
show_names=False,
|
|
65
|
+
mask=significant_channels,
|
|
66
|
+
outlines='head')
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Time-Frequency
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
power.plot(picks='Cz', baseline=(-0.5, 0), mode='logratio') # single channel
|
|
73
|
+
power.plot_topo(baseline=(-0.5, 0), mode='logratio') # all channels
|
|
74
|
+
power.plot_topomap(tmin=0.1, tmax=0.3, fmin=8, fmax=12) # time-freq window
|
|
75
|
+
power.plot_joint(baseline=(-0.5, 0), mode='mean') # TFR + topomaps
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Source Estimates
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
# 3D brain (requires PyVista)
|
|
82
|
+
stc.plot(subject, subjects_dir=subjects_dir, hemi='both',
|
|
83
|
+
surface='inflated', views='lateral', time_viewer=True)
|
|
84
|
+
|
|
85
|
+
# Split view
|
|
86
|
+
brain = stc.plot(subject, hemi='split', size=(800, 400),
|
|
87
|
+
views='lateral', surface='inflated')
|
|
88
|
+
|
|
89
|
+
# Add markers
|
|
90
|
+
brain.add_foci(vertex_id, hemi='rh', color='yellow')
|
|
91
|
+
brain.add_text(0.1, 0.9, 'Peak activation', font_size=14)
|
|
92
|
+
|
|
93
|
+
# Save screenshot
|
|
94
|
+
brain.save_image('brain.png')
|
|
95
|
+
|
|
96
|
+
# Volume source estimates
|
|
97
|
+
mne.viz.plot_volume_source_estimates(stc_vol, src,
|
|
98
|
+
subject=subject, subjects_dir=subjects_dir)
|
|
99
|
+
|
|
100
|
+
# Vector source estimates
|
|
101
|
+
mne.viz.plot_vector_source_estimates(stc_vec, subject=subject)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## ICA
|
|
105
|
+
|
|
106
|
+
```python
|
|
107
|
+
ica.plot_components(picks=range(20)) # component topographies
|
|
108
|
+
ica.plot_sources(raw) # component time courses
|
|
109
|
+
ica.plot_properties(raw, picks=[0, 1, 2]) # detailed per-component
|
|
110
|
+
ica.plot_scores(eog_scores) # correlation scores
|
|
111
|
+
ica.plot_overlay(raw, exclude=[0, 1]) # before/after overlay
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Sensors and Layout
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
raw.plot_sensors(show_names=True, kind='topomap') # 2D sensor map
|
|
118
|
+
mne.viz.plot_montage(mne.channels.make_standard_montage('standard_1020'))
|
|
119
|
+
mne.viz.plot_layout(mne.channels.find_layout(info))
|
|
120
|
+
|
|
121
|
+
# Coregistration check
|
|
122
|
+
mne.viz.plot_alignment(info, trans, subject, subjects_dir,
|
|
123
|
+
surfaces=['head', 'brain'], meg='sensors', eeg='original')
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Publication Figures
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
import matplotlib.pyplot as plt
|
|
130
|
+
|
|
131
|
+
# Custom multi-panel figure
|
|
132
|
+
fig, axes = plt.subplots(1, 3, figsize=(12, 4))
|
|
133
|
+
evoked.plot_topomap(times=[0.1, 0.2, 0.3], axes=axes, show=False,
|
|
134
|
+
colorbar=False)
|
|
135
|
+
fig.savefig('figure.pdf', dpi=300, bbox_inches='tight')
|
|
136
|
+
|
|
137
|
+
# Combine evoked with brain screenshot
|
|
138
|
+
fig, axes = plt.subplots(2, 1, figsize=(4.5, 3),
|
|
139
|
+
gridspec_kw=dict(height_ratios=[3, 4]))
|
|
140
|
+
evoked.plot(axes=axes[0], show=False)
|
|
141
|
+
axes[1].imshow(brain_screenshot)
|
|
142
|
+
axes[1].axis('off')
|
|
143
|
+
|
|
144
|
+
# Brain colorbar
|
|
145
|
+
from mpl_toolkits.axes_grid1 import make_axes_locatable
|
|
146
|
+
divider = make_axes_locatable(axes[1])
|
|
147
|
+
cax = divider.append_axes('right', size='5%', pad=0.2)
|
|
148
|
+
mne.viz.plot_brain_colorbar(cax, clim, colormap, label='Activation')
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Report Generation
|
|
152
|
+
|
|
153
|
+
```python
|
|
154
|
+
report = mne.Report(title='EEG Analysis')
|
|
155
|
+
report.add_raw(raw, title='Raw Data', psd=True)
|
|
156
|
+
report.add_epochs(epochs, title='Epochs')
|
|
157
|
+
report.add_evokeds(evoked, titles=['Auditory'])
|
|
158
|
+
report.add_ica(ica, title='ICA', inst=raw)
|
|
159
|
+
report.add_covariance(noise_cov, info, title='Noise Covariance')
|
|
160
|
+
report.add_forward(fwd, title='Forward Solution')
|
|
161
|
+
report.add_inverse_operator(inv, title='Inverse Operator')
|
|
162
|
+
report.add_stc(stc, title='Source Estimate',
|
|
163
|
+
subject=subject, subjects_dir=subjects_dir)
|
|
164
|
+
report.save('report.html', overwrite=True, open_browser=False)
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## 3D Backend
|
|
168
|
+
|
|
169
|
+
```python
|
|
170
|
+
mne.viz.set_3d_backend('pyvistaqt') # desktop (default)
|
|
171
|
+
mne.viz.set_3d_backend('notebook') # Jupyter notebook
|
|
172
|
+
|
|
173
|
+
# Browser backend for 2D plots
|
|
174
|
+
mne.viz.set_browser_backend('matplotlib') # or 'qt'
|
|
175
|
+
```
|