83 explicit NWBFile(std::shared_ptr<IO::BaseIO> io);
88 NWBFile(
const std::string& path, std::shared_ptr<IO::BaseIO> io);
124 const std::string& description =
"a recording session",
125 const std::string& dataCollection =
"",
126 const std::string& sessionStartTime =
"",
127 const std::string& timestampsReferenceTime =
"",
128 const std::optional<AQNWB::NWB::Subject::SubjectSpec>&
129 subjectSpec = std::nullopt);
157 std::vector<Types::ChannelVector> recordingArrays,
158 bool finalizeTable =
true,
210 const std::string& name,
211 const std::string& description,
212 const std::optional<std::string>& sourceDescription = std::nullopt,
213 std::optional<float> timestampResolution = std::nullopt,
214 bool createDurationColumn =
false,
215 std::optional<float> durationResolution = std::nullopt,
216 const bool createAnnotationColumn =
false,
241 const std::string& name,
242 const std::string& description,
243 const std::string& sourceDescription,
244 const std::vector<NWB::DynamicTable::DataSpecPtr>& columnSpecs);
253 const bool createTagsColumn =
false,
const SizeType rowChunkSize = 100);
262 const bool createTagsColumn =
false,
const SizeType rowChunkSize = 100);
271 const bool createTagsColumn =
false,
const SizeType rowChunkSize = 100);
286 const std::string& name,
287 const std::string& description,
288 const bool createTagsColumn =
false,
308 const std::string& name,
309 const std::string& description,
310 const std::vector<NWB::DynamicTable::DataSpecPtr>& columnSpecs);
329 std::vector<Types::ChannelVector> recordingArrays,
330 std::vector<std::string> recordingNames,
332 std::vector<SizeType>& containerIndexes);
348 std::vector<Types::ChannelVector> recordingArrays,
349 std::vector<std::string> recordingNames,
351 std::vector<SizeType>& containerIndexes);
362 std::vector<SizeType>& containerIndexes);
367 "Table of experimental epochs.")
372 "Table of experimental trials.")
376 "intervals/invalid_times",
377 "Table of invalid times.")
382 "table with the extracellular electrodes")
393 A record of the date the file was created and of
394 subsequent modifications)
400 A unique text identifier for the file)
405 "session_description",
406 A description of the experimental session and data in the
412 "session_start_time",
413 Date and time of the experiment or session start)
418 "timestamps_reference_time",
419 Date and time corresponding to time zero of all
466 const std::
string& description,
467 const std::
string& dataCollection,
468 const std::
string& sessionStartTime,
469 const std::
string& timestampsReferenceTime);
AQNWB::Types::Status Status
Definition BaseIO.hpp:21
AQNWB::Types::SizeType SizeType
Definition Channel.hpp:8
#define REGISTER_SUBCLASS(T, BASE, NAMESPACE)
Macro to register a subclass with the RegisteredType class registry.
Definition RegisteredType.hpp:547
#define DEFINE_ATTRIBUTE_FIELD(name, default_type, fieldPath, description)
Defines a lazy-loaded attribute field accessor function.
Definition RegisteredType.hpp:580
#define DEFINE_DATASET_FIELD(readName, writeName, default_type, fieldPath, description)
Defines a lazy-loaded dataset field accessor function.
Definition RegisteredType.hpp:619
#define DEFINE_UNNAMED_REGISTERED_FIELD(readName, writeName, registeredType, fieldPrefixPath, description)
Defines a lazy-loaded accessor function for reading fields that are RegisteredTypes that do not have ...
Definition RegisteredType.hpp:711
#define DEFINE_REGISTERED_FIELD(name, registeredType, fieldPath, description)
Defines a lazy-loaded accessor function for reading fields that are RegisteredTypes.
Definition RegisteredType.hpp:672
Represents a base data type.
Definition BaseIO.hpp:47
Represents a table containing electrode metadata.
Definition ElectrodesTable.hpp:17
A column-based table to store information about events, one event per row. Use EventsTable when each ...
Definition EventsTable.hpp:35
Status initialize()
Initialize the object.
Definition NWBContainer.cpp:17
NWBContainer(const std::string &path, std::shared_ptr< AQNWB::IO::BaseIO > io)
Constructor.
Definition NWBContainer.cpp:11
static const std::string STIMULUS_PATH
The path to the stimulus group in the NWB file.
Definition NWBFile.hpp:58
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordTimestampsReferenceTime(bool reset=false)
Status createSpikeEventSeries(std::vector< Types::ChannelVector > recordingArrays, std::vector< std::string > recordingNames, const IO::BaseDataType &dataType, std::vector< SizeType > &containerIndexes)
Create SpikeEventSeries objects to record data into. Created objects are automatically added to the I...
Definition NWBFile.cpp:590
std::unique_ptr< RTYPE > createAquisitionSeries(std::string &objectName) const
std::unique_ptr< RTYPE > createProcessingModule(std::string &objectName) const
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordFileCreateDate(bool reset=false)
static Status requireIntervalsGroup(std::shared_ptr< IO::BaseIO > io)
Ensure that the intervals group exists in the NWB file.
Definition NWBFile.cpp:317
std::shared_ptr< RTYPE > readInvalidTimes() const
NWBFile(std::shared_ptr< IO::BaseIO > io)
Constructor for NWBFile class.
Definition NWBFile.cpp:37
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readTimestampsReferenceTime() const
std::unique_ptr< RTYPE > createEventsTableInstance(std::string &objectName) const
std::shared_ptr< TimeIntervals > createInvalidTimes(const bool createTagsColumn=false, const SizeType rowChunkSize=100)
Create the Invalid Times table in the INTERVALS_PATH group.
Definition NWBFile.cpp:442
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readSessionDescription() const
std::unique_ptr< RTYPE > createTimeIntervalsInstance(std::string &objectName) const
NWBFile(const NWBFile &)=delete
Deleted copy constructor to prevent construction-copying.
static const std::string ACQUISITION_PATH
The path to the acquisition group in the NWB file.
Definition NWBFile.hpp:52
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordIdentifier(bool reset=false)
std::shared_ptr< RTYPE > readTimeIntervals(std::string &objectName) const
std::shared_ptr< RTYPE > readAquisitionSeries(std::string &objectName) const
static Status requireEventsGroup(std::shared_ptr< IO::BaseIO > io)
Ensure that the events group exists in the NWB file.
Definition NWBFile.cpp:303
std::shared_ptr< TimeIntervals > createEpochs(const bool createTagsColumn=false, const SizeType rowChunkSize=100)
Create the Epochs table in the INTERVALS_PATH group.
Definition NWBFile.cpp:420
std::shared_ptr< RTYPE > readElectrodesTable() const
std::shared_ptr< TimeIntervals > createTimeIntervals(const std::string &name, const std::string &description, const bool createTagsColumn=false, const SizeType rowChunkSize=100)
Create a TimeIntervals table in the INTERVALS_PATH group. Note, this function will fail if the file i...
Definition NWBFile.cpp:451
static const std::string EVENTS_PATH
The path to the root events group in the NWB file.
Definition NWBFile.hpp:64
Status createFileStructure(const std::string &identifierText, const std::string &description, const std::string &dataCollection, const std::string &sessionStartTime, const std::string ×tampsReferenceTime)
Creates the default file structure. Note, this function will fail if the file is in a mode where new ...
Definition NWBFile.cpp:167
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordSessionStartTime(bool reset=false)
std::shared_ptr< RTYPE > readProcessingModule(std::string &objectName) const
static std::shared_ptr< NWBFile > create(const std::string &path, std::shared_ptr< AQNWB::IO::BaseIO > io)
std::shared_ptr< TimeIntervals > createTrials(const bool createTagsColumn=false, const SizeType rowChunkSize=100)
Create the Trials table in the INTERVALS_PATH group.
Definition NWBFile.cpp:431
NWBFile & operator=(const NWBFile &)=delete
Deleted copy assignment operator to prevent copying.
std::shared_ptr< RTYPE > readEpochs() const
std::shared_ptr< RTYPE > readTrials() const
std::unique_ptr< ElectrodesTable > m_electrodeTable
The ElectrodesTable for the file.
Definition NWBFile.hpp:483
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readIdentifier() const
Status createAnnotationSeries(const std::vector< std::string > &recordingNames, std::vector< SizeType > &containerIndexes)
Create AnnotationSeries objects to record data into. Created objects are automatically added to the I...
Definition NWBFile.cpp:665
void cacheSpecifications(const Types::NamespaceInfo &namespaceInfo)
Saves the specification files for the schema.
Definition NWBFile.cpp:701
static const std::string GENERAL_PATH
The path to the general group in the NWB file.
Definition NWBFile.hpp:60
bool isInitialized() const
Check if the NWB file is initialized.
Definition NWBFile.cpp:127
~NWBFile() override
Destructor for NWBFile class.
Definition NWBFile.cpp:52
std::shared_ptr< RTYPE > readEventsTable(std::string &objectName) const
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::AttributeField, VTYPE > > readNWBVersion() const
static const std::string PROCESSING_PATH
The path to the processing group in the NWB file.
Definition NWBFile.hpp:56
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readFileCreateDate() const
std::shared_ptr< ElectrodesTable > createElectrodesTable(std::vector< Types::ChannelVector > recordingArrays, bool finalizeTable=true, const SizeType rowChunkSize=100)
Create ElectrodesTable. Note, this function will fail if the file is in a mode where new objects cann...
Definition NWBFile.cpp:230
std::shared_ptr< EventsTable > createEventsTable(const std::string &name, const std::string &description, const std::optional< std::string > &sourceDescription=std::nullopt, std::optional< float > timestampResolution=std::nullopt, bool createDurationColumn=false, std::optional< float > durationResolution=std::nullopt, const bool createAnnotationColumn=false, const SizeType rowChunkSize=100)
Create an EventsTable in the EVENTS_PATH group. Note, this function will fail if the file is in a mod...
Definition NWBFile.cpp:331
Status createElectricalSeries(std::vector< Types::ChannelVector > recordingArrays, std::vector< std::string > recordingNames, const IO::BaseDataType &dataType, std::vector< SizeType > &containerIndexes)
Create ElectricalSeries objects to record data into. Created objects are automatically added to the I...
Definition NWBFile.cpp:532
static const std::string SPECIFICATIONS_PATH
The path to the specification group in the NWB file.
Definition NWBFile.hpp:54
static const std::string ANALYSIS_PATH
The path to the analysis group in the NWB file.
Definition NWBFile.hpp:62
std::unique_ptr< AQNWB::IO::ReadDataWrapper< AQNWB::NWB::DatasetField, VTYPE > > readSessionStartTime() const
static const std::string INTERVALS_PATH
The path to the root intervals group in the NWB file.
Definition NWBFile.hpp:66
std::shared_ptr< AQNWB::IO::BaseRecordingData > recordSessionDescription(bool reset=false)
A collection of processed data.
Definition ProcessingModule.hpp:27
static std::shared_ptr< RegisteredType > create(const std::string &fullClassName, const std::string &path, std::shared_ptr< IO::BaseIO > io, bool fallbackToBase=false)
Create or retrieve the canonical instance of a registered subclass.
Definition RegisteredType.cpp:87
A container for aggregating epoch data and the TimeSeries that each epoch applies to.
Definition TimeIntervals.hpp:30
General purpose time series.
Definition TimeSeries.hpp:19
The namespace for IO components of AqNWB.
Namespace for all classes related to the NWB data standard.
const std::string namespaceName
Definition core.hpp:21
Provides definitions for various types used in the project.
Definition Types.hpp:24