-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update handling of colnames #149
base: main
Are you sure you want to change the base?
Changes from all commits
a38eb84
ff42a15
b64c257
ae82cce
0d02c02
394c693
df9267d
d35cd56
596b908
b580a23
ca4db11
47709f8
8e8d6d6
049e296
e31add9
c80b9be
a1057b4
b3d040c
03b8e71
d69d55c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -152,18 +152,22 @@ class HDF5IO : public BaseIO | |||
const std::string& name) override; | ||||
|
||||
/** | ||||
* @brief Creates a string array attribute at a given location in the file. | ||||
* @brief Creates a variable-length string array attribute at a given location | ||||
* in the file. | ||||
* @param data The string array attribute data. | ||||
* @param path The location in the file to set the attribute. | ||||
* @param name The name of the attribute. | ||||
* @param overwrite Overwrite the attribute if it already exists. | ||||
* @return The status of the attribute creation operation. | ||||
*/ | ||||
Status createAttribute(const std::vector<std::string>& data, | ||||
const std::string& path, | ||||
const std::string& name) override; | ||||
const std::string& name, | ||||
const bool overwrite = false) override; | ||||
|
||||
/** | ||||
* @brief Creates a string array attribute at a given location in the file. | ||||
* @brief Creates a fixed-length string array attribute at a given location in | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. From my understanding this function writes variable length string arrays: Line 780 in d69d55c
However, I think it is maybe unclear since a maximum size is accepted, but this parameter is then overwritten. I'm not sure why that is the case.... |
||||
* the file. | ||||
* @param data The string array attribute data. | ||||
* @param path The location in the file to set the attribute. | ||||
* @param name The name of the attribute. | ||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -40,41 +40,27 @@ class ElectrodeTable : public DynamicTable | |||||
* Initializes the ElectrodeTable by creating NWB related attributes and | ||||||
* adding required columns. | ||||||
* | ||||||
* @param description The description of the table (default: "metadata about | ||||||
* @param description The description of the table (default: "metadata about | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
* @return Status::Success if successful, otherwise Status::Failure. | ||||||
*/ | ||||||
void initialize(const std::string& description = | ||||||
"metadata about extracellular electrodes"); | ||||||
Status initialize(const std::string& description = | ||||||
"metadata about extracellular electrodes"); | ||||||
|
||||||
/** | ||||||
* @brief Finalizes the ElectrodeTable. | ||||||
* | ||||||
* Finalizes the ElectrodeTable by adding the required columns and writing | ||||||
* the data to the file. | ||||||
* @return Status::Success if successful, otherwise Status::Failure. | ||||||
*/ | ||||||
void finalize(); | ||||||
Status finalize(); | ||||||
|
||||||
/** | ||||||
* @brief Sets up the ElectrodeTable by adding electrodes and their metadata. | ||||||
* @param channelsInput The vector of Channel objects to add to the table. | ||||||
*/ | ||||||
void addElectrodes(std::vector<Channel> channelsInput); | ||||||
|
||||||
/** | ||||||
* @brief Gets the group path of the ElectrodeTable. | ||||||
* @return The group path. | ||||||
*/ | ||||||
inline std::string getGroupPath() const | ||||||
{ | ||||||
// all channels in ChannelVector should have the same groupName | ||||||
return m_groupReferences[0]; | ||||||
} | ||||||
|
||||||
/** | ||||||
* @brief Sets the group path of the ElectrodeTable. | ||||||
* @param groupPath The new group path. | ||||||
*/ | ||||||
void setGroupPath(const std::string& groupPath); | ||||||
|
||||||
/** | ||||||
* @brief The path to the ElectrodeTable. | ||||||
*/ | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I am just wondering if there was a specific reason to add the overwrite functionality on this function instead of the version of the
createAttribute
function defined below:Since that version is used during both single string and string array attribute creation and performs similar checks for the attribute already existing?