Skip to content
This repository was archived by the owner on Mar 23, 2019. It is now read-only.

Saving Data

Mark Cafaro edited this page Apr 15, 2014 · 1 revision

The data acquired by Symphony can be saved into an HDF5 file that can be imported into the Ovation software for querying, etc.

Epoch groups

Tha data in the HDF5 file is organized into a hierarchy of epoch groups. Each epoch group has a small set of properties and contains any number of sub-epoch groups and/or epochs. Each epoch has its own set of properties that capture the protocol parameters and also contains the response data recorded from each device. The stimuli sent to devices are not stored as it is assumed that these can be recreated from the protocol parameters if needed.

Each epoch group can have its own label and keywords but all of the other properties (source, cell ID, etc.) are only set for the top-level group in each file.

The location where the HDF5 file is stored can be chosen by the user but the name of the file is determined by current date, the cell ID and the rig.

Source hierarchy

The top level epoch group in each HDF5 file must indicate which "source" the data comes from. This is an animal, brain region, cell type, etc. (see the "Source Hierarchy" section of the Ovation documentation [1] for more details) and the choices are determined by the contents of the source hierarchy file. It is a simple text file containing a hierarchy of regions indicated by tab indents. To add additional regions simply add new lines to that file with the appropriate indentation preceding each region. The symphonyrc function defines the location of the source hierarchy text file to use.

The HDF5 format does not capture the hierarchy leading to the chosen source so this is stored in a separate XML file. This file is automatically created in the same folder as the HDF5 file.

Notes

Any time that a protocol is paused or stopped user supplied notes can be saved with the other data. These notes are saved into the same XML file as the source hierarchy.

Recovering from a crash

If MATLAB crashes while acquiring data then typically the HDF5 file is still usable. The Symphony .NET framework does not keep the file hanging open all the time, it quickly appends data at the end of each epoch and flushes the changes to disk. This leaves the file in a consistent state almost all of the time. If you wish to acquire additional data and save it to the same file then relaunch MATLAB and create a new epoch group using the same cell ID and rig. You will then be prompted to append to the existing file. The epoch group you create will be a new top-level epoch group in the file. There is currently no way to integrate the new group into the previous hierachy of groups. This can be done later, either during or after importing the file into Ovation. The companion XML file will also be preserved and any additional notes will be appended to it.

Clone this wiki locally