Public

Public Documentation

Documentation for exported functions and types for OpenEphysLoader.jl

OpenEphysLoaderModule.

Module to read the binary data files created by the OpenEphys GUI

Provides array interfaces to file contents, without loading the entire file into memory

source

Array types

All array types are subtypes of the abstract type OEArray, and data from continuous files are subtypes of the abstract type OEContArray.

Abstract array for file-backed OpenEphys data.

All subtypes support a ready-only array interface and should be constructable with a single IOStream argument.

source

Abstract array for file-backed continuous OpenEphys data.

Will throw CorruptedException if the data file has a corrupt OriginalHeader, is not the correct size for an .continuous file, or contains corrupt data blocks.

Subtype of abstract type OEArray are read only, and have with the following fields:

Fields

contfile ContinuousFile for the current file.

block buffer object for the data blocks in the file.

blockno the current block being access in the file.

check Bool to check each data block's validity.

source

The following array types can be used to access different aspects of the data:

SampleArray([type::Type{T},] file::Union{IO, String}, [check::Bool, filepath::String])

Subtype of OEContArray to provide file backed access to OpenEphys sample values. If type is a floating point type, then the sample value will be converted to voltage (in uV). Otherwise, the sample values will remain the raw ADC integer readings.

source
TimeArray([type::Type{T},] file::Union{IO, String}, [check::Bool, filepath::String])

Subtype of OEContArray to provide file backed access to OpenEphys time stamps. If type is a floating point type, then the time stamps will be converted to seconds. Otherwise, the time stamp will be the sample number.

source
RecNoArray([type::Type{T},] file::Union{IO, String}, [check::Bool, filepath::String])

Subtype of OEContArray to provide file backed access to OpenEphys numbers.

source

Alternatively, all three aspects can be accessed simultaneously:

JointArray([type::Type{T},] file::Union{IO, String}, [check::Bool, filepath::String])

Subtype of OEContArray to provide file backed access to OpenEphys data. Returns a tuple of type type, whose values represent (samplevalue, timestamp, recordingnumber). For a description of each, see SampleArray, TimeArray, and RecNoArray, respectively.

source

Information types

The following types provide information about OpenEphys files

OriginalHeader(io::IOStream)

Data in the header of binary OpenEphys files.

Will throw CorruptedException if header is corrupt, not an "OpenEphys" data format, or not version 0.4 of the data format.

Fields

format is the name of the data format.

version is the version number of the data format.

headerbytes is the number of bytes in the header.

description is a description of the header.

created is the date and time the file was created.

channel is the name of the channel used to acquire this data.

channeltype is the type of channel used to acquire this data.

samplerate is the sampling rate in Hz.

blocklength is the length in bytes of each block of data within the file.

buffersize is the size of the buffer used during acquisition, in bytes.

bitvolts are the Volts per ADC bit.

source
ContinuousFile(io::IOStream)

Type for an open continuous file.

Fields

io IOStream object.

filepath Path to underlying file, possibly empty

nsample number of samples in a file.

nblock number of data blocks in a file.

header OriginalHeader of the current file.

source

Recording metadata

Information about the recording session can be gathered from the settings.xml and Continuous_Data.openephys files by using the metadata function. The contents of the metadata files are contained in the OEExperMeta datatype.

metadata([dirpath::AbstractString = pwd()]; settingsfile = "settings.xml", continuousmeta="Continuous_Data.openephys")

Top-level function to read a directory and parse the settings.xml and Continuous_data.openeephys files.

returns a OEExperMeta.

source
OEExperMeta{S<:AbstractString, T<:OEProcessor}(s::OESettings, exper::LightXML.XMLElement)

Type to represent the Experiment metadata in Continuous_Data.openephys.

Construct with the OESettings from settings.xml and XML experiment element.

Fields

file_version VersionNumber continuous file format version

experiment_number Int experiment number

separate_files Bool true if files are separate

recordings Vector{OERecordingMeta{T}} Vector of each OERecordingMeta within the experiment

settings OESettings of the settings.xml file

source
OESettings{S<:AbstractString, T<:OEProcessor}(xdoc::LightXML.XMLDocument)

Type to represent information in the settings.xml file made by the Open Ephys GUI.

Construct with the XML document for settings.xml

Fields

info OEInfo GUI info.

recording_chain OESignalTree Signal tree that leads to recording processors.

source
OEInfo{T<:AbstractString}(info_e::LigthXML.XMLElement)

Type to represent the info element in settings.xml made by Open Ephys.

Construct with the XML info element.

Fields

gui_version VersionNumber GUI version

plugin_api_version VersionNumber plugin API version. If gui_version is less than 0.4.0 then this will be 0

datetime DateTime date and time that settings.xml was made

os T Operating system of computer running GUI

machine T hostname of computer running GUI

source
OERecordingMeta{T<:OEProcessor}(settings::OESettings, rec_e::LightXML.XMLElement)

Type that represents recording metadata in Continuous_Data.openephys file made by the Open Ephys GUI.

Construct with a OESettings from the settings.xml file, and the XML recording element of the Continuous_Data.openephys file.

Fields

number Int Recording number

samplerate Float64 Sampling rate

recording_processors Vector{T} list of recording processors

source
OEProcessor{T<:AbstractString}

Abstract type for recording Open Ephys processors.

source
OERhythmProcessor{T<:AbstractString}(proc_e::LightXML.XMLElement)

Type for Rhythm processor metadata, subtype of OEProcessor.

Construct with XML element for processor.

Fields

id Int of processor ID in GUI

lowcut Float64 of low pass filter cutoff on headstages

highcut Float64 of high pass filter cutoff on headstages

adcs_on Bool true if ADCs on

noiseslicer Bool true if noiseslicer used for ADC

ttl_fastsettle Bool true if TTL fast settle used

dac_ttl Bool true if dac ttl is on

dac_hpf Bool true if dac hpf is on

dsp_offset Bool true if headstage DSP offset removal is used

dsp_cutoff Float64 of DSP high pass filter cutoff

channels Vector{OEChannel{T}} list of OEChannel in Rhythm processor

source
OEChannel{T<:AbstractString}

Type for continuous recording channel metadata

Fields

name T of channel name

number Int of channel number in GUI

bitvolts Float64 of volts per ADC bit

position Vector{Int} vector of start position in the file for each recording's data.

filename T name of associated .continuous file

source

Exceptions

Exception type to indicate a malformed data file

source