Skip to content
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 optional link to events source #3

Open
CodyCBakerPhD opened this issue Mar 19, 2024 · 6 comments
Open

Add optional link to events source #3

CodyCBakerPhD opened this issue Mar 19, 2024 · 6 comments

Comments

@CodyCBakerPhD
Copy link
Member

You're adding a link to the units table (or in #1 a dynamic table region to the units table) but it would be nice to have a link of some sort to the events we're aligning that neural data to

As discussed this could be a time column on a dynamic table (which could use either (i) an extra field to specify the name of the column on that dynamic table region used to align or (ii) extend the HDMF dynamic table region to specify not just row indices but also column names), or certain objects from ndx-events, or even certain timestamps from a TimeSeries such as an IndexSeries (in which case use a TimeSeriesReference as the link)

@CodyCBakerPhD
Copy link
Member Author

This could technically also replace the current event-timestamps (https://github.com/catalystneuro/ndx-binned-spikes/blob/main/spec/ndx-binned-spikes.extensions.yaml#L40) by linking to the timestamps used for the bin alignment so the timestamps data is not duplicated

I'm more on the fence about that one though - it can be nice to have the timestamps attached explicitly here for easy access instead of having to follow a link

@h-mayorquin
Copy link
Collaborator

My initial plan was to have the two options and use post_init checks for this. But yes, I like to preserve the ability to build an NWB object simply. That meaning, without having to build x or y first to instantiate it.

@h-mayorquin
Copy link
Collaborator

Ok, so this can't be done with the current automatic mechanism to define a class BinnedAlignedSpikes = get_class("BinnedAlignedSpikes", "ndx-binned-spikes"). That is, I need some sort of post_init check to verify that only one of the following is passed: 1) event-timestamps or 2) a reference to any other object in the spec that represent event timestamps (e.g. start_time in a dynamic column, ndx-events, etc).

I am gona add documentation of the current use case as a the next prority and come back to this once I explore the DiCarlo data as this is a nice to have.

@CodyCBakerPhD
Copy link
Member Author

I just meant in the schema, there could be an optional link to the actual object being used as a reference for the alignment, such as an IndexSeries, column of DynamicTable, etc. in addition to the explicit event timestamps. To clarify that there is a relationship between the two objects

For example, say you have a pretty complicated trials table with lots of conditions per trial, and you want to make several of these alignment objects you're designing for various columns. Let's also say you have other stuff like optogenetics or visual stimuli in your stimulus areas of the NWB file - if your extension objects can link to the trials table (and in a best-case scenario, the particular column of that table) that helps remove any confusion about where the source of the event timestamps might be and also is a hint to a data reuser to 'go check out that linked object for more details'

@h-mayorquin
Copy link
Collaborator

I just meant in the schema, there could be an optional link to the actual object being used as a reference for the alignment, such as an IndexSeries, column of DynamicTable, etc. in addition to the explicit event timestamps.

OK, thanks. Making it in addition and not xor should be easier.

@CodyCBakerPhD
Copy link
Member Author

@h-mayorquin Feel free to close w/e you decide

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants