-
Notifications
You must be signed in to change notification settings - Fork 0
Z Struct Data
ZStructs are loaded by reading the .bin files in a run folder, and converting the data into an NWB file. in the dataset YAML block, the parameters are:
dataset_type: zstruct
autoload: bool
save_path: path
dataset_parameters:
experiment_type: monkey_brain
server_dir: Z:\Data\Humans\RPNI
alt_filepath: None
subject: "Joker"
subject_id: "Monkey N"
date: YYYY-MM-DD
runs: 3The experiment_type parameter points to a YAML file (located in neuraldecoding/dataset/loader_configs/zstruct) which specifies all the info needed to load the zstruct and save it to an NWB file. This file contains num_channels, institution, lab, reference_time (which points to the experiment time field), device, electrode_group, a block of modules (where to save the timeseries data), a timeseries block (each timeseries of the zstruct should be named here, and indicate which module it goes to and what type of nwb array it is). I have made a YAML file for the most common types of experiments we run (monkey brain, monkey emg, human emg). If you need to create a new one (e.g. because you are loading a zstruct with different timeseries columns) all you'll need to do is copy the closest one, and add/change the appropriate timeseries block (and update any metadata you need).
A timeseries block looks like the following:
ExampleField:
module: behavior # this is the module it goes to, must be one of the modules defined in the modules block
nwb_type: TimeSeries # Can be any of the data interfaces defined by nwb
nwb_params:
name: "example_field"
description: "insert description"
unit: "unit"Note that since some of the data interfaces have inputs which can't really be defined as parameters here (like electrode table region for electricalseries), if you want to implement something other than what currently is included you'll have to add an if statement to add those parameters (if it has any) to the dictionary fed to the class constructor.
since human emg features are actually multiple features, there is a special 'MultiFeature" nwb_type, see the human_emg.yaml for how to format it.