@brainpilot/skills 0.0.6 ā 0.0.8
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/package.json +2 -2
- package/skills/01_Meta-Skills/academic-research-hub/SKILL.md +108 -0
- package/skills/01_Meta-Skills/academic-research-hub/scripts/requirements.txt +17 -0
- package/skills/01_Meta-Skills/academic-research-hub/scripts/research.py +781 -0
- package/skills/01_Meta-Skills/beautiful-log/SKILL.md +64 -0
- package/skills/01_Meta-Skills/beautiful-log/scripts/beautiful_log.py +274 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/SKILL.md +130 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/assets/config.template.yaml +54 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/assets/top5_digest_template.md +5 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/build_top5_digest.py +300 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/common.py +137 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/merge_results.py +106 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/run_pipeline.py +177 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/search_arxiv.py +162 -0
- package/skills/01_Meta-Skills/ethoclaw-daily-paper/scripts/search_pubmed.py +202 -0
- package/skills/01_Meta-Skills/ethoclaw-normalize-tabular/SKILL.md +173 -0
- package/skills/01_Meta-Skills/ethoclaw-normalize-tabular/scripts/normalize_data.py +874 -0
- package/skills/01_Meta-Skills/ethoclaw-pdf-research/SKILL.md +134 -0
- package/skills/01_Meta-Skills/ethoclaw-pdf-research/references/confirmation-prompts.md +31 -0
- package/skills/01_Meta-Skills/ethoclaw-pdf-research/references/output-patterns.md +45 -0
- package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_markdown_deliverables.py +41 -0
- package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_research_log.py +84 -0
- package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/build_summary_md.py +63 -0
- package/skills/01_Meta-Skills/ethoclaw-pdf-research/scripts/extract_pdf_bundle.py +140 -0
- package/skills/01_Meta-Skills/experiment-controller/SKILL.md +140 -0
- package/skills/01_Meta-Skills/knowledge-graph-builder/SKILL.md +366 -0
- package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/entity_resolution.py +120 -0
- package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/extraction_prompt_template.txt +19 -0
- package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/graph_query.py +106 -0
- package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/hypothesis_cli_reference.py +42 -0
- package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/new_data_source_template.py +116 -0
- package/skills/01_Meta-Skills/knowledge-graph-builder/scripts/requirements.txt +15 -0
- package/skills/01_Meta-Skills/method-design/SKILL.md +61 -0
- package/skills/01_Meta-Skills/multi-search-engine/SKILL.md +119 -0
- package/skills/01_Meta-Skills/research-idea/SKILL.md +65 -0
- package/skills/05_EEG_ERP/eeg-skill/SKILL.md +197 -0
- package/skills/05_EEG_ERP/meg-skill/SKILL.md +188 -0
- package/skills/05_EEG_ERP/meg-skill/scripts/time_frequency.py +223 -0
- package/skills/05_EEG_ERP/mne-eeg-tool/SKILL.md +165 -0
- package/skills/05_EEG_ERP/mne-eeg-tool/scripts/eeg_pipeline_reference.py +231 -0
- package/skills/05_EEG_ERP/seed-iv-skill/SKILL.md +184 -0
- package/skills/05_EEG_ERP/seed-iv-skill/scripts/classify_seed_iv.py +154 -0
- package/skills/05_EEG_ERP/seed-iv-skill/scripts/extract_seed_iv_features.py +190 -0
- package/skills/05_EEG_ERP/seed-iv-skill/scripts/validate_seed_iv.py +102 -0
- package/skills/05_EEG_ERP/seed-vig-skill/SKILL.md +182 -0
- package/skills/05_EEG_ERP/seed-vig-skill/scripts/classify_seed_vig.py +165 -0
- package/skills/05_EEG_ERP/seed-vig-skill/scripts/extract_seed_vig_features.py +185 -0
- package/skills/05_EEG_ERP/seed-vig-skill/scripts/validate_seed_vig.py +88 -0
- package/skills/06_fMRI_Neuroimaging/abcd-skill/SKILL.md +308 -0
- package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/abcd_qc_summary.py +449 -0
- package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/extract_abcd_phenotype.py +292 -0
- package/skills/06_fMRI_Neuroimaging/abcd-skill/scripts/reorganize_abcd.py +387 -0
- package/skills/06_fMRI_Neuroimaging/abide-skill/SKILL.md +302 -0
- package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/abide_qc_summary.py +317 -0
- package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/extract_abide_phenotype.py +267 -0
- package/skills/06_fMRI_Neuroimaging/abide-skill/scripts/reorganize_abide.py +387 -0
- package/skills/06_fMRI_Neuroimaging/adhd200-skill/SKILL.md +244 -0
- package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/adhd200_qc_summary.py +98 -0
- package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/extract_adhd200_phenotype.py +134 -0
- package/skills/06_fMRI_Neuroimaging/adhd200-skill/scripts/reorganize_adhd200.py +206 -0
- package/skills/06_fMRI_Neuroimaging/adni-skill/SKILL.md +358 -0
- package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/generate_adni_task_files.py +1305 -0
- package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/generate_vqa_from_tasks.py +766 -0
- package/skills/06_fMRI_Neuroimaging/adni-skill/scripts/reorganize_adni.py +491 -0
- package/skills/06_fMRI_Neuroimaging/aibl-skill/SKILL.md +295 -0
- package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/aibl_qc_summary.py +260 -0
- package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/extract_aibl_phenotype.py +365 -0
- package/skills/06_fMRI_Neuroimaging/aibl-skill/scripts/reorganize_aibl.py +394 -0
- package/skills/06_fMRI_Neuroimaging/aomic-skill/SKILL.md +292 -0
- package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/aomic_qc_summary.py +258 -0
- package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/extract_aomic_phenotype.py +284 -0
- package/skills/06_fMRI_Neuroimaging/aomic-skill/scripts/reorganize_aomic.py +322 -0
- package/skills/06_fMRI_Neuroimaging/asl-skill/SKILL.md +168 -0
- package/skills/06_fMRI_Neuroimaging/asl-skill/scripts/compute_cbf.py +224 -0
- package/skills/06_fMRI_Neuroimaging/bids-organizer/SKILL.md +241 -0
- package/skills/06_fMRI_Neuroimaging/bold5000-skill/SKILL.md +186 -0
- package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/bold5000_qc_summary.py +96 -0
- package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/extract_bold5000_stimulus.py +125 -0
- package/skills/06_fMRI_Neuroimaging/bold5000-skill/scripts/reorganize_bold5000.py +102 -0
- package/skills/06_fMRI_Neuroimaging/camcan-skill/SKILL.md +213 -0
- package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/camcan_qc_summary.py +131 -0
- package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/extract_camcan_phenotype.py +145 -0
- package/skills/06_fMRI_Neuroimaging/camcan-skill/scripts/validate_camcan.py +141 -0
- package/skills/06_fMRI_Neuroimaging/cobre-skill/SKILL.md +201 -0
- package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/cobre_qc_summary.py +95 -0
- package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/extract_cobre_phenotype.py +104 -0
- package/skills/06_fMRI_Neuroimaging/cobre-skill/scripts/reorganize_cobre.py +140 -0
- package/skills/06_fMRI_Neuroimaging/conn-tool/SKILL.md +180 -0
- package/skills/06_fMRI_Neuroimaging/dcm2nii/SKILL.md +189 -0
- package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/SKILL.md +183 -0
- package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/dmt_har_med_qc_summary.py +96 -0
- package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/extract_dmt_har_med_phenotype.py +121 -0
- package/skills/06_fMRI_Neuroimaging/dmt-har-med-skill/scripts/reorganize_dmt_har_med.py +125 -0
- package/skills/06_fMRI_Neuroimaging/dwi-skill/SKILL.md +359 -0
- package/skills/06_fMRI_Neuroimaging/fmri-skill/SKILL.md +371 -0
- package/skills/06_fMRI_Neuroimaging/fmriprep-tool/SKILL.md +228 -0
- package/skills/06_fMRI_Neuroimaging/freesurfer-tool/SKILL.md +286 -0
- package/skills/06_fMRI_Neuroimaging/freesurfer-tool/scripts/freesurfer_processor.py +145 -0
- package/skills/06_fMRI_Neuroimaging/fsl-tool/SKILL.md +208 -0
- package/skills/06_fMRI_Neuroimaging/hbn-skill/SKILL.md +271 -0
- package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/extract_hbn_phenotype.py +107 -0
- package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/hbn_qc_summary.py +96 -0
- package/skills/06_fMRI_Neuroimaging/hbn-skill/scripts/reorganize_hbn.py +150 -0
- package/skills/06_fMRI_Neuroimaging/hcpa-skill/SKILL.md +210 -0
- package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/extract_hcpa_phenotype.py +146 -0
- package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/hcpa_qc_summary.py +120 -0
- package/skills/06_fMRI_Neuroimaging/hcpa-skill/scripts/reorganize_hcpa.py +155 -0
- package/skills/06_fMRI_Neuroimaging/hcpd-skill/SKILL.md +210 -0
- package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/extract_hcpd_phenotype.py +148 -0
- package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/hcpd_qc_summary.py +125 -0
- package/skills/06_fMRI_Neuroimaging/hcpd-skill/scripts/reorganize_hcpd.py +146 -0
- package/skills/06_fMRI_Neuroimaging/hcpep-skill/SKILL.md +215 -0
- package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/extract_hcpep_phenotype.py +157 -0
- package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/hcpep_qc_summary.py +143 -0
- package/skills/06_fMRI_Neuroimaging/hcpep-skill/scripts/reorganize_hcpep.py +146 -0
- package/skills/06_fMRI_Neuroimaging/hcppipeline-tool/SKILL.md +217 -0
- package/skills/06_fMRI_Neuroimaging/hcpya-skill/SKILL.md +214 -0
- package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/extract_hcpya_phenotype.py +190 -0
- package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/hcpya_qc_summary.py +152 -0
- package/skills/06_fMRI_Neuroimaging/hcpya-skill/scripts/reorganize_hcpya.py +203 -0
- package/skills/06_fMRI_Neuroimaging/ixi-skill/SKILL.md +198 -0
- package/skills/06_fMRI_Neuroimaging/ixi-skill/scripts/ixi_qc_summary.py +137 -0
- package/skills/06_fMRI_Neuroimaging/ixi-skill/scripts/reorganize_ixi.py +190 -0
- package/skills/06_fMRI_Neuroimaging/mnd-skill/SKILL.md +191 -0
- package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/extract_mnd_phenotype.py +143 -0
- package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/mnd_qc_summary.py +120 -0
- package/skills/06_fMRI_Neuroimaging/mnd-skill/scripts/validate_mnd.py +107 -0
- package/skills/06_fMRI_Neuroimaging/mschallenge-skill/SKILL.md +203 -0
- package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/analyze_lesions.py +119 -0
- package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/longitudinal_lesion.py +148 -0
- package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/mschallenge_qc_summary.py +132 -0
- package/skills/06_fMRI_Neuroimaging/mschallenge-skill/scripts/validate_mschallenge.py +116 -0
- package/skills/06_fMRI_Neuroimaging/nibabel-skill/SKILL.md +184 -0
- package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/atlas_coordinate_reference.py +61 -0
- package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/freesurfer_io_reference.py +34 -0
- package/skills/06_fMRI_Neuroimaging/nibabel-skill/scripts/nifti_inspection_reference.py +35 -0
- package/skills/06_fMRI_Neuroimaging/nifd-skill/SKILL.md +205 -0
- package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/extract_nifd_phenotype.py +132 -0
- package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/nifd_qc_summary.py +111 -0
- package/skills/06_fMRI_Neuroimaging/nifd-skill/scripts/validate_nifd.py +111 -0
- package/skills/06_fMRI_Neuroimaging/nii2dcm/SKILL.md +143 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/SKILL.md +266 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/connectome_reference.py +65 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/denoise_timeseries_reference.py +58 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/hierarchical_parcellation_reference.py +53 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/kmeans_parcellation_reference.py +53 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/preprocess_bold_reference.py +76 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/rest_dictlearning_reference.py +56 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/rest_ica_reference.py +59 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/second_level_glm_reference.py +58 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/spacenet_classifier_reference.py +59 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/svm_classifier_reference.py +60 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/task_glm_reference.py +63 -0
- package/skills/06_fMRI_Neuroimaging/nilearn-tool/scripts/zalff_summary_reference.py +109 -0
- package/skills/06_fMRI_Neuroimaging/nsd-skill/SKILL.md +210 -0
- package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/extract_nsd_stimulus.py +171 -0
- package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/nsd_qc_summary.py +142 -0
- package/skills/06_fMRI_Neuroimaging/nsd-skill/scripts/validate_nsd.py +142 -0
- package/skills/06_fMRI_Neuroimaging/oasis-skill/SKILL.md +205 -0
- package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/extract_oasis_phenotype.py +126 -0
- package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/oasis_qc_summary.py +115 -0
- package/skills/06_fMRI_Neuroimaging/oasis-skill/scripts/validate_oasis.py +119 -0
- package/skills/06_fMRI_Neuroimaging/pet-skill/SKILL.md +173 -0
- package/skills/06_fMRI_Neuroimaging/pet-skill/scripts/compute_suvr.py +202 -0
- package/skills/06_fMRI_Neuroimaging/pnc-skill/SKILL.md +206 -0
- package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/extract_pnc_phenotype.py +136 -0
- package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/pnc_qc_summary.py +116 -0
- package/skills/06_fMRI_Neuroimaging/pnc-skill/scripts/validate_pnc.py +120 -0
- package/skills/06_fMRI_Neuroimaging/ppmi-skill/SKILL.md +209 -0
- package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/extract_ppmi_phenotype.py +138 -0
- package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/ppmi_qc_summary.py +111 -0
- package/skills/06_fMRI_Neuroimaging/ppmi-skill/scripts/validate_ppmi.py +117 -0
- package/skills/06_fMRI_Neuroimaging/qsiprep-tool/SKILL.md +320 -0
- package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/SKILL.md +215 -0
- package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/extract_rest_mdd_phenotype.py +132 -0
- package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/harmonize_sites.py +152 -0
- package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/rest_mdd_qc_summary.py +124 -0
- package/skills/06_fMRI_Neuroimaging/rest-mneta-mdd-skill/scripts/validate_rest_mdd.py +103 -0
- package/skills/06_fMRI_Neuroimaging/smri-skill/SKILL.md +302 -0
- package/skills/06_fMRI_Neuroimaging/tcp-skill/SKILL.md +204 -0
- package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/extract_tcp_phenotype.py +139 -0
- package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/tcp_qc_summary.py +111 -0
- package/skills/06_fMRI_Neuroimaging/tcp-skill/scripts/validate_tcp.py +99 -0
- package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/SKILL.md +217 -0
- package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/extract_ucla_cnp_phenotype.py +145 -0
- package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/ucla_cnp_qc_summary.py +111 -0
- package/skills/06_fMRI_Neuroimaging/ucla-cnp-skill/scripts/validate_ucla_cnp.py +113 -0
- package/skills/06_fMRI_Neuroimaging/ukb-skill/SKILL.md +310 -0
- package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/build_ukb_survival.py +210 -0
- package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/extract_ukb_cases.py +308 -0
- package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/extract_ukb_phenotype.py +232 -0
- package/skills/06_fMRI_Neuroimaging/ukb-skill/scripts/ukb_qc_summary.py +158 -0
- package/skills/06_fMRI_Neuroimaging/wmh-segmentation/SKILL.md +133 -0
- package/skills/07_Computational_Modeling/detrending/SKILL.md +118 -0
- package/skills/07_Computational_Modeling/dictlearning/SKILL.md +122 -0
- package/skills/07_Computational_Modeling/filtering/SKILL.md +121 -0
- package/skills/07_Computational_Modeling/glm/SKILL.md +153 -0
- package/skills/07_Computational_Modeling/hierarchical/SKILL.md +121 -0
- package/skills/07_Computational_Modeling/ica/SKILL.md +122 -0
- package/skills/07_Computational_Modeling/kmeans/SKILL.md +119 -0
- package/skills/07_Computational_Modeling/run_models/SKILL.md +427 -0
- package/skills/07_Computational_Modeling/spacenet/SKILL.md +122 -0
- package/skills/07_Computational_Modeling/svm/SKILL.md +120 -0
- package/skills/08_Computational_Neuroscience/brain_gnn/SKILL.md +183 -0
- package/skills/08_Computational_Neuroscience/dipy-tool/SKILL.md +239 -0
- package/skills/08_Computational_Neuroscience/dipy-tool/scripts/dti_metrics_reference.py +70 -0
- package/skills/08_Computational_Neuroscience/dipy-tool/scripts/load_and_mask_reference.py +76 -0
- package/skills/08_Computational_Neuroscience/dipy-tool/scripts/roi_stats_reference.py +59 -0
- package/skills/08_Computational_Neuroscience/fm_app/SKILL.md +195 -0
- package/skills/08_Computational_Neuroscience/neurostorm/SKILL.md +151 -0
- package/skills/13_Visualization/brain-visualization/SKILL.md +191 -0
- package/skills/13_Visualization/brain-visualization/scripts/connectome_reference.py +108 -0
- package/skills/13_Visualization/brain-visualization/scripts/freesurfer_ply_reference.py +54 -0
- package/skills/13_Visualization/brain-visualization/scripts/zalff_summary_reference.py +116 -0
- package/skills/13_Visualization/ethoclaw-paper-figure-layout/SKILL.md +78 -0
- package/skills/13_Visualization/ethoclaw-paper-figure-layout/assets/naturecomm_figures.tex +74 -0
- package/skills/13_Visualization/ethoclaw-paper-figure-layout/scripts/layout_results_foldered.py +579 -0
- package/skills/14_Writing/overleaf-skill/SKILL.md +184 -0
- package/skills/14_Writing/overleaf-skill/scripts/install.sh +30 -0
- package/skills/14_Writing/paper-writing/SKILL.md +146 -0
- package/skills/14_Writing/paper-writing/scripts/data_statement_templates.py +164 -0
- package/skills/14_Writing/paper-writing/scripts/figure_templates.py +315 -0
- package/skills/14_Writing/paper-writing/scripts/nature_figure_style.py +214 -0
- package/skills/14_Writing/paper-writing/scripts/section_phrasebank.py +246 -0
- package/skills/16_Animal_Behavior/deeplabcut/SKILL.md +154 -0
- package/skills/16_Animal_Behavior/deeplabcut/references/3d-pose.md +89 -0
- package/skills/16_Animal_Behavior/deeplabcut/references/maDLC.md +123 -0
- package/skills/16_Animal_Behavior/deeplabcut/references/modelzoo.md +98 -0
- package/skills/16_Animal_Behavior/deeplabcut/references/standard-pipeline.md +165 -0
- package/skills/16_Animal_Behavior/deeplabcut/references/utilities.md +146 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/SKILL.md +274 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/report_template_en.html +112 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/report_template_en.md +21 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/cluster-section.md +5 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/heatmap-section.md +5 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/integrated-interpretation.md +3 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/overview.md +3 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/project-summary.md +3 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/radar-section.md +5 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/raw-trajectory.md +3 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/sample-check.md +3 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/single-subject-section.md +3 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/assets/section_templates/stats-section.md +5 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/epm.md +52 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/fst.md +37 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/nor.md +39 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/oft.md +43 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/tcst.md +45 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/experiment-types/tst.md +36 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/input-types.md +59 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/interpretation-guardrails.md +45 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/metadata-schema.md +57 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/report-sections.md +86 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/references/section-selection-rules.md +169 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/build_report_manifest.py +27 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/render_report.py +34 -0
- package/skills/16_Animal_Behavior/ethoclaw-analysis-report/scripts/report_utils.py +1121 -0
- package/skills/16_Animal_Behavior/ethoclaw-animal-grounding/SKILL.md +390 -0
- package/skills/16_Animal_Behavior/ethoclaw-animal-grounding/reference_code.py +98 -0
- package/skills/16_Animal_Behavior/ethoclaw-animal-pose-estimation/SKILL.md +336 -0
- package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/README.md +21 -0
- package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/SKILL.md +41 -0
- package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/batch_kinematic_generator.py +663 -0
- package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/config.json +19 -0
- package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/generate_kinematic_parameter.py +401 -0
- package/skills/16_Animal_Behavior/ethoclaw-kinematic-parameter-generator/kinematic_generator.py +265 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/SKILL.md +72 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/references/config.example.toml +56 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/scripts/cluster_all_params.py +232 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-clustermap-generate/scripts/cluster_all_params_from_config.py +236 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/SKILL.md +68 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/references/notes.md +5 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-radar-generate/scripts/plot_h5_radar.py +513 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/SKILL.md +52 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/config.toml +81 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/references/stats-rule.md +18 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_inspect.py +79 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_violin_batch.py +624 -0
- package/skills/16_Animal_Behavior/ethoclaw-multiparameter-violin-stats-generate/scripts/h5_violin_stats.py +438 -0
- package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/SKILL.md +280 -0
- package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/core_scripts/heatmap_trajectory.py +790 -0
- package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/core_scripts/heatmap_velocity.py +855 -0
- package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_2d.csv +101 -0
- package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_2d.h5 +0 -0
- package/skills/16_Animal_Behavior/ethoclaw-trajectory-velocity-heatmap-generate/reference_data/reference_data_readme.md +126 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
nose_x,nose_y,nose_confidence,back_x,back_y,back_confidence,tail_x,tail_y,tail_confidence
|
|
2
|
+
475.19022,108.41098,0.97418493,452.82947,83.8712,0.48843163,440.92596,60.840816,0.014156458
|
|
3
|
+
475.96747,106.043686,0.977368,452.07486,83.35011,0.32172602,440.52692,60.321404,0.023331426
|
|
4
|
+
475.9436,104.0922,0.95961916,451.5134,82.44809,0.12809052,438.39813,60.378574,0.022728235
|
|
5
|
+
476.5516,101.46619,0.9527784,449.18625,80.479454,0.13255136,437.36713,58.613197,0.048248637
|
|
6
|
+
475.8122,97.53424,0.9633512,448.715,79.59667,0.09865817,436.0404,58.518726,0.030002944
|
|
7
|
+
477.19226,92.58784,0.97487473,448.5418,79.498184,0.061244663,432.8206,58.903667,0.035898533
|
|
8
|
+
475.4471,89.65908,0.23926876,449.19867,79.764404,0.06674655,432.00882,58.235233,0.041348696
|
|
9
|
+
474.89267,86.11696,0.47965217,449.14856,78.79237,0.14172536,431.76782,58.098022,0.04468035
|
|
10
|
+
475.81052,83.515915,0.7251396,448.94492,78.26098,0.14395516,431.6078,57.766907,0.029120898
|
|
11
|
+
477.00906,81.68745,0.3982678,450.1728,78.62082,0.098565176,430.8751,58.004257,0.049617562
|
|
12
|
+
478.28668,77.757515,0.2960763,450.65967,78.348045,0.055771455,430.17957,58.002514,0.105040275
|
|
13
|
+
478.43027,75.234924,0.5760072,451.05902,78.6149,0.020200796,429.76953,59.06678,0.11681607
|
|
14
|
+
477.81113,73.42118,0.5526418,451.23944,77.75386,0.040210053,429.10855,59.828175,0.36768687
|
|
15
|
+
477.20575,72.72647,0.23583315,451.73837,76.932205,0.0151637485,428.56604,59.696182,0.30882075
|
|
16
|
+
478.26083,72.456276,0.10802835,452.29608,76.65421,0.012873299,428.70264,59.3634,0.27397633
|
|
17
|
+
428.9237,64.97222,0.08534209,452.57104,75.78511,0.0060122153,428.6798,59.477497,0.29528347
|
|
18
|
+
428.81577,65.49353,0.15389323,452.98068,75.29305,0.002499816,428.51532,60.227802,0.27094534
|
|
19
|
+
483.0385,70.21974,0.15120375,453.44012,74.62088,0.0024384116,428.5032,60.135273,0.3158878
|
|
20
|
+
429.1478,65.54042,0.1002913,453.13464,74.2387,0.0015184148,428.73825,60.51488,0.3211375
|
|
21
|
+
429.46326,65.36337,0.052627034,452.1668,69.58755,0.0036536132,428.812,60.035492,0.46613395
|
|
22
|
+
429.39114,65.55221,0.07463741,452.22314,69.4596,0.0031227532,428.79355,60.240623,0.4143251
|
|
23
|
+
429.56277,65.37942,0.05925322,451.88196,69.38171,0.00299257,428.46292,60.013813,0.39717472
|
|
24
|
+
429.53595,65.61803,0.06936282,452.76355,69.60437,0.0038697054,428.64987,60.194157,0.3848
|
|
25
|
+
429.69672,65.776505,0.06246201,458.10858,69.50576,0.0045912173,428.65005,60.26518,0.4409084
|
|
26
|
+
483.26978,65.028465,0.15279293,452.95712,69.58249,0.0076134456,428.29648,60.390465,0.5032113
|
|
27
|
+
483.99158,62.34483,0.2602438,458.20325,69.30007,0.009826792,428.44754,60.824818,0.5019335
|
|
28
|
+
482.98288,61.029884,0.18575935,457.7434,69.021454,0.015260913,428.3536,60.53927,0.48933157
|
|
29
|
+
483.18,58.96129,0.28232524,457.9416,68.61969,0.01855121,428.45532,60.47257,0.61480916
|
|
30
|
+
482.248,57.970062,0.14941862,457.90106,68.64875,0.011531551,428.86597,60.88859,0.6058602
|
|
31
|
+
482.15262,57.243977,0.09091685,457.99033,68.29213,0.010296796,428.832,61.051346,0.66437036
|
|
32
|
+
482.21332,55.13769,0.06395929,458.19547,67.830185,0.019791752,429.00574,61.03566,0.75376755
|
|
33
|
+
482.17334,54.715195,0.09333275,457.98495,67.42056,0.02786627,429.24033,61.250557,0.7702554
|
|
34
|
+
482.41943,54.085865,0.1428192,458.03607,66.74514,0.03851001,429.43637,61.01059,0.8324066
|
|
35
|
+
482.76627,53.51361,0.27744597,457.86893,66.10332,0.051902797,429.60233,60.94935,0.88025624
|
|
36
|
+
482.59744,52.66356,0.30038524,458.10184,65.86685,0.04923729,429.87433,60.82519,0.8736636
|
|
37
|
+
482.54276,52.040592,0.23129715,459.03345,63.442455,0.083021805,430.83548,60.5543,0.8204793
|
|
38
|
+
482.34216,52.100437,0.3498157,458.76337,62.789597,0.1699896,432.19604,61.543816,0.508585
|
|
39
|
+
482.43643,51.388615,0.31710148,458.37048,63.074078,0.068616286,432.1274,62.492676,0.4865205
|
|
40
|
+
482.94928,49.806484,0.29563445,458.3772,62.419365,0.100758135,431.76288,62.330696,0.54924566
|
|
41
|
+
484.10876,47.230446,0.63732904,458.73312,61.375698,0.42538193,432.07236,61.919518,0.5184152
|
|
42
|
+
484.00076,46.543293,0.7260198,458.4415,61.165863,0.80617714,431.93674,62.251236,0.39229998
|
|
43
|
+
483.4959,46.267815,0.7400175,458.30362,60.91133,0.7859283,432.46927,62.87769,0.29088646
|
|
44
|
+
482.82138,47.409725,0.33860043,457.53607,60.375214,0.7863781,432.47824,63.00264,0.21963216
|
|
45
|
+
479.83945,47.635616,0.28650776,457.11084,60.409218,0.7415505,432.23538,62.76469,0.33192453
|
|
46
|
+
479.04437,47.103504,0.367384,456.94736,60.053917,0.66081357,431.6346,62.533787,0.46377325
|
|
47
|
+
478.5038,46.580276,0.57288724,456.87582,59.99891,0.60552746,431.5096,62.93097,0.41092953
|
|
48
|
+
476.4693,45.545464,0.7198797,456.7139,59.844822,0.40035453,431.31992,62.701935,0.4298933
|
|
49
|
+
475.0532,44.064537,0.7204908,453.34073,59.117725,0.53503996,431.1139,62.359947,0.6175124
|
|
50
|
+
469.68213,42.64747,0.46564254,452.9286,59.168186,0.6038627,431.1573,62.627117,0.5333248
|
|
51
|
+
469.38837,41.532978,0.4487599,453.07214,58.9391,0.6488823,430.8039,62.680874,0.6340045
|
|
52
|
+
469.62073,40.89138,0.31737277,452.65765,57.942112,0.683082,430.86203,62.88522,0.51941824
|
|
53
|
+
469.22266,41.128643,0.30629447,452.14435,58.082436,0.7630493,430.59653,63.04912,0.54187006
|
|
54
|
+
468.31903,38.76789,0.43456078,452.55283,57.34493,0.7429347,431.32846,63.334915,0.3408875
|
|
55
|
+
468.4213,37.809376,0.4577458,451.9682,56.83949,0.75418866,430.7434,64.13222,0.3261971
|
|
56
|
+
467.51538,37.666195,0.5653502,451.16446,56.82583,0.6302297,430.48282,64.04944,0.17465137
|
|
57
|
+
466.65988,36.50628,0.61504436,451.20886,56.25506,0.5557539,430.27908,64.210106,0.10238222
|
|
58
|
+
465.5955,36.076225,0.53754383,451.83905,56.053,0.45687675,431.7848,68.326126,0.033657942
|
|
59
|
+
462.65607,36.581203,0.5355755,451.93747,54.328995,0.53796774,431.67374,68.70468,0.15803406
|
|
60
|
+
462.22427,36.333683,0.6599198,451.39783,56.028362,0.62568897,430.6076,69.329666,0.36983305
|
|
61
|
+
460.88824,35.594975,0.81448835,451.01758,55.7829,0.60703444,430.3216,69.55594,0.5155534
|
|
62
|
+
459.42957,34.985806,0.7906708,451.5709,53.787735,0.4822854,430.01617,69.885605,0.76526356
|
|
63
|
+
458.5865,34.803276,0.85184824,451.02625,53.6984,0.49024966,430.18634,70.29848,0.64626306
|
|
64
|
+
457.82428,34.36119,0.8235948,450.52103,53.442123,0.5518548,429.7276,70.12557,0.7188167
|
|
65
|
+
457.9267,34.612534,0.7680719,450.04593,53.015614,0.52258235,429.25314,70.2875,0.7669633
|
|
66
|
+
457.65442,33.84248,0.75301266,449.91977,52.62924,0.5036106,429.2836,70.244194,0.81333417
|
|
67
|
+
456.19458,29.939999,0.73246455,449.5976,51.84486,0.46144152,430.47238,71.28205,0.69256055
|
|
68
|
+
453.7165,28.821825,0.77715933,449.39575,51.641685,0.5464043,430.4364,71.671036,0.7715367
|
|
69
|
+
452.66003,28.099947,0.953882,449.53012,51.011158,0.39557797,430.99557,72.12316,0.67706597
|
|
70
|
+
450.32538,28.037716,0.9192612,449.8995,50.78756,0.3503521,431.30316,72.22595,0.67770016
|
|
71
|
+
450.1087,27.870989,0.894967,449.63754,50.771378,0.2872086,431.51248,72.703476,0.63415223
|
|
72
|
+
451.0601,27.824474,0.94048035,449.45264,50.69797,0.30145282,431.82507,72.76508,0.57980585
|
|
73
|
+
451.36267,27.230774,0.95762783,449.41702,50.397503,0.28309053,432.01416,72.73747,0.60496956
|
|
74
|
+
451.22125,25.733862,0.9410667,449.67697,50.33525,0.3778461,432.32968,72.479324,0.47284836
|
|
75
|
+
452.4408,22.620169,0.8652197,449.69595,50.324062,0.33349735,432.69962,72.61114,0.25099555
|
|
76
|
+
452.59766,20.805674,0.89577013,449.74713,49.96258,0.30555755,432.98145,72.6306,0.0897828
|
|
77
|
+
453.73013,17.738146,0.82926816,447.5794,48.904346,0.24059598,433.2309,72.48654,0.042403568
|
|
78
|
+
455.17593,16.110397,0.54065204,447.57693,48.298992,0.18979661,435.1374,70.17715,0.026642296
|
|
79
|
+
456.51913,14.290302,0.67301893,450.5511,47.090717,0.22624439,434.8925,69.713684,0.044014648
|
|
80
|
+
457.71545,13.588767,0.68447375,450.52054,46.182716,0.21309857,434.35843,69.6884,0.046630066
|
|
81
|
+
459.02747,13.8669615,0.89123917,450.1306,45.832996,0.4844229,432.30518,71.14157,0.05422834
|
|
82
|
+
460.52682,14.251099,0.7855431,450.80515,45.387314,0.3270457,432.0324,71.1387,0.07196752
|
|
83
|
+
461.23972,14.245913,0.69130164,450.41443,45.260418,0.41451007,431.6567,71.12655,0.21798684
|
|
84
|
+
460.5387,16.930105,0.6575714,450.56412,45.35634,0.6483859,431.3135,71.13163,0.34458005
|
|
85
|
+
460.26016,17.50916,0.8029109,450.5231,46.160744,0.7791846,431.54977,71.13665,0.34299734
|
|
86
|
+
460.23965,18.397465,0.8703991,450.93323,46.32791,0.87556064,430.87762,71.224335,0.3263267
|
|
87
|
+
460.46844,19.057467,0.8473045,450.9986,46.21194,0.89116555,430.80753,71.09605,0.28094956
|
|
88
|
+
461.367,20.838001,0.28883928,450.78036,46.64988,0.8151598,430.79556,70.99249,0.3824023
|
|
89
|
+
461.04675,24.810747,0.34329742,450.02783,46.965733,0.7544698,430.17868,69.76707,0.62859887
|
|
90
|
+
462.10077,25.853115,0.26938504,450.33768,47.12716,0.7423133,430.04428,69.73064,0.77208865
|
|
91
|
+
462.68234,26.428125,0.25117677,450.18292,46.93383,0.8040483,430.07886,69.641716,0.7725009
|
|
92
|
+
463.68512,27.124378,0.19901426,450.16696,46.707375,0.82411397,430.01138,69.49438,0.7696716
|
|
93
|
+
467.26263,28.167276,0.20903409,450.3857,46.793427,0.8540617,429.9169,69.34043,0.71282244
|
|
94
|
+
467.45746,28.458931,0.25088128,450.8757,47.394215,0.78518736,430.20087,69.26028,0.65115976
|
|
95
|
+
467.22015,27.93804,0.27814582,451.23834,47.105648,0.8373768,430.19778,69.21618,0.6501194
|
|
96
|
+
466.3904,27.698723,0.18894985,451.15683,47.126724,0.7913548,430.78458,69.15909,0.60931724
|
|
97
|
+
466.19763,27.95717,0.21227437,450.9813,46.87953,0.839437,430.74506,69.06585,0.6121624
|
|
98
|
+
466.93335,27.48888,0.318299,450.7709,46.832752,0.8483097,430.768,68.68003,0.6648284
|
|
99
|
+
467.41125,27.174343,0.3175771,451.29102,46.288765,0.9077181,430.79,68.65356,0.6228951
|
|
100
|
+
467.7633,27.35007,0.36879963,451.41772,46.352516,0.91477853,430.9584,68.10584,0.5783075
|
|
101
|
+
468.2507,27.676323,0.31984952,451.5842,46.04663,0.9283726,431.0345,67.68998,0.5779432
|
|
Binary file
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# š Reference Data Guide: Animal Behavior Trajectory Data (.h5 & .csv)
|
|
2
|
+
|
|
3
|
+
This document explains how to process 2D animal behavior trajectory tracking data using Python. The data is available in both original HDF5 (`.h5`) format and converted standard table (`.csv`) format.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Data Structure and Physical Meaning
|
|
8
|
+
|
|
9
|
+
Whether from the original `.h5` file or the converted `.csv` file, the core data representation is the same. This is a typical combination of **Time-series** and **Spatial coordinates** data.
|
|
10
|
+
|
|
11
|
+
### 1.1 What does each "Row" represent?
|
|
12
|
+
|
|
13
|
+
- **Physical Meaning**: **1 Row = 1 Frame**.
|
|
14
|
+
- **Explanation**: Each row of data represents one frame in the video. If your video recording frame rate is 30 fps (30 frames per second), then 30 consecutive rows of data represent 1 second of animal behavior trajectory in the real world. The increasing row number represents the passage of time.
|
|
15
|
+
|
|
16
|
+
### 1.2 What does each "Column" represent?
|
|
17
|
+
|
|
18
|
+
Column data is organized by "Body Part", with each part occupying **3 columns**.
|
|
19
|
+
Taking `nose` as an example:
|
|
20
|
+
|
|
21
|
+
1. `nose_x`: The **X-axis pixel coordinate** of the nose in the current frame of the video (typically with the top-left corner of the frame as the origin 0,0, and rightward as the positive X direction).
|
|
22
|
+
2. `nose_y`: The **Y-axis pixel coordinate** of the nose in the current frame of the video (downward as the positive Y direction).
|
|
23
|
+
3. `nose_confidence` (or likelihood): The **confidence/probability value** of the algorithm model's detection of the nose position in the current frame. The value range is `0.0 ~ 1.0`.
|
|
24
|
+
- `1.0` means the model is 100% confident that the nose is at this (X, Y) coordinate.
|
|
25
|
+
- If the value is very low (e.g., `< 0.6`), it usually means the nose is occluded in this frame, or the image is blurry causing inaccurate model recognition. In this case, the (X, Y) coordinate is **unreliable**.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 2. Reading and Using CSV Files (ā Recommended: Simplest and Most Efficient)
|
|
30
|
+
|
|
31
|
+
The converted `.csv` file already contains intuitive headers, making it most convenient to process using the `pandas` library.
|
|
32
|
+
|
|
33
|
+
### 2.1 Basic Reading Code
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
import pandas as pd
|
|
37
|
+
|
|
38
|
+
# 1. Read CSV file
|
|
39
|
+
csv_path = "control 506.csv"
|
|
40
|
+
df = pd.DataFrame()
|
|
41
|
+
try:
|
|
42
|
+
df = pd.read_csv(csv_path)
|
|
43
|
+
print("ā
CSV data loaded successfully!")
|
|
44
|
+
except FileNotFoundError:
|
|
45
|
+
print("ā File not found, please check the path.")
|
|
46
|
+
|
|
47
|
+
# 2. View data overview
|
|
48
|
+
print(f"Data contains {df.shape[0]} frames and {df.shape[1]} columns of information.")
|
|
49
|
+
print("\nFirst 5 rows preview:")
|
|
50
|
+
print(df.head())
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 2.2 Data Analysis Tips: How to Clean and Extract Data?
|
|
54
|
+
|
|
55
|
+
In actual analysis, we cannot directly trust all coordinates. We must use the `confidence` column to filter out "dirty data" with inaccurate recognition.
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
# Assume we want to study the movement trajectory of the mouse nose
|
|
59
|
+
|
|
60
|
+
# 1. Extract complete nose data
|
|
61
|
+
nose_data = df[['nose_x', 'nose_y', 'nose_confidence']]
|
|
62
|
+
|
|
63
|
+
# 2. [Core Technique] Filter low confidence data
|
|
64
|
+
# Set a threshold, e.g., 0.8. Treat coordinates with confidence < 0.8 as invalid (NaN)
|
|
65
|
+
threshold = 0.8
|
|
66
|
+
valid_nose_data = df.copy() # Copy data to avoid modifying original table
|
|
67
|
+
|
|
68
|
+
# Replace x and y coordinates that don't meet the condition with missing value NaN (Not a Number)
|
|
69
|
+
valid_nose_data.loc[valid_nose_data['nose_confidence'] < threshold, ['nose_x', 'nose_y']] = None
|
|
70
|
+
|
|
71
|
+
# 3. Extract filtered clean coordinates for plotting or calculating velocity
|
|
72
|
+
clean_x = valid_nose_data['nose_x']
|
|
73
|
+
clean_y = valid_nose_data['nose_y']
|
|
74
|
+
|
|
75
|
+
print(f"After filtering, {clean_x.isna().sum()} frames of nose data were excluded due to low confidence.")
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 3. Reading Original HDF5 (.h5) Files
|
|
81
|
+
|
|
82
|
+
If you don't want to generate intermediate CSV files and prefer to read directly from the source using code, you can use `h5py`.
|
|
83
|
+
|
|
84
|
+
### 3.1 HDF5 Internal Structure
|
|
85
|
+
|
|
86
|
+
According to our data's HDFView structure, you need to focus on two internal paths:
|
|
87
|
+
|
|
88
|
+
- `/2Dskeleton/BodyParts`: A one-dimensional byte array storing body part names (e.g., `[b'nose', b'back', b'tail']`).
|
|
89
|
+
- `/2Dskeleton/data2D`: A two-dimensional pure numeric matrix storing coordinates and confidence values.
|
|
90
|
+
|
|
91
|
+
### 3.2 Basic Reading Code
|
|
92
|
+
|
|
93
|
+
```python
|
|
94
|
+
import h5py
|
|
95
|
+
import numpy as np
|
|
96
|
+
import pandas as pd
|
|
97
|
+
|
|
98
|
+
h5_path = "control 506.h5"
|
|
99
|
+
|
|
100
|
+
with h5py.File(h5_path, 'r') as f:
|
|
101
|
+
# 1. Parse body part names (and decode utf-8)
|
|
102
|
+
raw_body_parts = f['/2Dskeleton/BodyParts'][:]
|
|
103
|
+
body_parts = [part.decode('utf-8') if isinstance(part, bytes) else str(part) for part in raw_body_parts]
|
|
104
|
+
|
|
105
|
+
# 2. Read pure numeric matrix
|
|
106
|
+
data2d = f['/2Dskeleton/data2D'][:]
|
|
107
|
+
|
|
108
|
+
# 3. Dynamically reconstruct into DataFrame in memory for easy subsequent processing
|
|
109
|
+
column_names = []
|
|
110
|
+
for part in body_parts:
|
|
111
|
+
column_names.extend([f"{part}_x", f"{part}_y", f"{part}_confidence"])
|
|
112
|
+
|
|
113
|
+
df_from_h5 = pd.DataFrame(data2d, columns=column_names)
|
|
114
|
+
|
|
115
|
+
print("\nā
Data parsed directly from HDF5:")
|
|
116
|
+
print(df_from_h5.head())
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## 4. Advanced Application Scenarios
|
|
120
|
+
|
|
121
|
+
Once you successfully extract clean `X` and `Y` coordinates, you can use them for the following animal behavior analyses:
|
|
122
|
+
|
|
123
|
+
1. **Plot Trajectory Heatmap**: Use `matplotlib` or `seaborn` to plot `(back_x, back_y)` as a 2D histogram to observe which area the mouse prefers to stay in.
|
|
124
|
+
2. **Calculate Total Movement Distance**: Calculate the **Euclidean distance** between coordinate points in each frame and the previous frame ($d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}$), then sum the distances of all frames.
|
|
125
|
+
3. **Calculate Instantaneous Velocity**: Use the distance between adjacent frames divided by the time difference between adjacent frames ($t = 1 / frame rate$).
|
|
126
|
+
4. **Identify Body Posture**: By calculating the distance between `nose` and `tail` points, you can determine whether the mouse is in a stretched or curled state.
|