@@ -69,8 +69,13 @@ def _parse_header(self):
6969 check_suffix = False ,
7070 load = load ,
7171 load_waveforms = False )
72-
73- self .info_dict = self ._recgen .info
72+
73+ self .info_dict = deepcopy (self ._recgen .info )
74+ if self .load_recordings :
75+ self ._recordings = self ._recgen .recordings
76+ if self .load_spiketrains :
77+ self ._spiketrains = self ._recgen .spiketrains
78+
7479 self ._sampling_rate = self .info_dict ['recordings' ]['fs' ]
7580 self .duration_seconds = self .info_dict ["recordings" ]["duration" ]
7681 self ._num_frames = int (self ._sampling_rate * self .duration_seconds )
@@ -80,8 +85,6 @@ def _parse_header(self):
8085 signals = [('Signals' , '0' )]
8186 signal_streams = np .array (signals , dtype = _signal_stream_dtype )
8287
83- if self .load_recordings :
84- self ._recordings = self ._recgen .recordings
8588
8689 sig_channels = []
8790 for c in range (self ._num_channels ):
@@ -100,7 +103,6 @@ def _parse_header(self):
100103 # creating units channels
101104 spike_channels = []
102105 if self .load_spiketrains :
103- self ._spiketrains = self ._recgen .spiketrains
104106 for c in range (len (self ._spiketrains )):
105107 unit_name = 'unit{}' .format (c )
106108 unit_id = '#{}' .format (c )
@@ -129,7 +131,7 @@ def _parse_header(self):
129131 self ._generate_minimal_annotations ()
130132 for block_index in range (1 ):
131133 bl_ann = self .raw_annotations ['blocks' ][block_index ]
132- bl_ann ['mearec_info' ] = deepcopy ( self ._recgen . info )
134+ bl_ann ['mearec_info' ] = self .info_dict
133135
134136 def _segment_t_start (self , block_index , seg_index ):
135137 all_starts = [[0. ]]
0 commit comments