@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.
Files changed (229) hide show
  1. package/dist/index.d.ts +6 -0
  2. package/dist/index.d.ts.map +1 -0
  3. package/dist/index.js +28 -0
  4. package/dist/index.js.map +1 -0
  5. package/package.json +35 -0
  6. package/skills/01_Meta-Skills/contribute-skill/SKILL.md +277 -0
  7. package/skills/01_Meta-Skills/contribute-skills-via-pr/SKILL.md +163 -0
  8. package/skills/01_Meta-Skills/paper-to-skill/SKILL.md +435 -0
  9. package/skills/01_Meta-Skills/paper-to-skill/references/extraction-guide.md +286 -0
  10. package/skills/01_Meta-Skills/paper-to-skill/references/skill-template.md +250 -0
  11. package/skills/01_Meta-Skills/repo-to-skill/SKILL.md +289 -0
  12. package/skills/01_Meta-Skills/share-case/SKILL.md +253 -0
  13. package/skills/01_Meta-Skills/share-usage/README.md +63 -0
  14. package/skills/01_Meta-Skills/share-usage/SKILL.md +395 -0
  15. package/skills/01_Meta-Skills/verify-skill/SKILL.md +331 -0
  16. package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/SKILL.md +194 -0
  17. package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/references/effect-sizes.md +352 -0
  18. package/skills/02_Cross-Domain_Foundation/cogsci-power-analysis/references/sample-size-guide.md +407 -0
  19. package/skills/02_Cross-Domain_Foundation/cogsci-statistics/SKILL.md +361 -0
  20. package/skills/02_Cross-Domain_Foundation/cogsci-statistics/references/common-analyses.md +517 -0
  21. package/skills/02_Cross-Domain_Foundation/cogsci-visualization/SKILL.md +292 -0
  22. package/skills/02_Cross-Domain_Foundation/cogsci-visualization/references/plot-recipes.md +709 -0
  23. package/skills/02_Cross-Domain_Foundation/research-literacy/SKILL.md +286 -0
  24. package/skills/02_Cross-Domain_Foundation/research-literacy/references/common-assumptions.md +320 -0
  25. package/skills/02_Cross-Domain_Foundation/research-literacy/references/planning-template.md +143 -0
  26. package/skills/03_Cognitive_Psychology/alternative-uses-task-designer/SKILL.md +197 -0
  27. package/skills/03_Cognitive_Psychology/alternative-uses-task-designer/references/instruction-templates.md +60 -0
  28. package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/SKILL.md +246 -0
  29. package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/references/classic-paradigms.md +435 -0
  30. package/skills/03_Cognitive_Psychology/cognitive-paradigm-design/references/design-principles.md +256 -0
  31. package/skills/03_Cognitive_Psychology/creativity-self-efficacy-mediation/SKILL.md +270 -0
  32. package/skills/03_Cognitive_Psychology/creativity-self-efficacy-mediation/references/lavaan-templates.md +172 -0
  33. package/skills/03_Cognitive_Psychology/divergent-thinking-scoring/SKILL.md +238 -0
  34. package/skills/03_Cognitive_Psychology/divergent-thinking-scoring/references/scoring-rubric.md +143 -0
  35. package/skills/03_Cognitive_Psychology/drift-diffusion-model/SKILL.md +203 -0
  36. package/skills/03_Cognitive_Psychology/drift-diffusion-model/references/fitting-guide.md +571 -0
  37. package/skills/03_Cognitive_Psychology/drift-diffusion-model/references/model-variants.md +427 -0
  38. package/skills/03_Cognitive_Psychology/evidence-accumulation-selector/SKILL.md +310 -0
  39. package/skills/03_Cognitive_Psychology/evidence-accumulation-selector/references/ez-diffusion-formulas.md +137 -0
  40. package/skills/03_Cognitive_Psychology/signal-detection-analysis/SKILL.md +300 -0
  41. package/skills/03_Cognitive_Psychology/signal-detection-analysis/references/application-guide.md +278 -0
  42. package/skills/03_Cognitive_Psychology/signal-detection-analysis/references/sdt-formulas.md +318 -0
  43. package/skills/03_Cognitive_Psychology/visual-search-array-generator/SKILL.md +283 -0
  44. package/skills/03_Cognitive_Psychology/visual-search-array-generator/references/array-generation-parameters.yaml +111 -0
  45. package/skills/04_Psycholinguistics/reading-time-analysis/SKILL.md +301 -0
  46. package/skills/04_Psycholinguistics/reading-time-analysis/references/measure-computation-guide.md +195 -0
  47. package/skills/04_Psycholinguistics/self-paced-reading-designer/SKILL.md +257 -0
  48. package/skills/04_Psycholinguistics/self-paced-reading-designer/references/analysis-guide.md +356 -0
  49. package/skills/04_Psycholinguistics/self-paced-reading-designer/references/region-segmentation.md +266 -0
  50. package/skills/04_Psycholinguistics/sentence-stimulus-norming/SKILL.md +346 -0
  51. package/skills/04_Psycholinguistics/sentence-stimulus-norming/references/lexical-databases-guide.md +184 -0
  52. package/skills/05_EEG_ERP/eeg-paradigm-designer/SKILL.md +226 -0
  53. package/skills/05_EEG_ERP/eeg-paradigm-designer/references/component-paradigm-map.md +276 -0
  54. package/skills/05_EEG_ERP/eeg-paradigm-designer/references/timing-parameters.md +244 -0
  55. package/skills/05_EEG_ERP/eeg-preprocessing-pipeline-guide/SKILL.md +367 -0
  56. package/skills/05_EEG_ERP/eeg-preprocessing-pipeline-guide/references/parameter-lookup-tables.md +138 -0
  57. package/skills/05_EEG_ERP/erp-analysis/SKILL.md +185 -0
  58. package/skills/05_EEG_ERP/erp-analysis/references/erp-components.md +447 -0
  59. package/skills/05_EEG_ERP/erp-analysis/references/preprocessing-pipeline.md +277 -0
  60. package/skills/05_EEG_ERP/erp-analysis/references/statistical-approaches.md +351 -0
  61. package/skills/05_EEG_ERP/mne-python-guide/SKILL.md +174 -0
  62. package/skills/05_EEG_ERP/mne-python-guide/references/decoding.md +178 -0
  63. package/skills/05_EEG_ERP/mne-python-guide/references/io_formats.md +160 -0
  64. package/skills/05_EEG_ERP/mne-python-guide/references/preprocessing.md +259 -0
  65. package/skills/05_EEG_ERP/mne-python-guide/references/simulation.md +173 -0
  66. package/skills/05_EEG_ERP/mne-python-guide/references/source_localization.md +234 -0
  67. package/skills/05_EEG_ERP/mne-python-guide/references/statistics.md +196 -0
  68. package/skills/05_EEG_ERP/mne-python-guide/references/time_frequency.md +165 -0
  69. package/skills/05_EEG_ERP/mne-python-guide/references/visualization.md +175 -0
  70. package/skills/06_fMRI_Neuroimaging/brain-connectivity-modeler/SKILL.md +317 -0
  71. package/skills/06_fMRI_Neuroimaging/brain-connectivity-modeler/references/method-implementation-guide.md +116 -0
  72. package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/SKILL.md +296 -0
  73. package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/references/design-matrix-guide.md +214 -0
  74. package/skills/06_fMRI_Neuroimaging/fmri-glm-analysis-guide/references/statistical-inference.md +288 -0
  75. package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/SKILL.md +274 -0
  76. package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/references/quality-control.md +336 -0
  77. package/skills/06_fMRI_Neuroimaging/fmri-preprocessing-pipeline-guide/references/step-by-step-pipeline.md +380 -0
  78. package/skills/06_fMRI_Neuroimaging/fmri-task-design-guide/SKILL.md +264 -0
  79. package/skills/06_fMRI_Neuroimaging/fmri-task-design-guide/references/design-optimization-examples.md +114 -0
  80. package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/SKILL.md +273 -0
  81. package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/references/decoding-methods.md +170 -0
  82. package/skills/06_fMRI_Neuroimaging/neural-decoding-analysis/references/rsa-guide.md +266 -0
  83. package/skills/06_fMRI_Neuroimaging/pycortex-guide/SKILL.md +123 -0
  84. package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/database-subjects.md +179 -0
  85. package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/dataset-types.md +208 -0
  86. package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/freesurfer-fmriprep.md +162 -0
  87. package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/mapping-transforms.md +181 -0
  88. package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/mni-utils.md +207 -0
  89. package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/surface-analysis.md +219 -0
  90. package/skills/06_fMRI_Neuroimaging/pycortex-guide/references/visualization.md +251 -0
  91. package/skills/07_Computational_Modeling/act-r-model-builder/SKILL.md +297 -0
  92. package/skills/07_Computational_Modeling/act-r-model-builder/references/model-patterns.md +197 -0
  93. package/skills/07_Computational_Modeling/act-r-model-builder/references/parameter-table.yaml +204 -0
  94. package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/SKILL.md +294 -0
  95. package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/references/diagnostics-checklist.md +351 -0
  96. package/skills/07_Computational_Modeling/bayesian-cognitive-model-builder/references/prior-selection-guide.md +241 -0
  97. package/skills/07_Computational_Modeling/parameter-recovery-checker/SKILL.md +269 -0
  98. package/skills/07_Computational_Modeling/parameter-recovery-checker/references/recovery-diagnostics.md +207 -0
  99. package/skills/08_Computational_Neuroscience/brain-connectivity-modeler/SKILL.md +317 -0
  100. package/skills/08_Computational_Neuroscience/brain-connectivity-modeler/references/method-implementation-guide.md +116 -0
  101. package/skills/08_Computational_Neuroscience/neural-decoding-analysis/SKILL.md +273 -0
  102. package/skills/08_Computational_Neuroscience/neural-decoding-analysis/references/decoding-methods.md +170 -0
  103. package/skills/08_Computational_Neuroscience/neural-decoding-analysis/references/rsa-guide.md +266 -0
  104. package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/SKILL.md +305 -0
  105. package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/references/data-requirements.md +60 -0
  106. package/skills/08_Computational_Neuroscience/neural-population-analysis-guide/references/method-comparison.md +151 -0
  107. package/skills/08_Computational_Neuroscience/spiking-network-model-builder/SKILL.md +376 -0
  108. package/skills/08_Computational_Neuroscience/spiking-network-model-builder/references/hh-parameters.md +117 -0
  109. package/skills/08_Computational_Neuroscience/spiking-network-model-builder/references/network-regimes.md +130 -0
  110. package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/SKILL.md +258 -0
  111. package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/references/indicator-parameters.md +242 -0
  112. package/skills/09_Cellular_Molecular_Neuroscience/calcium-imaging-analysis-guide/references/pipeline-details.md +211 -0
  113. package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/SKILL.md +261 -0
  114. package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/references/opsin-catalog.md +124 -0
  115. package/skills/09_Cellular_Molecular_Neuroscience/optogenetics-protocol-designer/references/stimulation-parameters.md +304 -0
  116. package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/SKILL.md +367 -0
  117. package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/references/disconnection-guide.md +152 -0
  118. package/skills/10_Clinical_Neuropsychology/lesion-symptom-mapping-guide/references/vlsm-pipeline.md +182 -0
  119. package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/SKILL.md +250 -0
  120. package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/references/deficit-profiles.md +302 -0
  121. package/skills/10_Clinical_Neuropsychology/neuropsych-battery-selector/references/test-catalog.md +304 -0
  122. package/skills/11_Developmental_Cognition/infant-looking-time-designer/SKILL.md +345 -0
  123. package/skills/11_Developmental_Cognition/infant-looking-time-designer/references/age-parameters.yaml +186 -0
  124. package/skills/12_Social_Cognition/tom-task-selector/SKILL.md +379 -0
  125. package/skills/12_Social_Cognition/tom-task-selector/references/task-database.md +317 -0
  126. package/skills/13_Visualization/nature-figure/README.md +442 -0
  127. package/skills/13_Visualization/nature-figure/SKILL.md +60 -0
  128. package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-01-bar-charts.png +0 -0
  129. package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-02-line-trends.png +0 -0
  130. package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-03-heatmaps.png +0 -0
  131. package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-04-scatter-bubble.png +0 -0
  132. package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-05-radar-polar.png +0 -0
  133. package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-06-distributions.png +0 -0
  134. package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-07-forest-interval.png +0 -0
  135. package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-08-area-stacked.png +0 -0
  136. package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-09-image-plates.png +0 -0
  137. package/skills/13_Visualization/nature-figure/assets/chart-atlas/atlas-10-network-matrix.png +0 -0
  138. package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_motivation.png +0 -0
  139. package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_observation.png +0 -0
  140. package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/Dispersion_observation_distillation.png +0 -0
  141. package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_contrastive.png +0 -0
  142. package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_results_CEDAR.png +0 -0
  143. package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_results_IEDB.png +0 -0
  144. package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/ImmunoStruct_schematic.png +0 -0
  145. package/skills/13_Visualization/nature-figure/assets/figures4papers/assets/RNAGenScape_schematic.png +0 -0
  146. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/figures/ablation.png +0 -0
  147. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/figures/comparison.png +0 -0
  148. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/plot_ablation.py +86 -0
  149. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_CellSpliceNet/plot_comparison.py +109 -0
  150. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/diffusion_swiss_roll.py +97 -0
  151. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/diffusion_swiss_roll.png +0 -0
  152. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_GeneRegulatory.pdf +0 -0
  153. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_GeneRegulatory.png +0 -0
  154. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_Trajectory.pdf +0 -0
  155. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/fig2_comparison_Trajectory.png +0 -0
  156. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/figX_comparison_Ablation.pdf +0 -0
  157. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/figures/figX_comparison_Ablation.png +0 -0
  158. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_Ablation.py +64 -0
  159. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_GeneRegulatory.py +74 -0
  160. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Cflows/plot_comparison_Trajectory.py +74 -0
  161. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/figures/idea.png +0 -0
  162. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/figures/illustration.png +0 -0
  163. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/plot_idea.py +76 -0
  164. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_Dispersion/plot_illustration.py +404 -0
  165. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_FPGM/figures/freq_prior.png +0 -0
  166. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_FPGM/plot_freq_prior.py +146 -0
  167. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_ablation_Cancer.png +0 -0
  168. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_ablation_IEDB.png +0 -0
  169. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_comparison_Cancer.png +0 -0
  170. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/figures/bars_comparison_IEDB.png +0 -0
  171. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/plot_bars.py +216 -0
  172. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ImmunoStruct/raw_data.py +125 -0
  173. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/manifold.png +0 -0
  174. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/manifold_holes.png +0 -0
  175. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_comparison_optimization.png +0 -0
  176. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_comparison_speed.png +0 -0
  177. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/figures/results_sweep.png +0 -0
  178. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_comparison.py +228 -0
  179. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_hole_manifold.py +82 -0
  180. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_manifold.py +61 -0
  181. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_RNAGenScape/plot_sweep.py +77 -0
  182. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/figures/comparison_posttraining.png +0 -0
  183. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/figures/comparison_radar.png +0 -0
  184. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/plot_comparison_radar.py +173 -0
  185. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_VIGIL/plot_posttraining.py +82 -0
  186. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/brute_force.png +0 -0
  187. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/correctness_by_category.png +0 -0
  188. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/correctness_by_subcategory.png +0 -0
  189. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/rewriting.png +0 -0
  190. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/figures/selfcorrection_math.png +0 -0
  191. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_brute_force.py +248 -0
  192. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_correctness_by_category.py +132 -0
  193. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_correctness_by_subcategory.py +131 -0
  194. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_rewriting.py +105 -0
  195. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_brainteaser/plot_selfcorrection_math.py +99 -0
  196. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/figures/composition_heatmap.png +0 -0
  197. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/figures/trend_by_month.png +0 -0
  198. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/plot_composition.py +81 -0
  199. package/skills/13_Visualization/nature-figure/assets/figures4papers/figure_ophthal_review/plot_trend.py +125 -0
  200. package/skills/13_Visualization/nature-figure/assets/gallery/fig1-material-mechanism-rich.png +0 -0
  201. package/skills/13_Visualization/nature-figure/assets/gallery/fig2-spatial-imaging-rich.png +0 -0
  202. package/skills/13_Visualization/nature-figure/assets/gallery/fig3-in-vivo-efficacy-rich.png +0 -0
  203. package/skills/13_Visualization/nature-figure/assets/gallery/fig4-single-cell-systems-rich.png +0 -0
  204. package/skills/13_Visualization/nature-figure/assets/gallery/fig5-validation-perturbation-rich.png +0 -0
  205. package/skills/13_Visualization/nature-figure/evals/evals.json +37 -0
  206. package/skills/13_Visualization/nature-figure/manifest.yaml +57 -0
  207. package/skills/13_Visualization/nature-figure/references/api.md +428 -0
  208. package/skills/13_Visualization/nature-figure/references/backend-selection.md +100 -0
  209. package/skills/13_Visualization/nature-figure/references/chart-types.md +281 -0
  210. package/skills/13_Visualization/nature-figure/references/common-patterns.md +350 -0
  211. package/skills/13_Visualization/nature-figure/references/demos.md +65 -0
  212. package/skills/13_Visualization/nature-figure/references/design-theory.md +436 -0
  213. package/skills/13_Visualization/nature-figure/references/figure-contract.md +93 -0
  214. package/skills/13_Visualization/nature-figure/references/nature-2026-observations.md +112 -0
  215. package/skills/13_Visualization/nature-figure/references/qa-contract.md +119 -0
  216. package/skills/13_Visualization/nature-figure/references/r-template-index.md +66 -0
  217. package/skills/13_Visualization/nature-figure/references/r-workflow.md +161 -0
  218. package/skills/13_Visualization/nature-figure/references/tutorials.md +251 -0
  219. package/skills/13_Visualization/nature-figure/static/core/contract.md +29 -0
  220. package/skills/13_Visualization/nature-figure/static/core/stance.md +37 -0
  221. package/skills/13_Visualization/nature-figure/static/fragments/backend/python.md +37 -0
  222. package/skills/13_Visualization/nature-figure/static/fragments/backend/r.md +44 -0
  223. package/skills/14_Writing/markdown-report-writing/SKILL.md +306 -0
  224. package/skills/14_Writing/markdown-report-writing/references/compatibility-matrix.md +72 -0
  225. package/skills/14_Writing/markdown-report-writing/references/templates.md +299 -0
  226. package/skills/15_Others/neuroimaging-power-guide/SKILL.md +324 -0
  227. package/skills/15_Others/neuroimaging-power-guide/references/effect-size-lookup-tables.md +102 -0
  228. package/skills/15_Others/neuroimaging-sample-size-calculator/SKILL.md +330 -0
  229. package/skills/15_Others/neuroimaging-sample-size-calculator/references/worked-examples.md +220 -0
