aqnwb 0.1.0
Loading...
Searching...
No Matches
AQNWB Namespace Reference

The main namespace for AqNWB. More...

Namespaces

namespace  HDF5
 Namespace for all components of the HDF5 I/O backend.
 
namespace  IO
 
namespace  NWB
 Namespace for all classes related to the NWB data standard.
 
namespace  SPEC
 

Classes

class  Channel
 Class for storing acquisition system channel information. More...
 
class  Types
 Provides definitions for various types used in the project. More...
 

Functions

static std::string generateUuid ()
 Generates a UUID (Universally Unique Identifier) as a string.
 
static std::string getCurrentTime ()
 Get the current time in ISO 8601 format with the UTC offset.
 
static bool isISO8601Date (const std::string &dateStr)
 Check that a string is formatted in ISO8601 format.
 
static std::shared_ptr< IO::BaseIOcreateIO (const std::string &type, const std::string &filename)
 Factory method to create an IO object.
 
static std::string mergePaths (const std::string &path1, const std::string &path2)
 Merge two paths into a single path, handling extra trailing and starting "/".
 
static void convertFloatToInt16LE (const float *source, void *dest, SizeType numSamples)
 Method to convert float values to uint16 values. This method was adapted from JUCE AudioDataConverters using a default value of destBytesPerSample = 2.
 
static std::unique_ptr< int16_t[]> transformToInt16 (SizeType numSamples, float conversion_factor, const float *data)
 Method to scale float values and convert to int16 values.
 

Detailed Description

The main namespace for AqNWB.

Function Documentation

◆ convertFloatToInt16LE()

static void AQNWB::convertFloatToInt16LE ( const float * source,
void * dest,
SizeType numSamples )
inlinestatic

Method to convert float values to uint16 values. This method was adapted from JUCE AudioDataConverters using a default value of destBytesPerSample = 2.

Parameters
sourceThe source float data to convert
destThe destination for the converted uint16 data
numSamplesThe number of samples to convert
Here is the caller graph for this function:

◆ createIO()

static std::shared_ptr< IO::BaseIO > AQNWB::createIO ( const std::string & type,
const std::string & filename )
inlinestatic

Factory method to create an IO object.

Returns
A pointer to a BaseIO object

◆ generateUuid()

static std::string AQNWB::generateUuid ( )
inlinestatic

Generates a UUID (Universally Unique Identifier) as a string.

Returns
The generated UUID as a string.
Here is the caller graph for this function:

◆ getCurrentTime()

static std::string AQNWB::getCurrentTime ( )
inlinestatic

Get the current time in ISO 8601 format with the UTC offset.

Returns
The current time as a string in ISO 8601 format.
Here is the caller graph for this function:

◆ isISO8601Date()

static bool AQNWB::isISO8601Date ( const std::string & dateStr)
inlinestatic

Check that a string is formatted in ISO8601 format.

This function only validates the regex pattern but does not check that the time values specified are indeed valid.

Returns
bool indicating whether the string is in ISO8601 form
Here is the caller graph for this function:

◆ mergePaths()

static std::string AQNWB::mergePaths ( const std::string & path1,
const std::string & path2 )
inlinestatic

Merge two paths into a single path, handling extra trailing and starting "/".

This function is useful for constructing paths in HDF5 files, where paths always use "/".

Parameters
path1The first path to merge.
path2The second path to merge.
Returns
The merged path with no extra "/" at the start or end, and exactly one "/" between the two input paths.
Here is the caller graph for this function:

◆ transformToInt16()

static std::unique_ptr< int16_t[]> AQNWB::transformToInt16 ( SizeType numSamples,
float conversion_factor,
const float * data )
inlinestatic

Method to scale float values and convert to int16 values.

Parameters
numSamplesThe number of samples to convert
conversion_factorThe conversion factor to scale the data
dataThe data to convert
Here is the call graph for this function: