-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from NeurodataWithoutBorders/restructure-class…
…es-and-workflow Restructure classes and workflow
- Loading branch information
Showing
14 changed files
with
442 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
/** | ||
* \page workflow AqNWB Workflow | ||
* | ||
* \tableofcontents | ||
* | ||
* \section recording_workflow Overview of a recording workflow | ||
* | ||
* For users wanting to integrate NWB with a particular data acquisition software, here | ||
* we outline the steps for a single recording from file creation to saving. | ||
* | ||
* 1. Create the I/O object (e.g,. \ref AQNWB::HDF5::HDF5IO "HDF5IO") used for | ||
* writing data to the file on disk. | ||
* 2. Create the \ref AQNWB::NWB::RecordingContainers "RecordingContainers" object | ||
* used for managing \ref AQNWB::NWB::Container "Container" objects for storing recordings. | ||
* 3. Create the \ref AQNWB::NWB::NWBFile "NWBFile" object used for managing and creating NWB | ||
* file contents. | ||
* 4. Create the \ref AQNWB::NWB::Container "Container" objects (e.g., | ||
* \ref AQNWB::NWB::ElectricalSeries "ElectricalSeries") used for recording and add them | ||
* to the \ref AQNWB::NWB::RecordingContainers "RecordingContainers". | ||
* 5. Start the recording. | ||
* 6. Write data. | ||
* 7. Stop the recording and close the \ref AQNWB::NWB::NWBFile "NWBFile". | ||
* | ||
* Below, we walk through these steps in more detail. | ||
* | ||
* | ||
* \subsection create_io 1. Create the I/O object. | ||
* | ||
* First, create an I/O object (e.g., \ref AQNWB::HDF5::HDF5IO "HDF5IO") used for writing | ||
* data to the file. AqNWB provides the convenience method, \ref AQNWB::createIO "createIO" | ||
* to create this object using one of the supported backends. For more fine-grained | ||
* control of different backend parameters, you can create your own `std::shared_ptr` | ||
* using any of the derived \ref AQNWB::BaseIO "BaseIO" classes. | ||
* | ||
* \snippet tests/examples/testWorkflowExamples.cpp example_workflow_io_snippet | ||
* | ||
* | ||
* \subsection create_recording_container 2. Create the RecordingContainer object. | ||
* | ||
* Next, create a \ref AQNWB::NWB::RecordingContainers "RecordingContainers" object to manage the | ||
* different \ref AQNWB::NWB::Container "Container" objects with the datasets that you would | ||
* like to write data to. | ||
* | ||
* \snippet tests/examples/testWorkflowExamples.cpp example_workflow_recording_containers_snippet | ||
* | ||
* | ||
* \subsection create_nwbfile 3. Create the NWBFile | ||
* | ||
* Next, constructs the \ref AQNWB::NWB::NWBFile "NWBFile" object, using the I/O object as an input. | ||
* Then, initialize the object to create the basic file structure of the NWBFile. | ||
* | ||
* \snippet tests/examples/testWorkflowExamples.cpp example_workflow_nwbfile_snippet | ||
* | ||
* | ||
* \subsection create_datasets 4. Create datasets and add to RecordingContainers. | ||
* | ||
* Next, create the different data types (e.g. \ref AQNWB::NWB::ElectricalSeries "ElectricalSeries" | ||
* or other AQNWB::NWB::TimeSeries "TimeSeries") that you would like to write data into. After | ||
* creation, these objects are added to the \ref AQNWB::NWB::RecordingContainers "RecordingContainers" | ||
* object so that it can mana ge access and data writing during the recording process. | ||
* When adding containers, ownership of the \ref AQNWB::NWB::Container "Container" is transferred to the | ||
* \ref AQNWB::NWB::RecordingContainers "RecordingContainers" object, so that we can access it again via | ||
* its index. New containers will always be appended to the end of the | ||
* \ref AQNWB::NWB::RecordingContainers::containers "containers" object and their index can be tracked | ||
* using the size of the input `recordingArrays`. | ||
* | ||
* \snippet tests/examples/testWorkflowExamples.cpp example_workflow_datasets_snippet | ||
* | ||
* | ||
* \subsection start_recording 5. Start the recording. | ||
* | ||
* Then, start the recording process with a call to the ``startRecording`` function of the I/O object. | ||
* | ||
* \note | ||
* When using \ref AQNWB::HDF5::HDF5IO "HDF5IO" for writing to HDF5, calling | ||
* \ref AQNWB::HDF5::HDF5IO::startRecording "startRecording" will by default enable | ||
* \ref hdf5io_swmr "SWMR mode" to ensure file integrity and support concurrent read. | ||
* As a result, no additional datasets or groups can be added to the file once a recording | ||
* has been started unless the file is is closed and reopened. | ||
* | ||
* \snippet tests/examples/testWorkflowExamples.cpp example_workflow_start_snippet | ||
* | ||
* | ||
* \subsection write_data 6. Write data. | ||
* | ||
* During the recording process, use the \ref AQNWB::NWB::RecordingContainers "RecordingContainers" | ||
* as an interface to access the various \ref AQNWB::NWB::Container "Container" object and corresponding | ||
* datasets and write blocks of data to the file. Calling `flush()` on the I/O object at any time will | ||
* ensure the data is moved to disk. | ||
* | ||
* \snippet tests/examples/testWorkflowExamples.cpp example_workflow_write_snippet | ||
* | ||
* | ||
* \subsection stop_recording 7. Stop the recording and finalize the file. | ||
* | ||
* When the recording process is finished, call `stopRecording` from the I/O object | ||
* to flush any data and close the file. | ||
* | ||
* \snippet tests/examples/testWorkflowExamples.cpp example_workflow_stop_snippet | ||
* | ||
* | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.