You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/User-Manual/Data-formats/Binary-format.rst
+66-6Lines changed: 66 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Binary Format
29
29
30
30
**Limitations**
31
31
32
-
* Requires slightly more disk space because it stores two 64-bit timestamps for every sample.
32
+
* Requires slightly more disk space because it stores one 64-bit sample number and one 64-bit timestamp for every sample.
33
33
34
34
* Continuous files are not self-contained, i.e., you need to know the number of channels and the "bit-volts" multiplier in order to read them properly.
35
35
@@ -38,7 +38,9 @@ Binary Format
38
38
File organization
39
39
####################
40
40
41
-
Within a Record Node directory, data for each **experiments** (stop/start acquisition) is contained in its own sub-directory. Experiment directories are further sub-divided for individual **recordings** (stop/start recording).
41
+
Within a Record Node directory, data for each **experiment** is contained in its own sub-directory. The experiment number is incremented whenever acquisition is stopped, which will reset the timestamps/sample numbers to zero. A new :code:`settings.xml` file will be created for every experiment.
42
+
43
+
Experiment directories are further sub-divided for individual **recordings**. The recording number is incremented whenever recording is stopped, which will not reset the timestamps/sample numbers. Data from multiple recordings within the same experiment will have internally consistent timestamps/sample numbers, and will use the same :code:`settings.xml` file.
@@ -122,14 +124,72 @@ More detailed information about each electrode is stored in the :code:`structure
122
124
Reading data in Python
123
125
#######################
124
126
125
-
* **(recommended)** Create a :code:`Session` object using the `open-ephys-python-tools <https://github.com/open-ephys/open-ephys-python-tools>`__ package. The data format will be automatically detected.
127
+
Using :code:`open-ephys-python-tools`
128
+
--------------------------------------
129
+
130
+
The recommended method for loading data in Python is via the `open-ephys-python-tools <https://github.com/open-ephys/open-ephys-python-tools>`__ package, which can be installed via :code:`pip`.
131
+
132
+
First, create a :code:`Session` object that points to the top-level data directory:
The :code:`Session` object provides access to data inside each Record Node. If you only had one Record Node in your signal chain, you can find its recordings as follows:
141
+
142
+
.. code-block:: python
143
+
144
+
recordings = session.recordnodes[0]
145
+
146
+
:code:`recordings` is a list of :code:`Recording` objects, which is a flattened version of the original Record Node directory. For example, if you have three "experiments," each with two "recordings," there will be six total :code:`Recording` objects in this list. The one at index 0 will be recording 1 from experiment 1, index 1 will be recording 2 from experiment 1, etc.
147
+
148
+
Each :code:`Recording` object provides access to the continuous data, events, spikes, and metadata for the associated recording. To read the continuous data samples for the first data stream, you can use the following code:
* Create a :code:`File` object using the `pyopenephys<https://github.com/CINPLA/pyopenephys>`__ package.
185
+
For more information on how to use the :code:`open-ephys-python-tools` library, check out this `README<https://github.com/open-ephys/open-ephys-python-tools/tree/main/src/open_ephys/analysis>`__
128
186
129
-
* Use the :code:`DatLoad()` method from :code:`Binary.py` in the `open-ephys/analysis-tools <https://github.com/open-ephys/analysis-tools/blob/master/Python3/Binary.py>`__ repository.
187
+
Using :code:`SpikeInterface`
188
+
--------------------------------------
130
189
190
+
You can also load data from the Open Ephys Binary format via `SpikeInterface <https://spikeinterface.readthedocs.io/en/stable/>`__, using the :code:`read_openephys()` method.
131
191
132
192
Reading data in Matlab
133
193
#######################
134
194
135
-
* Use the `open-ephys-matlab-tools <https://github.com/open-ephys/open-ephys-matlab-tools>`__ library.
195
+
Use the `open-ephys-matlab-tools <https://github.com/open-ephys/open-ephys-matlab-tools>`__ library, available via the `Matlab File Exchange <https://www.mathworks.com/matlabcentral/fileexchange/122372-open-ephys-matlab-tools>`__.
Copy file name to clipboardExpand all lines: source/User-Manual/Data-formats/NWB-format.rst
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -106,6 +106,8 @@ Reading data in Python
106
106
107
107
* Create a :code:`Session` object using the `open-ephys-python-tools <https://github.com/open-ephys/open-ephys-python-tools>`__ package. The data format will be automatically detected.
108
108
109
+
* Alternatively, you can use the `PyNWB <https://pynwb.readthedocs.io/en/stable/>`__ package.
Copy file name to clipboardExpand all lines: source/User-Manual/Data-formats/Open-Ephys-format.rst
+63-4Lines changed: 63 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,14 +118,73 @@ Since the samples are saved as 16-bit unsigned integers, converting them to micr
118
118
Reading data in Python
119
119
#######################
120
120
121
-
* **(recommended)** Create a :code:`Session` object using the `open-ephys-python-tools <https://github.com/open-ephys/open-ephys-python-tools>`__ package. The data format will be automatically detected.
122
121
123
-
* Create a :code:`File` object using the `pyopenephys <https://github.com/CINPLA/pyopenephys>`__ package.
122
+
Using :code:`open-ephys-python-tools`
123
+
--------------------------------------
124
124
125
-
* Use the :code:`loadContinuous`, :code:`loadEvents`, or :code:`loadSpikes` methods from :code:`OpenEphys.py` in the `open-ephys/analysis-tools <https://github.com/open-ephys/analysis-tools/blob/master/Python3/OpenEphys.py>`__ repository.
125
+
The recommended method for loading data in Python is via the `open-ephys-python-tools <https://github.com/open-ephys/open-ephys-python-tools>`__ package, which can be installed via :code:`pip`.
126
126
127
+
First, create a :code:`Session` object that points to the top-level data directory:
The :code:`Session` object provides access to data inside each Record Node. If you only had one Record Node in your signal chain, you can find its recordings as follows:
136
+
137
+
.. code-block:: python
138
+
139
+
recordings = session.recordnodes[0]
140
+
141
+
:code:`recordings` is a list of :code:`Recording` objects, which is a flattened version of the original Record Node directory. For example, if you have three "experiments," each with two "recordings," there will be six total :code:`Recording` objects in this list. The one at index 0 will be recording 1 from experiment 1, index 1 will be recording 2 from experiment 1, etc.
142
+
143
+
Each :code:`Recording` object provides access to the continuous data, events, spikes, and metadata for the associated recording. To read the continuous data samples for the first data stream, you need to first set the sample range (to prevent all samples from being loaded into memory), and then call :code:`get_samples()`:
For more information on how to use the :code:`open-ephys-python-tools` library, check out this `README <https://github.com/open-ephys/open-ephys-python-tools/tree/main/src/open_ephys/analysis>`__
181
+
182
+
Using :code:`SpikeInterface`
183
+
--------------------------------------
184
+
185
+
You can also load data from the Open Ephys Binary format via `SpikeInterface <https://spikeinterface.readthedocs.io/en/stable/>`__, using the :code:`read_openephys()` method.
127
186
128
187
Reading data in Matlab
129
188
#######################
130
189
131
-
* Use the `open-ephys-matlab-tools <https://github.com/open-ephys/open-ephys-matlab-tools>`__ library.
190
+
Use the `open-ephys-matlab-tools <https://github.com/open-ephys/open-ephys-matlab-tools>`__ library, available via the `Matlab File Exchange <https://www.mathworks.com/matlabcentral/fileexchange/122372-open-ephys-matlab-tools>`__.
0 commit comments