@@ -0,0 +1,207 @@
1
+ # MNI & Utilities Reference
2
+
3
+ ## Table of Contents
4
+ 1. [MNI Space Transforms](#mni-space-transforms)
5
+ 2. [Volume Utilities](#volume-utilities)
6
+ 3. [Anatomical Processing](#anatomical-processing)
7
+ 4. [General Utilities](#general-utilities)
8
+
9
+ ## MNI Space Transforms
10
+
11
+ ### compute_mni_transform
12
+
13
+ ```python
14
+ cortex.mni.compute_mni_transform(subject, xfm, template=None)
15
+ ```
16
+
17
+ Computes the combined transform from functional space to MNI standard space using FSL's FLIRT and FNIRT.
18
+
19
+ | Parameter | Type | Description |
20
+ |-----------|------|-------------|
21
+ | `subject` | str | Subject name |
22
+ | `xfm` | str | Transform name (functional → anatomical) |
23
+ | `template` | str | MNI template path (default: FSL's MNI152 1mm) |
24
+
25
+ Returns: `func_to_mni` warp field.
26
+
27
+ ### transform_to_mni
28
+
29
+ ```python
30
+ cortex.mni.transform_to_mni(volumedata, func_to_mni, template=None)
31
+ ```
32
+
33
+ Transform volumetric data from functional space to MNI space.
34
+
35
+ ```python
36
+ # Full workflow: subject space → MNI
37
+ func_to_mni = cortex.mni.compute_mni_transform("S1", "fullhead")
38
+ mni_data = cortex.mni.transform_to_mni(vol.volume, func_to_mni)
39
+ ```
40
+
41
+ ### transform_mni_to_subject
42
+
43
+ ```python
44
+ cortex.mni.transform_mni_to_subject(subject, xfm, volarray, func_to_mni, template=None)
45
+ ```
46
+
47
+ Transform data from MNI space back to subject's functional space.
48
+
49
+ ```python
50
+ # MNI → subject space
51
+ subject_data = cortex.mni.transform_mni_to_subject(
52
+ "S1", "fullhead", mni_volume, func_to_mni)
53
+ vol = cortex.Volume(subject_data, "S1", "fullhead")
54
+ ```
55
+
56
+ ### transform_surface_to_mni
57
+
58
+ ```python
59
+ cortex.mni.transform_surface_to_mni(subject, surfname)
60
+ ```
61
+
62
+ Transform surface vertices to MNI coordinates.
63
+
64
+ ```python
65
+ mni_pts = cortex.mni.transform_surface_to_mni("S1", "fiducial")
66
+ ```
67
+
68
+ ### Example: MNI Atlas on Subject Surface
69
+
70
+ ```python
71
+ import cortex
72
+ import numpy as np
73
+ import nibabel as nib
74
+
75
+ # Load MNI atlas
76
+ atlas = nib.load("MNI_atlas.nii.gz").get_fdata()
77
+
78
+ # Compute warp
79
+ func_to_mni = cortex.mni.compute_mni_transform("S1", "fullhead")
80
+
81
+ # Transform atlas to subject space
82
+ subj_atlas = cortex.mni.transform_mni_to_subject(
83
+ "S1", "fullhead", atlas, func_to_mni)
84
+
85
+ # Visualize
86
+ vol = cortex.Volume(subj_atlas, "S1", "fullhead", cmap="tab20")
87
+ cortex.quickshow(vol)
88
+ ```
89
+
90
+ ## Volume Utilities
91
+
92
+ ### mosaic
93
+
94
+ ```python
95
+ cortex.mosaic(data, dim=0, show=True, **kwargs)
96
+ ```
97
+
98
+ Creates a 2D mosaic view of 3D volumetric data (radiological convention).
99
+
100
+ | Parameter | Type | Default | Description |
101
+ |-----------|------|---------|-------------|
102
+ | `data` | ndarray | required | 3D volume |
103
+ | `dim` | int | 0 | Dimension to slice across |
104
+ | `show` | bool | True | Display with matplotlib |
105
+
106
+ ```python
107
+ import cortex
108
+ import numpy as np
109
+
110
+ data = np.random.randn(64, 64, 32)
111
+ cortex.mosaic(data, dim=2) # Axial slices
112
+ ```
113
+
114
+ ### unmask
115
+
116
+ ```python
117
+ cortex.unmask(mask, data)
118
+ ```
119
+
120
+ Reconstruct full volume from masked (1D) data.
121
+
122
+ ```python
123
+ mask = cortex.db.get_mask("S1", "fullhead", "thick")
124
+ masked_data = np.random.randn(mask.sum())
125
+ full_volume = cortex.unmask(mask, masked_data)
126
+ # full_volume.shape == mask.shape (MaskedArray)
127
+ ```
128
+
129
+ ### Detrending Functions
130
+
131
+ ```python
132
+ from cortex.volume import detrend_median, detrend_gradient, detrend_poly
133
+
134
+ # Median filter detrending
135
+ detrended = detrend_median(data, kernel=15)
136
+
137
+ # Gradient-based detrending
138
+ grad = detrend_gradient(data, diff=3)
139
+
140
+ # Polynomial detrending
141
+ detrended = detrend_poly(data, polyorder=10, mask=None)
142
+ ```
143
+
144
+ ## Anatomical Processing
145
+
146
+ ### brainmask
147
+
148
+ ```python
149
+ cortex.anat.brainmask(outfile, subject)
150
+ ```
151
+
152
+ Creates a brain mask using FSL BET. Requires FSL installation.
153
+
154
+ ### whitematter
155
+
156
+ ```python
157
+ cortex.anat.whitematter(outfile, subject, do_voxelize=False)
158
+ ```
159
+
160
+ Creates white matter segmentation mask using FreeSurfer labels or FSL FAST.
161
+
162
+ ### voxelize
163
+
164
+ ```python
165
+ cortex.anat.voxelize(outfile, subject, surf='wm', mp=True)
166
+ ```
167
+
168
+ Voxelizes a surface to create a binary 3D mask.
169
+
170
+ | Parameter | Type | Default | Description |
171
+ |-----------|------|---------|-------------|
172
+ | `surf` | str | 'wm' | Surface to voxelize: 'wm' or 'pia' |
173
+ | `mp` | bool | True | Use multiprocessing |
174
+
175
+ ## General Utilities
176
+
177
+ ### cortex.utils (imported to top-level)
178
+
179
+ ```python
180
+ # Get ROI vertices (most commonly used utility)
181
+ from cortex.utils import get_roi_verts, get_roi_mask
182
+
183
+ # Get ROI vertex indices
184
+ rois = get_roi_verts("S1") # all ROIs
185
+ v1 = get_roi_verts("S1", roi="V1") # specific ROI
186
+
187
+ # Get ROI mask in volume space
188
+ masks = get_roi_mask("S1", "fullhead")
189
+ v1_mask = get_roi_mask("S1", "fullhead", roi="V1")
190
+ ```
191
+
192
+ ### Vertex distance from surface
193
+
194
+ ```python
195
+ # Compute voxel distance from cortical surface
196
+ # (useful for defining cortical ribbon masks)
197
+ from cortex.utils import get_vox_dist
198
+ dist, argdist = get_vox_dist(subject, xfmname)
199
+ ```
200
+
201
+ ### Multiprocessing helper
202
+
203
+ ```python
204
+ from cortex.mp import map as mp_map
205
+ # Parallel map function used internally by pycortex
206
+ results = mp_map(func, iterable)
207
+ ```
@@ -0,0 +1,219 @@
1
+ # Surface Analysis Reference
2
+
3
+ ## Table of Contents
4
+ 1. [Surface Properties (surfinfo)](#surface-properties)
5
+ 2. [Geodesic Distance](#geodesic-distance)
6
+ 3. [Surface Geometry (polyutils)](#surface-geometry)
7
+ 4. [ROI Operations](#roi-operations)
8
+ 5. [SVG Overlays](#svg-overlays)
9
+
10
+ ## Surface Properties
11
+
12
+ ### curvature
13
+
14
+ ```python
15
+ cortex.surfinfo.curvature(outfile, subject, smooth=20)
16
+ ```
17
+
18
+ Computes mean curvature of the cortical surface. Result is cached.
19
+
20
+ ### thickness
21
+
22
+ ```python
23
+ cortex.surfinfo.thickness(outfile, subject)
24
+ ```
25
+
26
+ Computes cortical thickness (distance between white matter and pial surfaces).
27
+
28
+ ### distortion
29
+
30
+ ```python
31
+ cortex.surfinfo.distortion(outfile, subject, dist_type='areal', smooth=20)
32
+ ```
33
+
34
+ | Parameter | Type | Default | Description |
35
+ |-----------|------|---------|-------------|
36
+ | `dist_type` | str | 'areal' | Distortion type: 'areal' or 'metric' |
37
+ | `smooth` | int | 20 | Smoothing iterations |
38
+
39
+ Computes flatmap distortion (how much the flattening stretches/compresses the surface).
40
+
41
+ ### tissots_indicatrix
42
+
43
+ ```python
44
+ cortex.surfinfo.tissots_indicatrix(outfile, subject, radius=10, spacing=50)
45
+ ```
46
+
47
+ Computes Tissot's indicatrix for visualizing flatmap distortion patterns.
48
+
49
+ ### flat_border
50
+
51
+ ```python
52
+ cortex.surfinfo.flat_border(outfile, subject)
53
+ ```
54
+
55
+ Computes flatmap border information.
56
+
57
+ ```python
58
+ # Example: visualize curvature
59
+ curv = cortex.Vertex(cortex.db.get_surfinfo("S1", "curvature"), "S1")
60
+ cortex.quickshow(curv)
61
+
62
+ # Blend data with curvature
63
+ vx = cortex.Vertex(my_data, "S1")
64
+ blended = vx.blend_curvature(alpha=0.5, brightness=0.5, contrast=0.25, smooth=20)
65
+ cortex.quickshow(blended)
66
+ ```
67
+
68
+ ## Geodesic Distance
69
+
70
+ ### Exact Geodesic
71
+
72
+ ```python
73
+ from cortex.polyutils import exact_geodesic
74
+ distances = exact_geodesic.geodesic_distance(surface, vertex_indices)
75
+ ```
76
+
77
+ ### Via Surface Class
78
+
79
+ ```python
80
+ from cortex.polyutils import Surface
81
+
82
+ pts, polys = cortex.db.get_surf("S1", "fiducial", "left")
83
+ surf = Surface(pts, polys)
84
+
85
+ # Geodesic distance from a seed vertex
86
+ distances = surf.geodesic_distance(vertex_index)
87
+
88
+ # Geodesic path between two vertices
89
+ path = surf.geodesic_path(start_vertex, end_vertex)
90
+ ```
91
+
92
+ ```python
93
+ # Example: compute and visualize geodesic distance
94
+ pts, polys = cortex.db.get_surf("S1", "fiducial", merge=True)
95
+ from cortex.polyutils import Surface
96
+ surf = Surface(pts, polys)
97
+
98
+ seed = 10000 # vertex index
99
+ dists = surf.geodesic_distance([seed])
100
+
101
+ vx = cortex.Vertex(dists, "S1", cmap="hot", vmin=0, vmax=100)
102
+ cortex.quickshow(vx)
103
+ ```
104
+
105
+ ## Surface Geometry
106
+
107
+ ### Surface Class
108
+
109
+ ```python
110
+ from cortex.polyutils import Surface
111
+
112
+ pts, polys = cortex.db.get_surf("S1", "fiducial", "left")
113
+ surf = Surface(pts, polys)
114
+ ```
115
+
116
+ Key properties:
117
+ - `surf.adj` — sparse adjacency matrix
118
+ - `surf.face_normals` — normal vector per face
119
+ - `surf.vertex_normals` — normal vector per vertex
120
+ - `surf.face_areas` — area of each face
121
+ - `surf.cotangent_weights` — cotangent Laplacian weights
122
+ - `surf.laplace_operator` — Laplace-Beltrami operator (sparse matrix)
123
+ - `surf.connected` — connected components
124
+
125
+ Key methods:
126
+ - `surf.geodesic_distance(verts)` — exact geodesic distance from vertices
127
+ - `surf.smooth(data, iterations)` — smooth data on surface
128
+ - `surf.subsurface(vertex_mask)` — extract subsurface
129
+
130
+ ### Distortion Analysis
131
+
132
+ ```python
133
+ from cortex.polyutils import Distortion
134
+
135
+ # Compare fiducial to flat surface
136
+ fid_pts, polys = cortex.db.get_surf("S1", "fiducial", "left")
137
+ flat_pts, _ = cortex.db.get_surf("S1", "flat", "left")
138
+
139
+ dist = Distortion(fid_pts, flat_pts, polys)
140
+ areal = dist.areal # areal distortion per face
141
+ metric = dist.metric # metric distortion per face
142
+ ```
143
+
144
+ ### Utility Functions
145
+
146
+ ```python
147
+ from cortex.polyutils.misc import (
148
+ voxelize, # Surface → 3D voxel mask
149
+ marching_cubes, # 3D volume → surface mesh
150
+ decimate, # Reduce polygon count
151
+ boundary_edges, # Find boundary edges of mesh
152
+ face_area, # Compute face areas
153
+ face_volume, # Volume between two surfaces
154
+ measure_volume, # Total enclosed volume
155
+ )
156
+
157
+ # Voxelize a surface
158
+ mask_3d = voxelize(pts, polys, shape=(256, 256, 256), center=(128, 128, 128))
159
+
160
+ # Extract surface from volume
161
+ new_pts, new_polys = marching_cubes(volume_data, smooth=True, decimate=True)
162
+ ```
163
+
164
+ ## ROI Operations
165
+
166
+ ### Get ROI Vertices
167
+
168
+ ```python
169
+ from cortex.utils import get_roi_verts
170
+
171
+ # Single ROI
172
+ v1_verts = get_roi_verts("S1", roi="V1") # {"V1": array([...])}
173
+
174
+ # All ROIs
175
+ all_rois = get_roi_verts("S1") # {"V1": array, "V2": array, ...}
176
+ ```
177
+
178
+ ### Get ROI Volume Mask
179
+
180
+ ```python
181
+ from cortex.utils import get_roi_mask
182
+
183
+ # Get binary mask in volume space
184
+ v1_mask = get_roi_mask("S1", "fullhead", roi="V1")
185
+ # Returns dict: {"V1": 3D_boolean_array}
186
+ ```
187
+
188
+ ### Visualize ROI
189
+
190
+ ```python
191
+ # Highlight ROI vertices
192
+ roi_verts = get_roi_verts("S1", roi="V1")["V1"]
193
+ data = np.zeros(cortex.db.get_surf("S1", "fiducial", merge=True)[0].shape[0])
194
+ data[roi_verts] = 1.0
195
+ vx = cortex.Vertex(data, "S1", cmap="hot", vmin=0, vmax=1)
196
+ cortex.quickshow(vx, with_rois=True)
197
+ ```
198
+
199
+ ## SVG Overlays
200
+
201
+ ROIs and overlays are stored as SVG files. The `svgoverlay` module manages them.
202
+
203
+ ```python
204
+ # Get overlay object
205
+ overlay = cortex.db.get_overlay("S1")
206
+
207
+ # Access ROI definitions
208
+ # ROIs are stored in {filestore}/{subject}/rois.svg
209
+
210
+ # Custom overlay file
211
+ fig = cortex.quickshow(vol, overlay_file="/path/to/custom_overlay.svg")
212
+ ```
213
+
214
+ ROIs can be edited interactively using Inkscape:
215
+ ```python
216
+ from cortex.rois import ROIpack
217
+ rois = ROIpack("S1", "rois.svg")
218
+ rois.to_svg(open_inkscape=True) # Opens Inkscape for editing
219
+ ```
@@ -0,0 +1,251 @@
1
+ # Visualization Reference
2
+
3
+ ## Table of Contents
4
+ 1. [Quickflat (2D Flatmaps)](#quickflat-2d-flatmaps)
5
+ 2. [WebGL (3D Interactive Viewer)](#webgl-3d-interactive-viewer)
6
+ 3. [Export (Multi-View Rendering)](#export-multi-view-rendering)
7
+
8
+ ## Quickflat (2D Flatmaps)
9
+
10
+ ### make_figure / quickshow
11
+
12
+ ```python
13
+ cortex.quickshow(braindata, recache=False, pixelwise=True, thick=32,
14
+ sampler='nearest', height=1024, dpi=100, depth=0.5,
15
+ with_rois=True, with_sulci=False, with_labels=True,
16
+ with_colorbar=True, with_borders=False, with_dropout=False,
17
+ with_curvature=False, with_connected_vertices=False,
18
+ overlay_file=None, linewidth=None, linecolor=None,
19
+ roifill=None, shadow=None, labelsize=None, labelcolor=None,
20
+ cutout=None, curvature_brightness=None, curvature_contrast=None,
21
+ fig=None, colorbar_ticks=None, colorbar_location='center',
22
+ roi_list=None, sulci_list=None, nanmean=False)
23
+ ```
24
+
25
+ | Parameter | Type | Default | Description |
26
+ |-----------|------|---------|-------------|
27
+ | `braindata` | Volume/Vertex | required | Data to display |
28
+ | `pixelwise` | bool | True | Pixel-accurate mapping (vs interpolated) |
29
+ | `thick` | int | 32 | Number of cortical layers to sample |
30
+ | `sampler` | str | 'nearest' | Sampling method: 'nearest', 'trilinear', 'lanczos' |
31
+ | `height` | int | 1024 | Image height in pixels |
32
+ | `depth` | float | 0.5 | Cortical depth (0=white matter, 1=pial) |
33
+ | `with_rois` | bool | True | Show ROI boundaries |
34
+ | `with_sulci` | bool | False | Show sulcal boundaries |
35
+ | `with_curvature` | bool | False | Show curvature underlay |
36
+ | `with_colorbar` | bool | True | Show colorbar |
37
+ | `with_dropout` | bool | False | Show dropout regions |
38
+ | `cutout` | str | None | ROI name to cut out and zoom |
39
+ | `roi_list` | list | None | Specific ROIs to display |
40
+ | `nanmean` | bool | False | Use nanmean for layer averaging |
41
+ | `fig` | Figure | None | Existing matplotlib figure |
42
+ | `extra_disp` | tuple | None | Extra display layer (name, colormap) |
43
+ | `extra_hatch` | tuple | None | Hatch overlay (Dataview, color_tuple) |
44
+ | `curvature_threshold` | bool | None | Threshold curvature display |
45
+
46
+ ```python
47
+ import cortex
48
+ vol = cortex.Volume.random("S1", "fullhead")
49
+
50
+ # Basic flatmap
51
+ fig = cortex.quickshow(vol)
52
+
53
+ # With curvature and sulci
54
+ fig = cortex.quickshow(vol, with_curvature=True, with_sulci=True,
55
+ curvature_brightness=0.5, curvature_contrast=0.25)
56
+
57
+ # Zoom to ROI
58
+ fig = cortex.quickshow(vol, cutout="V1")
59
+
60
+ # Custom ROI display
61
+ fig = cortex.quickshow(vol, roi_list=["V1", "V2", "V3"],
62
+ linewidth=2, linecolor=(1, 1, 1, 1))
63
+ ```
64
+
65
+ ### make_png
66
+
67
+ ```python
68
+ cortex.quickflat.make_png(fname, braindata, recache=False, pixelwise=True,
69
+ sampler='nearest', height=1024, bgcolor=None, dpi=100, **kwargs)
70
+ ```
71
+
72
+ ```python
73
+ cortex.quickflat.make_png("output.png", vol, bgcolor=(0,0,0,0)) # transparent
74
+ cortex.quickflat.make_png("output.png", vol, height=2048, dpi=300) # high-res
75
+ ```
76
+
77
+ ### make_svg
78
+
79
+ ```python
80
+ cortex.quickflat.make_svg(fname, braindata, with_labels=False,
81
+ with_curvature=True, layers=['rois'], height=1024, overlay_file=None)
82
+ ```
83
+
84
+ ### make_gif
85
+
86
+ ```python
87
+ cortex.quickflat.make_gif(output_path, volumes, frame_duration=1, **figure_kwargs)
88
+ ```
89
+
90
+ ```python
91
+ vols = [cortex.Volume(data[t], "S1", "fullhead") for t in range(10)]
92
+ cortex.quickflat.make_gif("animation.gif", vols, frame_duration=0.5,
93
+ with_curvature=True)
94
+ ```
95
+
96
+ ### Compositing Functions
97
+
98
+ For fine-grained control over flatmap layers:
99
+
100
+ ```python
101
+ from cortex.quickflat import composite
102
+ fig, ax = plt.subplots()
103
+ composite.add_curvature(fig, braindata, ...)
104
+ composite.add_data(fig, braindata, ...)
105
+ composite.add_rois(fig, braindata, ...)
106
+ composite.add_sulci(fig, braindata, ...)
107
+ composite.add_colorbar(fig, braindata, ...)
108
+ composite.add_cutout(fig, braindata, name="V1", ...)
109
+ ```
110
+
111
+ ---
112
+
113
+ ## WebGL (3D Interactive Viewer)
114
+
115
+ ### show / webshow
116
+
117
+ ```python
118
+ cortex.webshow(data, autoclose=None, open_browser=None, port=None,
119
+ pickerfun=None, recache=False, template='mixer.html',
120
+ overlays_visible=('rois', 'sulci'), labels_visible=('rois',),
121
+ types=('inflated',), overlay_file=None,
122
+ curvature_brightness=None, curvature_contrast=None,
123
+ surface_specularity=None, title='Brain', layout=None)
124
+ ```
125
+
126
+ | Parameter | Type | Default | Description |
127
+ |-----------|------|---------|-------------|
128
+ | `data` | Dataset/Volume/Vertex | required | Data to display |
129
+ | `autoclose` | bool | True | Close server when browser disconnects |
130
+ | `open_browser` | bool | True | Auto-open browser |
131
+ | `port` | int | random | Server port |
132
+ | `pickerfun` | callable | None | Click callback: `fn(voxel, vertex, hemi)` |
133
+ | `types` | tuple | ('inflated',) | Surface types to include |
134
+ | `overlays_visible` | tuple | ('rois','sulci') | Default visible overlays |
135
+ | `surface_specularity` | float | None | Surface shininess |
136
+
137
+ ```python
138
+ # Basic viewer
139
+ handle = cortex.webshow(vol)
140
+
141
+ # Multi-dataset viewer with picker
142
+ def on_click(voxel, vertex, hemi):
143
+ print(f"Clicked vertex {vertex} in {hemi}")
144
+
145
+ ds = cortex.Dataset(map1=vol1, map2=vol2)
146
+ handle = cortex.webshow(ds, pickerfun=on_click)
147
+
148
+ # Programmatic control via handle
149
+ handle._set_view(**{"camera.azimuth": 45, "camera.altitude": 30})
150
+ handle.getImage("screenshot.png", size=(1920, 1080))
151
+ ```
152
+
153
+ ### make_static
154
+
155
+ ```python
156
+ cortex.webgl.make_static(outpath, data, recache=False,
157
+ template='static.html', anonymize=False,
158
+ overlays_visible=('rois', 'sulci'), labels_visible=('rois',),
159
+ types=('inflated',), html_embed=True, title='Brain')
160
+ ```
161
+
162
+ ```python
163
+ # Self-contained HTML file
164
+ cortex.webgl.make_static("viewer.html", vol, html_embed=True)
165
+
166
+ # Anonymized for sharing
167
+ cortex.webgl.make_static("public_viewer.html", vol, anonymize=True)
168
+ ```
169
+
170
+ ### View Control (JSMixer handle)
171
+
172
+ ```python
173
+ handle = cortex.webshow(vol)
174
+
175
+ # Camera
176
+ handle._set_view(**{"camera.azimuth": 90, "camera.altitude": 0})
177
+
178
+ # Surface unfolding (0=folded, 1=flat)
179
+ handle._set_view(**{"surface.S1.unfold": 0.5})
180
+
181
+ # Save/load views
182
+ handle.save_view("S1", "my_view")
183
+ handle.get_view("S1", "my_view")
184
+
185
+ # Screenshots and movies
186
+ handle.getImage("shot.png", size=(1920, 1080))
187
+ handle.makeMovie(animation_dict, "movie.mp4", fps=30)
188
+ ```
189
+
190
+ ---
191
+
192
+ ## Export (Multi-View Rendering)
193
+
194
+ ### save_3d_views
195
+
196
+ ```python
197
+ cortex.export.save_3d_views(volume, base_name='fig',
198
+ list_angles=['lateral_pivot'], list_surfaces=['inflated'],
199
+ viewer_params=dict(labels_visible=[], overlays_visible=['rois']),
200
+ size=(4096, 3072), trim=True, sleep=10, headless=False)
201
+ ```
202
+
203
+ | Parameter | Type | Default | Description |
204
+ |-----------|------|---------|-------------|
205
+ | `list_angles` | list | ['lateral_pivot'] | View angles |
206
+ | `list_surfaces` | list | ['inflated'] | Surface types |
207
+ | `size` | tuple | (4096,3072) | Image size |
208
+ | `trim` | bool | True | Auto-trim borders |
209
+ | `headless` | bool | False | Use Playwright (no display) |
210
+
211
+ Available angles: `'left'`, `'right'`, `'front'`, `'back'`, `'top'`, `'bottom'`, `'flatmap'`, `'medial_pivot'`, `'lateral_pivot'`, `'bottom_pivot'`, `'top_pivot'`
212
+
213
+ Available surfaces: `'inflated'`, `'flatmap'`, `'fiducial'`, `'inflated_cut'`
214
+
215
+ ```python
216
+ # Multiple views, headless
217
+ paths = cortex.export.save_3d_views(
218
+ vol, base_name="results/brain",
219
+ list_angles=["lateral_pivot", "medial_pivot", "flatmap"],
220
+ list_surfaces=["inflated"],
221
+ headless=True, size=(4096, 3072))
222
+ ```
223
+
224
+ ### plot_panels
225
+
226
+ ```python
227
+ cortex.export.plot_panels(volume, panels, figsize=(16, 9),
228
+ windowsize=(6400, 3600), save_name=None, sleep=10, headless=False)
229
+ ```
230
+
231
+ ```python
232
+ panels = [
233
+ {"extent": [0, 0.5, 0.5, 0.5],
234
+ "view": {"hemisphere": "left", "angle": "lateral_pivot", "surface": "inflated"}},
235
+ {"extent": [0.5, 0.5, 0.5, 0.5],
236
+ "view": {"hemisphere": "right", "angle": "lateral_pivot", "surface": "inflated"}},
237
+ {"extent": [0, 0, 1, 0.5],
238
+ "view": {"angle": "flatmap", "surface": "flatmap"}}
239
+ ]
240
+ fig = cortex.export.plot_panels(vol, panels, save_name="panels.png", headless=True)
241
+ ```
242
+
243
+ ### headless_viewer (context manager)
244
+
245
+ ```python
246
+ with cortex.export.headless_viewer(vol) as handle:
247
+ handle._set_view(**{"camera.azimuth": 45})
248
+ handle.getImage("view.png")
249
+ ```
250
+
251
+ Requires: `pip install 'pycortex[headless]' && playwright install chromium`