How FlyPAD measures feeding

What the FlyPAD records, how the analysis turns it into metrics, and how to read them.

Each FlyPAD arena gives a fly two small food electrodes. The capacitance of an electrode jumps every time the fly touches the food with its proboscis, and changes more slowly when it stands on or next to the electrode. The analysis turns this signal into events - sips, visits (activity bouts) and feeding bursts - and from them into one value per fly for every metric described here.

✓ All descriptions on these pages have been reviewed against the current analysis code.
1Raw capacitance100 samples per second from each food electrode
2Clean signalmedian filter and drift removal
3Activity boutsperiods of contact with the food electrode
4Sipssingle proboscis contacts: rise + fall
5Feeding burststrains of sips with a regular rhythm
6Per-fly metricscounts, durations, time courses, preference
7Statisticsone value per fly, conditions compared
Figure 1. A real FlyPAD recording (10-minute example, one electrode) analysed with the current code: one activity bout (green area), the sips detected in it (green bands) and the feeding bursts they form (blue bars).
Figure 1. A real FlyPAD recording (10-minute example, one electrode) analysed with the current code: one activity bout (green area), the sips detected in it (green bands) and the feeding bursts they form (blue bars).

Two versions of sip detection

Choose the version in Sip detection (menu) or in the setup wizard. Compare results only within one version.

V2 - current versiondefault

A sip's rise and fall must be of similar size (rise at least 0.5 × the fall, and the fall at least 0.5 × the rise). The activity threshold adapts to the noise level.

Synthetic recordings with known sips: 98% found at the right onset, durations within 10 ms; no false sips from noise.

V1 - MATLAB

Identical to the MATLAB analysis (ProcessDataDamPAD), for comparison with results analysed in MATLAB.

The drift removal leaves small echoes of every step; V1 takes some of them as sip onsets (about 12% of sips start ~100 ms early) or pairs them into spurious sips (about 10%).

How values are counted

  • Events (sips, bouts, bursts) are detected per electrode; times are in seconds (1 sample = 10 ms).
  • Per-fly metrics summarise the events of one fly on one substrate: counts, totals or medians.
  • A fly without events counts as 0 for counts and totals, and is left out of medians (a median of nothing is undefined) - as in MATLAB.
  • Removed flies (non-eaters, spill quality, flies to remove) are left out of every plot, table and test.
  • Statistics always compare one value per fly between conditions.

All metrics

MetricOne value perUnitTopic
Trimmed recordingper channelsamplesSignal processing
Median-filtered signalper samplecountsSignal processing
Detrended trace Rper samplecountsSignal processing
Activity (RMS) maskper sampletrue/falseSignal processing
Sip onset / offsetper sipsampleSips
Sip durationper sipsSips
Inter-sip interval (IFI / ISI)per pair of consecutive sipssSips
In-burst / isolated sipsper sipsampleSips
Activity bout onset / offset / durationper boutsample, sActivity bouts
Activity bout IBIper pair of consecutive boutssActivity bouts
Active samplesper samplesamplesActivity bouts
Feeding burstper burstsampleFeeding bursts
Burst duration / sips per burst / burst IBIper bursts, count, sFeeding bursts
Bursts per activity boutper activity boutcountFeeding bursts
Insider IBIper gap between bursts inside one activity boutsFeeding bursts
Burst latencyper activity boutsFeeding bursts
Spill quality / unconnected / out of rangeper channelfraction 0-1Quality control and fly removal
Fly removalper fly / channel-Quality control and fly removal
Number of sipsper flycountPer-fly summary metrics
Median sip durationper flysPer-fly summary metrics
Median inter-sip intervalper flysPer-fly summary metrics
Total sip durationper flysPer-fly summary metrics
Total inter-sip intervalsper flysPer-fly summary metrics
Number of activity boutsper flycountPer-fly summary metrics
Median activity bout durationper flysPer-fly summary metrics
Median activity bout IBIper flysPer-fly summary metrics
Total activity bout durationper flysPer-fly summary metrics
Number of feeding burstsper flycountPer-fly summary metrics
Median burst durationper flysPer-fly summary metrics
Median burst IBIper flysPer-fly summary metrics
Median burst latency / bursts per bout / insider IBIper flys, count, sPer-fly summary metrics
Transition IBIper transitionsSubstrate transitions
Number of transitions / median transition IBIper fly and directioncount, sSubstrate transitions
Visit sequence / transition matrixper fly-Substrate transitions
Cumulative sips / feeding burstsper fly and time bincountTime courses
Cumulative activityper fly and time binsTime courses
Non-cumulative (per bin)per fly and time bincount or s per binTime courses
Preference index (sips, activity)per fly and time bin-1 .. 1Time courses
Time-resolved per-fly parametersper fly and time bincount or sTime courses
Sip duration / inter-sip interval histogramsper bincount per flyDistributions
CCDFper valuefractionDistributions
Descriptive statisticsper condition-Statistics
Pairwise testper pair of conditionspStatistics
Omnibus testsper metricpStatistics
Effect sizesper pair of conditions-1..1 / SD unitsStatistics
Peri-trial sip rateper fly and time binsips/sStimulation vs catch
Sips after the trialper trial / per flycountStimulation vs catch
Time until feeding stopsper trial / per flysStimulation vs catch
Latency to feed againper trial / per flysStimulation vs catch
Stim and catch periods of a flyper flysamplesStimulation vs catch
Box-plot and microstructure metrics within periodsper flyper minute or sStimulation vs catch
Paired Wilcoxon testper condition and measurepStimulation vs catch