Skip to content

Commit

Permalink
Create and use ImageReferences dataset data type (#520)
Browse files Browse the repository at this point in the history
* Create and use ImageReferences dataset data type

* Add note about offset for IndexSeries

* Update release notes
  • Loading branch information
rly authored May 24, 2022
1 parent adcf428 commit eec91c6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
19 changes: 12 additions & 7 deletions core/nwb.base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ datasets:
doc: Description of the image.
required: false

- neurodata_type_def: ImageReferences
neurodata_type_inc: NWBData
dtype:
target_type: Image
reftype: object
dims:
- num_images
shape:
- null
doc: Ordered dataset of references to Image objects.

groups:
- neurodata_type_def: NWBContainer
neurodata_type_inc: Container
Expand Down Expand Up @@ -246,13 +257,7 @@ groups:
doc: Images stored in this collection.
quantity: '+'
- name: order_of_images
dims:
- num_images
shape:
- null
dtype:
target_type: Image
reftype: object
neurodata_type_inc: ImageReferences
doc: Ordered dataset of references to Image objects stored in the parent group.
Each Image object in the Images group should be stored once and only once, so
the dataset should have the same length as the number of images.
Expand Down
4 changes: 4 additions & 0 deletions core/nwb.image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ groups:
dtype: float32
doc: This field is unused by IndexSeries.
required: false
- name: offset
dtype: float32
doc: This field is unused by IndexSeries.
required: false
- name: unit
dtype: text
value: N/A
Expand Down
3 changes: 2 additions & 1 deletion docs/format/source/format_release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Minor changes
- Allowed ``NWBFile/stimulus/templates`` to contain ``Images`` objects. (#459)
- Added new optional "order_of_images" dataset to ``Images`` that contains an ordered list of object references to
``Image`` objects stored in the same ``Images`` object. This dataset must be used if the images are referred to
by index, e.g., from an ``IndexSeries`` object. (#459, #518, #519)
by index, e.g., from an ``IndexSeries`` object. Created new neurodata type ImageReferences which should be used
for this dataset. (#459, #518, #519, #520)
- Overhauled ``IndexSeries`` type (#459):
- Fixed dtype of ``data`` dataset of ``IndexSeries`` (int32 -> uint32).
- Updated ``unit`` attribute of ``data`` to have fixed value "N/A".
Expand Down

0 comments on commit eec91c6

Please sign in to comment.