Untitled

mail@pastecode.io avatar
unknown
python
a month ago
900 B
5
Indexable
Never
Example code -- # 1. create_nwb.py # This is the code to create the NWB from scratch "conversion script" sess = NWBSession.new() sess.enrich(RawEyeTrackingCSV("path/to/file.csv")) # ... other enrichments for raw data if needed sess.nwb.add_processing(...) # if an enrichment doesn't exist or you want to put specific data in you can do so directly sess.save("path/to/mysession-raw.nwb") # 2. label_saccades.py sess = NWBSession("path/to/mysession-raw.nwb") sess.enrich(LabelSaccades()) # will open gui sess.save("path/to/mysession-labeled.nwb") # 3. run_analysis.py sess = NWBSession("path/to/mysession-labeled.nwb") print(sess.values("LabelSaccades")) # Will print out all available values you can pull other_values = sess.nwb.processing["my_module"] .. # Can pull directly from NWB as well saccade_values = sess.pull("LabelSaccades.saccades") # Pull out the data # ... do graphing / analysis things
Leave a Comment