Skip to content

Commit

Permalink
add create_microscopy_table_region
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandratrapani committed May 27, 2024
1 parent 0729028 commit 8d945f7
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
5 changes: 3 additions & 2 deletions spec/ndx-microscopy.extensions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ groups:
shape:
- null
doc: Link to the dichroic mirror device.
quantity: "?"
- name: emission_filter
neurodata_type_inc: VectorData
dtype:
target_type: Device
target_type: OpticalFilter
reftype: object
shape:
- null
Expand All @@ -92,7 +93,7 @@ groups:
- name: excitation_filter
neurodata_type_inc: VectorData
dtype:
target_type: Device
target_type: OpticalFilter
reftype: object
shape:
- null
Expand Down
2 changes: 1 addition & 1 deletion src/pynwb/ndx_microscopy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
)

Microscopy = get_class("Microscopy", extension_name)
MicroscopyTable = get_class("MicroscopyTable", extension_name)
from .microscopy import MicroscopyTable
ImagingSpace = get_class("ImagingSpace", extension_name)
PlanarImagingSpace = get_class("PlanarImagingSpace", extension_name)
VolumetricImagingSpace = get_class("VolumetricImagingSpace", extension_name)
Expand Down
15 changes: 15 additions & 0 deletions src/pynwb/ndx_microscopy/microscopy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from hdmf.utils import docval, popargs
from pynwb import get_class

MicroscopyTable = get_class("MicroscopyTable", "ndx-microscopy")

@docval(
{'name': 'region', 'type': list, 'doc': 'the indices of the MicroscopyTable'},
{'name': 'description', 'type': str, 'doc': 'a brief description of what these table entries represent'},
)
def create_microscopy_table_region(self, **kwargs):
region, description = popargs('region', 'description', kwargs)
name = 'microscopy_table_region'
return super(MicroscopyTable, self).create_region(name=name, region=region, description=description)

MicroscopyTable.create_microscopy_table_region = create_microscopy_table_region

0 comments on commit 8d945f7

Please sign in to comment.