This PR contains various bugfix and improvements to the current pipeline for extracting trial information
Added a column of trial window into task_params.csv to define the trial window for each task, as a universal trial window definition doesn't make a lot of sense in some tasks (e.g. some tasks have very short time periods between two trials, and don't have pre-trial time as a control
Now a trial is defined as from trigger_time[I] + trial_window[0] to to trigger_time[i+1] + trial_window[0] (note that trial_window[0] is negative most of the time). This ensures that we capture all the events in a trial for tasks with variable inter-trial intervals (e.g. the inter-trial interval in aborted trial and successful trial are not the same). This makes the event extract more accurate and close to what is actually happening during the experiment
Added more error checks when extracting events from trials
Switch to using our own script to handle deleting and overwriting spike2 files gracefully. It is because they are known to have problems frequently when someone else is keeping a spike2 file open. When that happens, it will cause the pipeline to fail.
Added missing dependencies to environment files
This PR has already been tested to run successfully for all the data in the by_session folder
This PR contains various bugfix and improvements to the current pipeline for extracting trial information
task_params.csv
to define the trial window for each task, as a universal trial window definition doesn't make a lot of sense in some tasks (e.g. some tasks have very short time periods between two trials, and don't have pre-trial time as a controltrigger_time[I] + trial_window[0]
to totrigger_time[i+1] + trial_window[0]
(note that trial_window[0] is negative most of the time). This ensures that we capture all the events in a trial for tasks with variable inter-trial intervals (e.g. the inter-trial interval in aborted trial and successful trial are not the same). This makes the event extract more accurate and close to what is actually happening during the experimentThis PR has already been tested to run successfully for all the data in the
by_session
folder