preprocess_dataset: Preprocess a RAW idoc dataset

View source: R/load.R

preprocess_datasetR Documentation

Preprocess a RAW idoc dataset

Description

  1. Preprocess tracker and controller data

  2. Features expected by the analysis functions are only available after some minor computations in the raw data

Usage

preprocess_dataset(
  experiment_folder,
  dataset,
  treatments = c("TREATMENT_A", "TREATMENT_B"),
  delay = 0,
  border_mm = 5,
  CSplus_idx = 1
)

Arguments

experiment_folder

Path to folder containing IDOC results .csv files

dataset

List of raw data including:

  • roi: every row records the position of one animal at one point in time

  • controller: every row records the status of all IDOC stimulus at one point in time

  • limits

  • border

treatments

Vector of treatments. If named and names contain the word treatment, it is likely that the user is running old API code

delay

Seconds to shift the representation of the treatments on the plot, to account for a latency or lag between treatment delivery start and arrival to behavioral arena

border_mm

mm from center of chamber to decision zone edge

CSplus_idx

Whether the first treatment (CSplus_idx=1) or the second (CSplus_idx=2) is associated with + exits

Value

tracker_data


shaliulab/idocr documentation built on June 1, 2025, 4:59 p.m.