Skip to content
Snippets Groups Projects
Commit 23e66b7c authored by Laura Rævsbæk Birch's avatar Laura Rævsbæk Birch
Browse files

Upload New File

parent e06341a3
No related branches found
No related tags found
1 merge request!1new laura folder
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment