rec_to_nwb.processing.builder.nwb_file_builder¶
Module Contents¶
Classes¶
| 
 | Unpack data from preprocessing folder specified by arguments, and write those data into NWB file format | 
- 
path¶
- 
logger¶
- 
class NWBFileBuilder(data_path: str, animal_name: str, date: str, nwb_metadata: MetadataManager, process_dio: bool = True, process_mda: bool = True, process_analog: bool = True, process_pos_timestamps: bool = True, video_path: str = '', output_file: str = 'output.nwb', reconfig_header: str = '')¶
- Unpack data from preprocessing folder specified by arguments, and write those data into NWB file format - Parameters
- data_path (string) – path to directory containing all experiments data 
- animal_name (string) – directory name which represents animal subject of experiment 
- date (string) – date of experiment 
- nwb_metadata (MetadataManager) – object contains metadata about experiment 
- process_dio (boolean) – flag if dio data should be processed 
- process_mda (boolean) – flag if mda data should be processed 
- process_analog (boolean) – flag if analog data should be processed 
- video_path (string) – path to directory with video files associated to nwb file 
- output_file (string) – path and name specifying where .nwb file gonna be written 
 
 - 
build()¶
 - 
write()¶
 - 
build_and_append_to_nwb()¶
 - 
__extract_datasets(self, animal_name, date)¶
 - 
build(self)¶
- Build NWBFile - Returns
- Return NWBFile content 
- Return type
- NWBFile 
 
 - 
write(self, content)¶
- Write nwb file handler with colected data into actual file 
 - 
__build_corrupted_data_manager(self)¶
 - 
build_and_append_to_nwb(self, process_mda_valid_time=True, process_mda_invalid_time=True, process_pos_valid_time=True, process_pos_invalid_time=True)¶
- Create and append to existing nwb. Set flag to add it to nwb - Parameters
- process_mda_valid_time (boolean) – True if the mda valid times should be build and append to nwb. Need the mda data inside the nwb. (default True) 
- process_mda_invalid_time (boolean) – True if the mda invalid times should be build and append to nwb. Need the mda data inside the nwb. (default True) 
- process_pos_valid_time (boolean) – True if the pos valid times should be build and append to nwb. Need the pos data inside the nwb. (default True) 
- process_pos_invalid_time (boolean) – True if the pos invalid times should be build and append to nwb. Need the pos data inside the nwb. (default True) 
 
- Raises
- ElementExistException – If element already exist in NWB 
- Returns
- Return NWBFile content 
- Return type
- NWBFile