Skip to content
Snippets Groups Projects

new laura folder

Merged Laura Rævsbæk Birch requested to merge au620747-main-patch-86964 into main
1 file
+ 80
0
Compare changes
  • Side-by-side
  • Inline
+ 35
0
from genericpath import exists
from numpy import tri
import json
from collections import OrderedDict
def create_events_json(path):
data = OrderedDict()
data["onset"] = {
"Description": "Time of event, in seconds since beginning of recording"
}
data["duration"] = {
"Description": "Duration of event (always just 0)"
}
# data["trial_type"] = {
# "LongName": "Event type", "Levels": {
# "Beginning of Recording": "Time subject turned on amplifier",
# "Lights Off": "Time(from start) that subject turn the lights off",
# "Artifact": "Manual marking by sleep scorer",
# "Arousal": "Cortical arousal",
# "Obs": "Manual marking by sleep scorer",
# "Lights On": "Time(from start) that subject got up",
# "End of Study": "End of measurement"
# }
data["trial_type"] = {
"LongName": "Event type", "Levels": {
"Boundary": "Event marking the beginning of a recording",
"Trigger": "Trigger event from patient",
}
}
with open(path, 'w') as outfile:
json.dump(data, outfile, indent=4)
\ No newline at end of file
Loading