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 "BaseIO.hpp"
6#include "Channel.hpp"
8
9namespace AQNWB::NWB
10{
15{
16public:
38 ElectricalSeries(const std::string& path,
39 std::shared_ptr<BaseIO> io,
42 const std::string& description,
43 const SizeArray& dsetSize,
44 const SizeArray& chunkSize,
45 const float& conversion = 1.0f,
46 const float& resolution = -1.0f,
47 const float& offset = 0.0f);
48
53
57 void initialize();
58
67 Status writeChannel(SizeType channelInd,
68 const SizeType& numSamples,
69 const void* data,
70 const void* timestamps);
71
76
80 std::unique_ptr<BaseRecordingData> channelConversion;
81
85 std::unique_ptr<BaseRecordingData> electrodesDataset;
86
87private:
91 std::string neurodataType = "ElectricalSeries";
92
96 SizeArray samplesRecorded;
97};
98} // namespace AQNWB::NWB
AQNWB::Types::SizeType SizeType
Definition BaseIO.hpp:16
AQNWB::Types::SizeArray SizeArray
Definition BaseIO.hpp:15
Represents a base data type.
Definition BaseIO.hpp:35
General purpose time series.
Definition ElectricalSeries.hpp:15
ElectricalSeries(const std::string &path, std::shared_ptr< BaseIO > io, const BaseDataType &dataType, const Types::ChannelVector &channelVector, const std::string &description, const SizeArray &dsetSize, const SizeArray &chunkSize, const float &conversion=1.0f, const float &resolution=-1.0f, const float &offset=0.0f)
Constructor.
Definition ElectricalSeries.cpp:11
~ElectricalSeries()
Destructor.
Definition ElectricalSeries.cpp:37
void initialize()
Initializes the Electrical Series.
Definition ElectricalSeries.cpp:40
std::unique_ptr< BaseRecordingData > electrodesDataset
Pointer to electrodes dataset.
Definition ElectricalSeries.hpp:85
Types::ChannelVector channelVector
Channel group that this time series is associated with.
Definition ElectricalSeries.hpp:75
std::unique_ptr< BaseRecordingData > channelConversion
Pointer to channel-specific conversion factor dataset.
Definition ElectricalSeries.hpp:80
Status writeChannel(SizeType channelInd, const SizeType &numSamples, const void *data, const void *timestamps)
Writes a channel to an ElectricalSeries dataset.
Definition ElectricalSeries.cpp:87
General purpose time series.
Definition TimeSeries.hpp:14
std::unique_ptr< BaseRecordingData > timestamps
Pointer to timestamp values.
Definition TimeSeries.hpp:79
SizeArray chunkSize
Chunking size used in dataset creation.
Definition TimeSeries.hpp:117
float conversion
Scalar to multiply each element in data to convert it to the specified ‘unit’.
Definition TimeSeries.hpp:123
SizeArray dsetSize
Size used in dataset creation. Can be expanded when writing if needed.
Definition TimeSeries.hpp:112
float resolution
Smallest meaningful difference between values in data, stored in the specified by unit.
Definition TimeSeries.hpp:129
BaseDataType dataType
Data type of the data.
Definition TimeSeries.hpp:84
float offset
Scalar to add to the data after scaling by ‘conversion’ to finalize its coercion to the specified ‘un...
Definition TimeSeries.hpp:135
std::unique_ptr< BaseRecordingData > data
Pointer to data values.
Definition TimeSeries.hpp:74
std::string description
The description of the TimeSeries.
Definition TimeSeries.hpp:101
std::vector< Channel > ChannelVector
Alias for a vector of channels.
Definition Types.hpp:40
Status
Represents the status of an operation.
Definition Types.hpp:22
Namespace for all classes related to the NWB data standard.
Definition TimeSeries.hpp:9