✓ All descriptions on these pages have been reviewed against the current analysis code.
Parameters and their defaults
Set in the setup wizard; the values below are the defaults used in these pages.
| Parameter | Default | Note |
|---|---|---|
duration | 360000 | Total samples (100 Hz → 3600s = 1 hour) |
sampling_rate | 100 | Hz |
rms_window | 300 | Window for RMS computation (3s at 100Hz) |
equality_factor | 0.5 | Threshold ratio for sip detection |
rms_threshold | 1.0 | RMS threshold for activity bout detection |
min_sip_duration | 4 | Minimum sip duration in samples (40ms) |
max_sip_duration | 100 | Maximum sip duration in samples (1s) |
matlab_identical_detection | False | |
bin_size | 1000 | Bin size for cumulative feeding (samples) |
trial_before_s | 10.0 | peri-trial sip rate from -before ... |
trial_after_s | 30.0 | ... to +after |
trial_count_s | 10.0 | sips counted in 0..count after the trial |
trial_bin_s | 1.0 | peri-trial bin width |
remove_substrate_noneaters | False | |
remove_global_noneaters | False | |
non_eater_threshold | 2 | |
remove_spill_quality | False | |
spill_quality_threshold | 0.5 | |
remove_drift | False | |
bonsai_style_activity_bouts | False | |
time_window | 60000 | Time bin for timecourse (samples) |
merge_channels | False | |
save_eps | True |
How this documentation stays current
These pages are generated from the analysis code (flypad/metrics_catalog.py): values such as window sizes and thresholds are read from the code, and figures 1-3 are drawn by running the current detection on a real 10-minute recording. The pages are regenerated automatically whenever analysis code is committed (git hook) or pushed (GitHub Action). Every metric records a fingerprint of the code that computes it; if that code changes, the metric is marked for review until its text has been checked.
Review status of every metric
| Topic | Metric | Code fingerprint | Reviewed |
|---|---|---|---|
| Signal processing | Trimmed recording | 1cd813e2c909 | ✓ |
| Signal processing | Median-filtered signal | d8be006f0b38 | ✓ |
| Signal processing | Detrended trace R | 3bace2a170c0 | ✓ |
| Signal processing | Activity (RMS) mask | 2862c63f0530 | ✓ |
| Sips | Sip onset / offset | 7dab289a3e51 | ✓ |
| Sips | Sip duration | 3bad3cba97d8 | ✓ |
| Sips | Inter-sip interval (IFI / ISI) | 3bad3cba97d8 | ✓ |
| Sips | In-burst / isolated sips | 7533b7f2b4ea | ✓ |
| Activity bouts | Activity bout onset / offset / duration | c71bc6f2f762 | ✓ |
| Activity bouts | Activity bout IBI | 35411d59b9aa | ✓ |
| Activity bouts | Active samples | c71bc6f2f762 | ✓ |
| Feeding bursts | Feeding burst | 3927a72d5a21 | ✓ |
| Feeding bursts | Burst duration / sips per burst / burst IBI | ba07a94537f1 | ✓ |
| Feeding bursts | Bursts per activity bout | f820111caa37 | ✓ |
| Feeding bursts | Insider IBI | f820111caa37 | ✓ |
| Feeding bursts | Burst latency | f820111caa37 | ✓ |
| Quality control and fly removal | Spill quality / unconnected / out of range | d1c39952371d | ✓ |
| Quality control and fly removal | Fly removal | 80da3248e27f | ✓ |
| Per-fly summary metrics | Number of sips | 6de393b9bd79 | ✓ |
| Per-fly summary metrics | Median sip duration | 5f3ccbc35a12 | ✓ |
| Per-fly summary metrics | Median inter-sip interval | 5f893ec021a0 | ✓ |
| Per-fly summary metrics | Total sip duration | 851158f9cd45 | ✓ |
| Per-fly summary metrics | Total inter-sip intervals | 2e3ab6daec84 | ✓ |
| Per-fly summary metrics | Number of activity bouts | 44b4a83110a1 | ✓ |
| Per-fly summary metrics | Median activity bout duration | 09c54c900b5e | ✓ |
| Per-fly summary metrics | Median activity bout IBI | f186d9716318 | ✓ |
| Per-fly summary metrics | Total activity bout duration | 39488e7666aa | ✓ |
| Per-fly summary metrics | Number of feeding bursts | d89ae1334638 | ✓ |
| Per-fly summary metrics | Median burst duration | 50f42d23a4c5 | ✓ |
| Per-fly summary metrics | Median burst IBI | ba2ab74742c7 | ✓ |
| Per-fly summary metrics | Median burst latency / bursts per bout / insider IBI | 55d662449370 | ✓ |
| Substrate transitions | Transition IBI | dd519f804342 | ✓ |
| Substrate transitions | Number of transitions / median transition IBI | 4fe961c25f12 | ✓ |
| Substrate transitions | Visit sequence / transition matrix | be4c0fb2bf42 | ✓ |
| Time courses | Cumulative sips / feeding bursts | 69903d3cb515 | ✓ |
| Time courses | Cumulative activity | 69903d3cb515 | ✓ |
| Time courses | Non-cumulative (per bin) | cc8e1b6009eb | ✓ |
| Time courses | Preference index (sips, activity) | 752f4ca823bd | ✓ |
| Time courses | Time-resolved per-fly parameters | e2a600eeb198 | ✓ |
| Distributions | Sip duration / inter-sip interval histograms | 0245fcda189c | ✓ |
| Distributions | CCDF | ccdca7dfcfa5 | ✓ |
| Statistics | Descriptive statistics | 0c030283b5c3 | ✓ |
| Statistics | Pairwise test | 6d5dd78d06f1 | ✓ |
| Statistics | Omnibus tests | 094b98a130d4 | ✓ |
| Statistics | Effect sizes | 73534e013526 | ✓ |
| Stimulation vs catch | Peri-trial sip rate | 50323d100e3a | ✓ |
| Stimulation vs catch | Sips after the trial | 5770253873bc | ✓ |
| Stimulation vs catch | Time until feeding stops | 5770253873bc | ✓ |
| Stimulation vs catch | Latency to feed again | 5770253873bc | ✓ |
| Stimulation vs catch | Stim and catch periods of a fly | bc494deb5c45 | ✓ |
| Stimulation vs catch | Box-plot and microstructure metrics within periods | 984df77798cf | ✓ |
| Stimulation vs catch | Paired Wilcoxon test | 89751e7903aa | ✓ |
Code fingerprints
Fingerprint of every computation file (comments and docstrings ignored).
| File | Fingerprint |
|---|---|
core/__init__.py | a54504566751 |
core/burst_detection.py | d6ce985e9cfe |
core/data_loader.py | d850b4c3cbb4 |
core/events.py | cf6d57979819 |
core/pipeline.py | 65089f08e549 |
core/post_processing.py | 408beab27bb1 |
core/signal_processing.py | e96034efb937 |
core/sip_detection.py | dca8b9e5c8c8 |
analysis/__init__.py | dd4fab74efa2 |
analysis/cumulative.py | 65d6245b154c |
analysis/distributions.py | 8387620290b9 |
analysis/preference_index.py | 4169c4714937 |
analysis/statistics.py | fdb26462a634 |
analysis/stim_catch.py | f295c37cbe18 |
export/__init__.py | 309da18954e7 |
export/excel_export.py | 98051f89a1a6 |
export/extra_outputs.py | 9d1e3f81bf46 |
export/figure_export.py | 97ef0e0cef8f |
export/text_export.py | 1360e3096326 |
plotting/__init__.py | 15884253ffdc |
plotting/box_plots.py | a13dda1b9d80 |
plotting/ccdf_plots.py | 95342f5f2c5e |
plotting/cumulative_plots.py | 5fc064afba23 |
plotting/histograms.py | fb5ebe52d4d4 |
plotting/microstructure.py | 445a47a99730 |
plotting/preference_plots.py | 3cd0338c8b3c |
plotting/style.py | 32c522d9eb2e |
config/__init__.py | 756e30c3c537 |
config/constants.py | 56a1c037c69c |
config/hardware.py | 42f2693fc864 |
config/labels.py | 10611c3c0444 |
config/parameters.py | 226de15950c6 |
config/viz_preferences.py | 387d9fbd7e13 |