@@ -85,7 +85,7 @@ def __init__(self, traces_list, sampling_frequency, t_starts=None, channel_ids=N
8585 }
8686
8787 @staticmethod
88- def from_recording (source_recording , ** job_kwargs ):
88+ def from_recording (source_recording , t_starts = None , ** job_kwargs ):
8989 traces_list , shms = write_memory_recording (source_recording , dtype = None , ** job_kwargs )
9090 if shms [0 ] is not None :
9191 # if the computation was done in parallel then traces_list is shared array
@@ -99,9 +99,10 @@ def from_recording(source_recording, **job_kwargs):
9999 recording = NumpyRecording (
100100 traces_list ,
101101 source_recording .get_sampling_frequency (),
102- t_starts = None ,
102+ t_starts = t_starts ,
103103 channel_ids = source_recording .channel_ids ,
104104 )
105+ return recording
105106
106107
107108class NumpyRecordingSegment (BaseRecordingSegment ):
@@ -211,7 +212,7 @@ def __del__(self):
211212 shm .unlink ()
212213
213214 @staticmethod
214- def from_recording (source_recording , ** job_kwargs ):
215+ def from_recording (source_recording , t_starts = None , ** job_kwargs ):
215216 traces_list , shms = write_memory_recording (source_recording , buffer_type = "sharedmem" , ** job_kwargs )
216217
217218 # TODO later : propagte t_starts ?
@@ -222,7 +223,7 @@ def from_recording(source_recording, **job_kwargs):
222223 dtype = source_recording .dtype ,
223224 sampling_frequency = source_recording .sampling_frequency ,
224225 channel_ids = source_recording .channel_ids ,
225- t_starts = None ,
226+ t_starts = t_starts ,
226227 main_shm_owner = True ,
227228 )
228229
0 commit comments