datajoint/element-event

Improve documentation for use of Trials in `AlignmentEvent`

Closed this issue · 1 comments

Internally, we used the following examples for potential uses of AlignmentEvent:

trial_start cue_on response trial_end

  1. align to cue-on, 1-sec after trial_start and 2-sec before trial_end
  • alignment_event_type = 'cue-on'
  • alignment_time_shift = 0
  • start_event_type = 'trial_start'
  • start_time_shift = 1
  • end_event_type = 'trial_end'
  • end_time_shift = -2
  1. align to response, 3-sec before response and 5-sec after response
  • alignment_event_type = 'response'
  • alignment_time_shift = 0
  • start_event_type = 'response'
  • start_time_shift = -3
  • end_event_type = 'response'
  • end_time_shift = 2

If I'm entering in my trials in the trial schema, I need to duplicate this information in the EventType and Event tables to get item 1 above. Is this the intended structure? If so, I think we should provide a helper function that adds trial start/stop as events automatically. Alternatively, can the proj functions in AlignmentEvent be restructured to inherit from either source?

For such use-case, trial_start_time and trial_end_time are meant to be events to be inserted into the Event table