Skip to content

Packing openephys files into .dat #23

Open

Description

@jofrony

Hi,

I am using Open Ephys with Neuronexus probes. We have previously used the archive code to pack our Open Ephys files into .dat file which is required by Kilosort. Is this function available in these tools or are there other ways to do it?

Activity

  1. medengineer commented on Jul 13, 2023

    @medengineer
    Member

    Hi,

    Yes, you just need to load the continuous[0].samples and call np.tofile on that array.

  2. jsiegle commented on Jul 13, 2023

    @jsiegle
    Member

    For example, for the data in the first data stream saved by the first record node, this is the code you'd need:

    from open_ephys.analysis import Session
    
    session = Session('/path/to/data/directory')
    data = session.recordnodes[0].recordings[0].continuous[0].samples
    data = data.astype('int16') # convert to 16-bit integers before export
    data.tofile('continuous.dat') # write samples to a .dat file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions