-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add base schema and classes #3
Conversation
Right now, the authors of the extension are listed as Ryan Ly, Oliver Ruebel, and Kay Robbins, and uses our institutional email addresses. I'm happy to change/add to the names, email addresses, order, etc. The extension uses the BSD-3 license. Happy to change that to another permissive license also. |
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.
I think we should talk about the name of the type HedTags. A HED annotation consists of a comma separated list of HED tags (which might include nested parentheses to group tags).
The thing appearing in a timeseries column is a HED annotation, which we generally refer to as a HED string.
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.
Add Ian Callanan to the list of authors IanCa (on github). He will be doing the integration into the HED ecosystem. @IanCa
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.
Could you amplify on what the HedNWB file represents? Thx
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.
It looks like you are modeling the HED column as an array of string tags. Usually the HED annotation is a single string. We could deal with an array by just joining, but the items will need to represent not just single tags to allow parentheses.
@rly could you clarify why If there is indeed additional global metadata that we need to store for |
We want only one HED version per data file.... I think it should be global
to that file.
…On Mon, Oct 23, 2023 at 12:30 PM Oliver Ruebel ***@***.***> wrote:
- HedNWBFile - a subtype of NWBFile that adds an optional attribute
that stores the HED version schema
@rly <https://github.com/rly> could you clarify why hed_schema_version
should sit globally at the NWBFile level, rather than being an attribute on
the HedTags column?
If there is indeed additional global metadata that we need to store for
HED (e.g., the version), then I would suggest extending LabMetaData to
add a group /general/hed to the metada
—
Reply to this email directly, view it on GitHub
<#3 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJCJOR5O4Q4GPXXSNLRUOLYA2SUXAVCNFSM6AAAAAA6LKSM2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZVGY4DAOBVG4>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
Actually, we want only one version of HED for the entire dataset (Dandi
set?)
…On Mon, Oct 23, 2023 at 12:39 PM Kay Robbins ***@***.***> wrote:
We want only one HED version per data file.... I think it should be
global to that file.
On Mon, Oct 23, 2023 at 12:30 PM Oliver Ruebel ***@***.***>
wrote:
>
> - HedNWBFile - a subtype of NWBFile that adds an optional attribute
> that stores the HED version schema
>
> @rly <https://github.com/rly> could you clarify why hed_schema_version
> should sit globally at the NWBFile level, rather than being an attribute on
> the HedTags column?
>
> If there is indeed additional global metadata that we need to store for
> HED (e.g., the version), then I would suggest extending LabMetaData to
> add a group /general/hed to the metada
>
> —
> Reply to this email directly, view it on GitHub
> <#3 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAJCJOR5O4Q4GPXXSNLRUOLYA2SUXAVCNFSM6AAAAAA6LKSM2OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZVGY4DAOBVG4>
> .
> You are receiving this because your review was requested.Message ID:
> ***@***.***>
>
|
I don't think that is something we can enforce in the extension. We only have control of the schema of individual files but not of the collection. |
Thanks for the feedback! Yes, I am currently modeling the HED column as an array of freeform string tags. This could include strings like Would it be preferred to store a single string for a HED annotation that is a comma-separated list of HED tags? To be explicit, we would change the usage to: nwbfile.add_trial_column("HED", "HED annotations for each trial", col_cls=HedAnnotations)
nwbfile.add_trial(start_time=0.0, stop_time=1.0, HED="animal_target, correct_response, (Intended-effect, Cue)")
# ...
nwbfile.trials["HED"][0] # returns "animal_target, correct_response, (Intended-effect, Cue)" I will move the I will add Ian Callanan to the authors list. |
|
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.
This looks good.... and I'm going to approve so that we can move forward. Can we enforce that if a HED column will be called "HED"?
Yes, you can set Even when the name is fixed, however, I would still recommend to check for the |
Yes good idea... |
Resolves #1. This PR adds 2 new neurodata types:
HedTags
- a subtype ofVectorData
that can be used to represent a column of string HED tags in anyDynamicTable
objectHedNWBFile
- a subtype ofNWBFile
that adds an optional attribute that stores the HED version schema (string) at the file level.Example usage:
This does not yet use the
Events
tables in the ndx-events extension. We are in the process of updating those neurodata types. I'll add and demonstrate support for those types in a separate PR.I've commented out two integration tests that do not pass because, in writing them, I found a bug in one of the testing utilities of pynwb. I have a bugfix for that in pynwb here: NeurodataWithoutBorders/pynwb#1782 . After that is merged and PyNWB 2.6.0 is released (hopefully this week), we can uncomment those tests.