Project Aeon's main library for interfacing with acquired data. Contains modules for raw data file io, data querying, data processing, data qc, database ingestion, and building computational data pipelines.
BSD 3-Clause "New" or "Revised" License
6
stars
6
forks
source link
Add threshold-specific pellet delivery timestamps as dj table #382
Add here the latest logic discussed and finalized for this procedure
Get all patch state update timestamps: let's call these events "A"
Remove all "A" events near manual pellet delivery events (so we don't include manual pellet delivery events in downstream analysis)
For the remaining "A" events, find the nearest delivery event within 1s: for this delivery event, check if there are any repeat delivery events within 0.5 seconds - take the last of these as the pellet delivery timestamp (discard all "A" events that don't have such a corresponding delivery event)
Now for these 'clean' "A" events, go back in time to the SECOND preceding pellet threshold value: this is the threshold value for this pellet delivery (as seen in this image we discussed before)
This should have the timestamp a pellet was delivered (from beambreak ideally) and the corresponding threshold value