aqnwb 0.1.0
Loading...
Searching...
No Matches
ElectricalSeries.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string>
4
5#include "Channel.hpp"
6#include "Utils.hpp"
7#include "io/BaseIO.hpp"
8#include "io/ReadIO.hpp"
11
12namespace AQNWB::NWB
13{
18{
19public:
20 // Register the TimeSeries as a subclass of Container
22
23
28 ElectricalSeries(const std::string& path, std::shared_ptr<IO::BaseIO> io);
29
34
55 const Types::ChannelVector& channelVector,
56 const std::string& description,
57 const float& conversion = 1.0f,
58 const float& resolution = -1.0f,
59 const float& offset = 0.0f);
60
74 Status writeChannel(SizeType channelInd,
75 const SizeType& numSamples,
76 const void* dataInput,
77 const void* timestampsInput,
78 const void* controlInput = nullptr);
79
84
88 std::unique_ptr<IO::BaseRecordingData> m_channelConversion;
89
93 std::unique_ptr<IO::BaseRecordingData> m_electrodesDataset;
94
97 float,
98 "data/channel_conversion",
99 Channel - specific conversion factor)
100
101 DEFINE_FIELD(readData, DatasetField, float, "data", Recorded voltage data)
102
105 std::string,
106 "data/unit",
107 Base unit of measurement for working with the data.
108 This value is fixed to volts)
109
113 int,
114 "electrodes",
115 The indices of the electrodes that generated this electrical series.)
116
119 std::string,
120 "electrodes/description",
121 The electrodes that generated this electrical series.)
122
126 "electrodes/table",
127 The electrodes table retrieved from the object referenced in the
128 `electrodes / table` attribute.)
129
130private:
135};
136} // namespace AQNWB::NWB
AQNWB::Types::Status Status
Definition BaseIO.hpp:22
AQNWB::Types::SizeArray SizeArray
Definition BaseIO.hpp:23
AQNWB::Types::SizeType SizeType
Definition Channel.hpp:8
#define DEFINE_REFERENCED_REGISTERED_FIELD(name, registeredType, fieldPath, description)
Defines a lazy-loaded accessor function for reading fields that are RegisteredTypes that are linked t...
Definition RegisteredType.hpp:472
#define REGISTER_SUBCLASS(T, NAMESPACE)
Macro to register a subclass with the RegisteredType class registry.
Definition RegisteredType.hpp:373
#define DEFINE_FIELD(name, storageObjectType, default_type, fieldPath, description)
Defines a lazy-loaded field accessor function.
Definition RegisteredType.hpp:407
Class for storing acquisition system channel information.
Definition Channel.hpp:16
The configuration for an array dataset.
Definition BaseIO.hpp:200
Status initialize()
Initialize the container.
Definition Container.cpp:20
std::unique_ptr< IO::ReadDataWrapper< DatasetField, VTYPE > > readData() const
std::unique_ptr< IO::ReadDataWrapper< AttributeField, VTYPE > > readChannelConversion() const
SizeArray m_samplesRecorded
The number of samples already written per channel.
Definition ElectricalSeries.hpp:134
~ElectricalSeries()
Destructor.
Definition ElectricalSeries.cpp:20
std::unique_ptr< IO::BaseRecordingData > m_channelConversion
Pointer to channel-specific conversion factor dataset.
Definition ElectricalSeries.hpp:88
std::shared_ptr< RTYPE > readElectrodesTable() const
std::unique_ptr< IO::ReadDataWrapper< AttributeField, VTYPE > > readElectrodesDescription() const
ElectricalSeries(const std::string &path, std::shared_ptr< IO::BaseIO > io)
Constructor.
Definition ElectricalSeries.cpp:13
Types::ChannelVector m_channelVector
Channel group that this time series is associated with.
Definition ElectricalSeries.hpp:83
std::unique_ptr< IO::ReadDataWrapper< DatasetField, VTYPE > > readElectrodes() const
std::unique_ptr< IO::ReadDataWrapper< AttributeField, VTYPE > > readDataUnit() const
Status writeChannel(SizeType channelInd, const SizeType &numSamples, const void *dataInput, const void *timestampsInput, const void *controlInput=nullptr)
Writes a channel to an ElectricalSeries dataset.
Definition ElectricalSeries.cpp:105
std::unique_ptr< IO::BaseRecordingData > m_electrodesDataset
Pointer to electrodes dataset.
Definition ElectricalSeries.hpp:93
Represents a table containing electrode metadata.
Definition ElectrodeTable.hpp:16
TimeSeries(const std::string &path, std::shared_ptr< IO::BaseIO > io)
Constructor.
Definition TimeSeries.cpp:20
std::unique_ptr< IO::BaseRecordingData > data
Pointer to data values.
Definition TimeSeries.hpp:127
std::vector< Channel > ChannelVector
Alias for a vector of channels.
Definition Types.hpp:86
Namespace for all classes related to the NWB data standard.
Definition TimeSeries.hpp:12
constexpr auto AttributeField
Alias for AQNWB::Types::StorageObjectType::Attribute.
Definition RegisteredType.hpp:23
constexpr auto DatasetField
Alias for AQNWB::Types::StorageObjectType::Dataset.
Definition RegisteredType.hpp:28