README.md 3.1 KB

Real-time accuracy of trigger output generation

For each behavioral session with real-time trigger generation, we created a single DeepLabCut project dedicated for post hoc estimation of whisker tips to use it as the "ground-truth" data.

Based on this ground-truth dataset, we computed the conditional probability of trigger generation for the whiskers being located at each position to characterize the accuracy of trigger output signals.

1. Analyzed data

The analyzed-data.h5 HDF5 file contains infomation on each video.

1-1. Code

The code to generate this dataset is found in 01_data-formatting.ipynb, and the panels generated during the procedures are in:

  • F01_trace-comparison: comparison of traces between real-time and post-hoc estimation.
  • F02_densities: plots of dwell-time histograms used in the paper.
  • F03_conditional-probability: plots of conditional probability densities used in the paper.

1-2. Entries in analyzed-data.h5

Each video comprises one entry under the root, numbered as 001, 002, etc.

Attributes

Attributes of each entry contains the information of the video, such as:

  • subject: name of the animal.
  • session: name of the behavioral session.
  • run: the index / starting time stamp of the video.
  • expression: the expression used to turn the positions of whisker tips into the status of trigger output.
  • px_per_mm: the scale information computed from the video.

Subgroups

  1. "pose" group store the estimation of each whisker-tip positions. It contains two subgroups corresponding to realtime and posthoc estimations.
  2. "evaluation" group store the result of evaluation. Traces in realtime and posthoc store the values of expression at given time. The trigger data holds the output of the evaluation.
  3. "densities" group stores the dwell-time histograms generated using the kernel-density estimation method.
    • kernel: the attributes contain the information of the Gaussian kernel (in pixels) used for kernel density estimation.
    • positions: the list of positions (in pixels) used to estimate the dwell-time density.
    • all: the values of dwell-time densities, during the whole recording period of the video, based on the post hoc estimation.
    • triggered: the values of dwell-time densities, when the real-time trigger was active, based on the post hoc estimation.
  4. "conditional" group stores the information on conditional probability of trigger generation.
    • positions: the list of positions (in pixels) used to compute conditional probability.
    • probability: the values of conditional probability at given position.
    • sigmoid: the attributes (in pixels) contain the information on the sigmoid curve (we used the cumulative of Gaussian) fitted to the trace of conditional probability distribution.

2. Summary data

Several types of summary data are found here:

  • 02_summary.ipynb is the Jupyter notebook used to summarize the data in analyzed-data.h5.
  • F04_summary contains the panels generated by the above notebook (and used in the paper).
  • stats.md stores the statistical information analyzed in the above notebook.