catalystneuro / mease-lab-to-nwb

MIT License
3 stars 2 forks source link

Implement SyntalosRecordingExtractor with tsync synchronization #11

Closed alejoe91 closed 3 years ago

alejoe91 commented 3 years ago

This PR implements the SyntalosRecordingExtractor.

It inherits form the IntanRecordingExtractor, but it overrides the time_to_frame and frame_to_time functions to make use of the tsync information. Borrowed acouple of function from edlio.

@CodyCBakerPhD as we discussed, I think it would be nice to add a recording arg to the NwbSortingExtractor.write_sorting(). If the recording is passed, then spike frames are converted to seconds using the recording.frame_to_time(), instead of using the sampling frequency.

alejoe91 commented 3 years ago

@bendichter I still need to do some more testing, but it seems to be working fine :)

alejoe91 commented 3 years ago

@bendichter @CodyCBakerPhD this is ready to go. It only supports syntalos folders with a single rhd, but we can extend it in case there are datasets with more rhd/tsync files

bendichter commented 3 years ago

@alejoe91 thanks for dealing with the tsync issue. I see suggestions above