-
Notifications
You must be signed in to change notification settings - Fork 26
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
Mismatched fixed name and included name causes errors on read/validate #582
Comments
This bug appears when users write NWB extensions and add |
In catalystneuro/ndx-holographic-stimulation#7 we are defining new neurodata type following the best practice as in hdmf-dev/hdmf-schema-language#14
Schema: - neurodata_type_def: PatternedOptogeneticStimulusSite
neurodata_type_inc: OptogeneticStimulusSite
doc: An extension of OptogeneticStimulusSite to include the geometrical representation
for the stimulus.
attributes:
- name: effector
dtype: text
doc: Light-activated effector protein expressed by the targeted cell (eg. ChR2)
required: false
- neurodata_type_def: PatternedOptogeneticSeries
neurodata_type_inc: TimeSeries
doc: An extension of OptogeneticSeries to include the spatial patterns for the photostimulation.
links:
- doc: link to the patterned stimulus site
name: site
target_type: PatternedOptogeneticStimulusSite Example stim_site = PatternedOptogeneticStimulusSite(
name="StimulusSite",
device=device,
description=site_description,
excitation_lambda=stimulation_wavelenght, # nm
effector=effector,
location=location,
)
self.nwbfile.add_ogen_site(stim_site)
photostimulation = PatternedOptogeneticSeries(
name=series_name,
description=series_description,
data=data,
timestamps=timestamps,
site=stim_site,
) The error occurs when using hdmf 3.11.0 and pynwb 2.5.0 |
I assume the error is related to the definition of the link with the fixed name |
Ah sorry, another important piece of information: this only happens using hdmf 3.11 not 3.10 |
Yes, that's a bug introduced in #800. Sorry about that. I'll work on a fix Monday/Tuesday. |
Description
In HDMF currently, if a container child data type is defined with a fixed name and included as a subgroup of
some group, and the subgroup is specified with a different name, then after writing to disk, the subgroup keeps the fixed name rather than the subgroup name. The data cannot be read and validation fails.
Example:
In HDMF:
Environment
Checklist
The text was updated successfully, but these errors were encountered: