openreadout_ephys/lib.rs
1//! Readers for electrophysiology recordings that have no other home in OpenReadout:
2//! HEKA PatchMaster bundles (`heka-patchmaster`), CED Spike2 `.smr`/`.smrx` files (`ced-spike2`),
3//! Open Ephys recordings (`open-ephys`, binary and legacy formats), WinWCP `.wcp` files
4//! (`winwcp`), Tucker-Davis Technologies tanks and blocks (`tdt-tank`), Axona DacqUSB sessions
5//! (`axona-dacqusb`) and Multi Channel Systems MC_DataTool binary exports (`mcs-raw`).
6//!
7//! Layout and vocabulary: `docs/formats/heka-patchmaster.md`, `docs/formats/ced-spike2.md`,
8//! `docs/formats/open-ephys.md`, `docs/formats/winwcp.md`, `docs/formats/tdt-tank.md`,
9//! `docs/formats/axona-dacqusb.md`, `docs/formats/mcs-raw.md`.
10//! Provenance: `docs/provenance/heka-patchmaster.md` (HEKA's public file-format documents and the
11//! MIT-licensed load-heka-python), `docs/provenance/ced-spike2.md` (Neo's BSD-3 `Spike2RawIO`); no
12//! vendor software or SDK was opened.
13//!
14//! # Example
15//!
16//! ```
17//! use openreadout_core::FormatReader;
18//! use openreadout_ephys::HekaReader;
19//!
20//! let format = HekaReader.descriptor();
21//! assert_eq!(format.id, openreadout_ephys::HEKA_FORMAT_ID);
22//! ```
23//!
24//! Reading a file:
25//!
26//! ```no_run
27//! use std::path::Path;
28//!
29//! use openreadout_core::FormatReader;
30//! use openreadout_ephys::HekaReader;
31//!
32//! let mut dataset = HekaReader.open(Path::new("cell.dat"))?;
33//! let info = dataset.info()?; // headers only
34//! for t in &info.traces {
35//! println!("{:?}: {} sweep(s) at {} Hz", t.name, t.sweep_count, t.sample_rate_hz);
36//! }
37//! let sweep = dataset.read_trace(0, 0, 0, 1000)?; // trace 0, sweep 0, first 1000 samples
38//! println!("{:?}", sweep.channels[0].first());
39//! # Ok::<(), openreadout_core::Error>(())
40//! ```
41//!
42//! # API stability
43//!
44//! The supported API is what this page documents. The parser modules are public only so that
45//! tests and fuzz targets can reach them: they are hidden from this documentation and may change
46//! in any release.
47#![forbid(unsafe_code)]
48#![warn(missing_docs)]
49
50mod assurance;
51#[doc(hidden)]
52pub mod axona;
53#[doc(hidden)]
54pub mod heka;
55#[doc(hidden)]
56pub mod mcsraw;
57#[doc(hidden)]
58pub mod openephys;
59#[doc(hidden)]
60pub mod spike2;
61#[doc(hidden)]
62pub mod tdt;
63#[doc(hidden)]
64pub mod winwcp;
65
66pub use axona::{AXONA_FORMAT_ID, AxonaReader};
67pub use heka::{HEKA_FORMAT_ID, HekaReader};
68pub use mcsraw::{MCS_RAW_FORMAT_ID, McsRawReader};
69pub use openephys::{OPEN_EPHYS_FORMAT_ID, OpenEphysReader};
70pub use spike2::{SPIKE2_FORMAT_ID, Spike2Reader};
71pub use tdt::{TDT_FORMAT_ID, TdtReader};
72pub use winwcp::{WINWCP_FORMAT_ID, WinWcpReader};