Open raeedcho opened 5 years ago
I hadn't considered that use case, as splitTD was originally designed to split each target/movement into its own trial. However, if you want to preserve the sequence it should be possible. Right now linked fields explicitly assumes every field is linked to the split idx_ field. One possible solution could be to make the linked fields input 2-dimensional, so you match each parameter to any arbitrary field. Example: split on idx_trial_start. There are multiple go cues per trial. Linked_fields input is something like {'reward','idx_trial_start'; 'target_location','idx_go_cue'}. With this solution, Reward can get matched to idx_trial_start, but Target Location can get matched to idx_go_cue. So no matter how the code splits up idx_go_cue, there will be a corresponding target_location that makes it into the trial.
Example: In random target task, each trial has multiple targets, and thus multiple target locations. I'm not sure how exactly splitTD or TrialData in general should deal with splitting or storing that, but it's a potential issue nonetheless.