Skip to content

synchronizing between separate recordings #34

Description

@danielpollak

Hello, I am trying to synchronize my neuropixel recordings with my USB-6221 (BNC) NI board. I have two separate recording nodes for these devices. I would like to synchronize them, but the synchronization tutorial seems to assume all processors are on the same recording.

These sources share a physical sync pulse and they are recorded using digital IO. However, the following does not work because the NIDAQ_processor timestamps are not recorded on the NPIX_recording.events dataframe.

# Get recordings
NPIX_recording = session.recordnodes[0].recordings[0]
NIDAQ_recording = session.recordnodes[1].recordings[0]

# Get processors
NPIX_processor = NPIX_recording.events.processor_id.unique()[0]
NIDAQ_processor = NIDAQ_recording.events.processor_id.unique()[0]

# Get NIDAQ_stream
NPIX_recording.add_sync_line(1, NPIX_processor, "ProbeA-AP", main=True)
NIDAQ_stream = NIDAQ_recording.events.stream_name.unique()[0]
NPIX_recording.add_sync_line(1, NIDAQ_processor, NIDAQ_stream, main=False)

NPIX_recording.compute_global_timestamps()

This dataframe attribute is protected so I cannot merge them like so:

# Add events from NIDAQ to NIDAQ
# NPIX_recording.events = pd.concat([NPIX_recording.events, NIDAQ_recording.events])

Is there some way to proceed and synchronize these timestamps?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions