-
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 #25 from lbl-cbg/add-electrical-series
Add electrical series and update recording process
- Loading branch information
Showing
27 changed files
with
1,409 additions
and
338 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
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,41 @@ | ||
#include <string> | ||
|
||
#include "Channel.hpp" | ||
|
||
using namespace AQNWB; | ||
|
||
Channel::Channel(const std::string name, | ||
const std::string groupName, | ||
const SizeType localIndex, | ||
const SizeType globalIndex, | ||
const float conversion, | ||
const float samplingRate, | ||
const float bitVolts, | ||
const std::array<float, 3> position) | ||
: name(name) | ||
, groupName(groupName) | ||
, localIndex(localIndex) | ||
, globalIndex(globalIndex) | ||
, position(position) | ||
, conversion(conversion) | ||
, samplingRate(samplingRate) | ||
, bitVolts(bitVolts) | ||
{ | ||
} | ||
|
||
Channel::~Channel() {} | ||
|
||
float Channel::getConversion() const | ||
{ | ||
return bitVolts / conversion; | ||
} | ||
|
||
float Channel::getSamplingRate() const | ||
{ | ||
return samplingRate; | ||
} | ||
|
||
float Channel::getBitVolts() const | ||
{ | ||
return bitVolts; | ||
} |
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,95 @@ | ||
#pragma once | ||
|
||
#include <array> | ||
#include <string> | ||
|
||
#include "Types.hpp" | ||
|
||
using SizeType = AQNWB::Types::SizeType; | ||
|
||
namespace AQNWB | ||
{ | ||
/** | ||
* @brief Class for storing acquisition system channel information. | ||
*/ | ||
class Channel | ||
{ | ||
public: | ||
/** | ||
* @brief Constructor. | ||
*/ | ||
Channel(const std::string name, | ||
const std::string groupName, | ||
const SizeType localIndex, | ||
const SizeType globalIndex, | ||
const float conversion = 1e6f, // uV to V | ||
const float samplingRate = 30000.f, // placeholder | ||
const float bitVolts = 0.000002f, // least significant bit needed to | ||
// convert 16-bit int to volts | ||
// currently a placeholder | ||
const std::array<float, 3> position = {0.f, 0.f, 0.f}); | ||
|
||
/** | ||
* @brief Destructor | ||
*/ | ||
~Channel(); | ||
|
||
/** | ||
* @brief Getter for conversion factor | ||
* @return The conversion value. | ||
*/ | ||
float getConversion() const; | ||
|
||
/** | ||
* @brief Getter for samplingRate | ||
* @return The samplingRate value. | ||
*/ | ||
float getSamplingRate() const; | ||
/** | ||
* @brief Getter for bitVolts | ||
* @return The bitVolts value. | ||
*/ | ||
float getBitVolts() const; | ||
|
||
/** | ||
* @brief Name of the channel. | ||
*/ | ||
std::string name; | ||
|
||
/** | ||
* @brief Name of the array group the channel belongs to. | ||
*/ | ||
std::string groupName; | ||
|
||
/** | ||
* @brief Index of channel within the recording array. | ||
*/ | ||
SizeType localIndex; | ||
|
||
/** | ||
* @brief Index of channel across the recording system. | ||
*/ | ||
SizeType globalIndex; | ||
|
||
/** | ||
* @brief Coordinates of channel (x, y, z) within the recording array. | ||
*/ | ||
std::array<float, 3> position; | ||
|
||
private: | ||
/** | ||
* @brief Conversion factor. | ||
*/ | ||
float conversion; | ||
|
||
/** | ||
* @brief Sampling rate of the channel. | ||
*/ | ||
float samplingRate; | ||
|
||
/** | ||
* @brief floating point value of microvolts per bit | ||
*/ | ||
float bitVolts; | ||
}; | ||
} // namespace AQNWB |
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
Oops, something went wrong.