Skip to content

Commit bf787ca

Browse files
committed
Added BehaviorDevice table to event.py
1 parent 9c0a85e commit bf787ca

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

element_event/event.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,3 +193,23 @@ class AlignmentEvent(dj.Manual):
193193
-> EventType.proj(end_event_type='event_type') # event after alignment_event_type
194194
end_time_shift: float # (s) WRT end_event_type
195195
"""
196+
197+
@schema
198+
class BehaviorDevice(dj.Imported):
199+
definition = """
200+
-> event.BehaviorRecording
201+
device_name: varchar(16) # e.g. joystick, lick_port
202+
---
203+
sample_rate: float # (Hz) # sampling rate of the acquired data
204+
behavior_timeseries: longblob # array of device's acquired data
205+
behavior_timestamps: longblob # array of timestamps (in second) relative to the start of the BehaviorRecording
206+
"""
207+
208+
def make(self, key):
209+
# from the `key`, retrieve the data directory for this session
210+
# load each device csv file (joystick, lick)
211+
# extract the data and timestamps
212+
# shift timestamps back to the beginning of the session (subject first timestamp from the statemachine file)
213+
# downsample both data and timestamps
214+
# insert the data, timestamps, new fs
215+
pass

0 commit comments

Comments
 (0)