@@ -13,35 +13,43 @@ def __init__(self, spec):
1313
1414 acq_spec = self .spec .get_group ('acquisition' )
1515 self .unmap (acq_spec )
16- raw_ts_spec = acq_spec .get_neurodata_type ('NWBDataInterface' )
17- self . map_spec ( 'acquisition' , raw_ts_spec )
16+ self . map_spec ( 'acquisition' , acq_spec .get_neurodata_type ('NWBDataInterface' ) )
17+
1818 self .map_spec ('analysis' , self .spec .get_group ('analysis' ).get_neurodata_type ('NWBContainer' ))
1919
20+ # map constructor arg and property 'stimulus' -> stimulus__presentation
2021 stimulus_spec = self .spec .get_group ('stimulus' )
2122 self .unmap (stimulus_spec )
2223 self .map_spec ('stimulus' , stimulus_spec .get_group ('presentation' ).get_neurodata_type ('TimeSeries' ))
2324 self .map_spec ('stimulus_template' , stimulus_spec .get_group ('templates' ).get_neurodata_type ('TimeSeries' ))
2425
2526 intervals_spec = self .spec .get_group ('intervals' )
27+ self .map_spec ('intervals' , intervals_spec .get_neurodata_type ('TimeIntervals' ))
28+
2629 epochs_spec = intervals_spec .get_group ('epochs' )
2730 self .map_spec ('epochs' , epochs_spec )
31+
2832 trials_spec = intervals_spec .get_group ('trials' )
2933 self .map_spec ('trials' , trials_spec )
30- self .map_spec ('intervals' , intervals_spec .get_neurodata_type ('TimeIntervals' ))
34+
35+ invalid_times_spec = intervals_spec .get_group ('invalid_times' )
36+ self .map_spec ('invalid_times' , invalid_times_spec )
3137
3238 general_spec = self .spec .get_group ('general' )
39+
3340 icephys_spec = general_spec .get_group ('intracellular_ephys' )
3441 self .map_spec ('ic_electrodes' , icephys_spec .get_neurodata_type ('IntracellularElectrode' ))
35- ecephys_spec = general_spec .get_group ('extracellular_ephys' )
3642 self .map_spec ('sweep_table' , icephys_spec .get_neurodata_type ('SweepTable' ))
43+
44+ ecephys_spec = general_spec .get_group ('extracellular_ephys' )
3745 self .map_spec ('electrodes' , ecephys_spec .get_group ('electrodes' ))
3846 self .map_spec ('electrode_groups' , ecephys_spec .get_neurodata_type ('ElectrodeGroup' ))
39- self . map_spec (
40- 'ogen_sites' ,
41- general_spec .get_group ('optogenetics' ).get_neurodata_type ('OptogeneticStimulusSite' ))
42- self . map_spec (
43- 'imaging_planes' ,
44- general_spec .get_group ('optophysiology' ).get_neurodata_type ('ImagingPlane' ))
47+
48+ self . map_spec ( 'ogen_sites' ,
49+ general_spec .get_group ('optogenetics' ).get_neurodata_type ('OptogeneticStimulusSite' ))
50+
51+ self . map_spec ( 'imaging_planes' ,
52+ general_spec .get_group ('optophysiology' ).get_neurodata_type ('ImagingPlane' ))
4553
4654 general_datasets = ['data_collection' ,
4755 'experiment_description' ,
@@ -62,17 +70,18 @@ def __init__(self, spec):
6270 for dataset_name in general_datasets :
6371 self .map_spec (dataset_name , general_spec .get_dataset (dataset_name ))
6472
65- proc_spec = self .spec .get_group ('processing' )
66- self .unmap (proc_spec )
67- self .map_spec ('processing' , proc_spec .get_neurodata_type ('ProcessingModule' ))
68- # self.unmap(general_spec.get_dataset('stimulus'))
73+ # note: constructor arg and property 'stimulus' is already mapped above, so use a different name here
6974 self .map_spec ('stimulus_notes' , general_spec .get_dataset ('stimulus' ))
7075 self .map_spec ('source_script_file_name' , general_spec .get_dataset ('source_script' ).get_attribute ('file_name' ))
7176
7277 self .map_spec ('subject' , general_spec .get_group ('subject' ))
7378 self .map_spec ('devices' , general_spec .get_group ('devices' ).get_neurodata_type ('Device' ))
7479 self .map_spec ('lab_meta_data' , general_spec .get_neurodata_type ('LabMetaData' ))
7580
81+ proc_spec = self .spec .get_group ('processing' )
82+ self .unmap (proc_spec )
83+ self .map_spec ('processing' , proc_spec .get_neurodata_type ('ProcessingModule' ))
84+
7685 scratch_spec = self .spec .get_group ('scratch' )
7786 self .unmap (scratch_spec )
7887 self .map_spec ('scratch_datas' , scratch_spec .get_neurodata_type ('ScratchData' ))
0 commit comments