From 8aca1cfeee4417082e6192a9e2116ae4d14c101e Mon Sep 17 00:00:00 2001 From: Ben Dichter Date: Fri, 3 Dec 2021 17:26:41 -0500 Subject: [PATCH 1/5] Update README.md add diagram --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 53a64a7..cf4e1d0 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ [![Build Status](https://travis-ci.com/akshay-jaggi/ndx-photometry.svg?branch=master)](https://travis-ci.com/akshay-jaggi/ndx-photometry) [![Documentation Status](https://readthedocs.org/projects/ndx-photometry/badge/?version=latest)](https://ndx-photometry.readthedocs.io/en/latest/?badge=latest) +![NWB - Photometry](https://user-images.githubusercontent.com/844306/144680873-3e2d957f-97ff-45cb-b625-517f5e7dfb9f.png) + ## Introduction This is an NWB extension for storing photometry recordings and associated metadata. This extension stores photometry information across three folders in the NWB file: acquisition, processing, and general. The acquisiton folder contains an ROIResponseSeries (inherited from `pynwb.ophys`), which references rows of a FibersTable rather than 2 Photon ROIs. The new types for this extension are in metadata and processing From 1cceb45dce69e8503df90b2f535c2bdf0fc2ae04 Mon Sep 17 00:00:00 2001 From: weiglszonja Date: Mon, 13 Mar 2023 15:19:47 +0100 Subject: [PATCH 2/5] make optional columns --- spec/ndx-photometry.extensions.yaml | 5 +++++ src/spec/create_extension_spec.py | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/spec/ndx-photometry.extensions.yaml b/spec/ndx-photometry.extensions.yaml index c3e5cd5..1d0354a 100644 --- a/spec/ndx-photometry.extensions.yaml +++ b/spec/ndx-photometry.extensions.yaml @@ -58,6 +58,7 @@ groups: shape: - null doc: peak wavelength of photodetector + quantity: '?' attributes: - name: unit dtype: text @@ -75,6 +76,7 @@ groups: shape: - null doc: gain on the photodetector + quantity: '?' - name: model_number neurodata_type_inc: VectorData dtype: text @@ -112,6 +114,7 @@ groups: shape: - null doc: references CommandedVoltageSeries + quantity: '?' - name: output neurodata_type_inc: VectorData dtype: float @@ -143,6 +146,7 @@ groups: - name: frequency dtype: float doc: voltage frequency in unit hertz + quantity: '?' attributes: - name: unit dtype: text @@ -202,6 +206,7 @@ groups: - name: commanded_voltages neurodata_type_inc: MultiCommandedVoltage doc: multiple commanded voltage container + quantity: '?' - neurodata_type_def: FluorophoresTable neurodata_type_inc: DynamicTable name: fluorophores diff --git a/src/spec/create_extension_spec.py b/src/spec/create_extension_spec.py index 586d445..c14813a 100644 --- a/src/spec/create_extension_spec.py +++ b/src/spec/create_extension_spec.py @@ -127,6 +127,7 @@ def main(): dtype="float", shape=(None,), neurodata_type_inc="VectorData", + quantity="?", attributes=[ NWBAttributeSpec( name="unit", doc="wavelength unit", value="nanometers", dtype="text" @@ -146,6 +147,7 @@ def main(): dtype="float", shape=(None,), neurodata_type_inc="VectorData", + quantity="?", ), NWBDatasetSpec( name="model_number", @@ -191,6 +193,7 @@ def main(): ), shape=(None,), neurodata_type_inc="VectorData", + quantity="?", ), NWBDatasetSpec( name="output", @@ -236,6 +239,7 @@ def main(): name="unit", doc="frequency unit", value="hertz", dtype="text" ) ], + quantity="?", ), NWBDatasetSpec( name="power", @@ -354,7 +358,8 @@ def main(): NWBGroupSpec( name='commanded_voltages', neurodata_type_inc='MultiCommandedVoltage', - doc='multiple commanded voltage container' + doc='multiple commanded voltage container', + quantity="?", ) ] ) From a0c331fb80d86fd9c1179765ca620f901bbd89b3 Mon Sep 17 00:00:00 2001 From: weiglszonja Date: Mon, 13 Mar 2023 15:20:53 +0100 Subject: [PATCH 3/5] update version --- setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 4cacdef..ff7896a 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ setup_args = { 'name': 'ndx-photometry', - 'version': '0.1.0', + 'version': '0.1.1', 'description': 'extension for fiber photometry data', 'long_description': readme, 'long_description_content_type': readme_type, @@ -33,7 +33,7 @@ 'install_requires': [ 'pynwb>=1.3.0', 'numpy<1.19.4', - 'h5py<3' + 'h5py', ], 'packages': find_packages('src/pynwb'), 'package_dir': {'': 'src/pynwb'}, From bbd3682380bb45458c2690c8b1bf7cb5125ee5f0 Mon Sep 17 00:00:00 2001 From: weiglszonja Date: Mon, 13 Mar 2023 15:21:42 +0100 Subject: [PATCH 4/5] unit is required --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index cf4e1d0..1d7916e 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,7 @@ commandedvoltage_series = ( frequency=30.0, power=500.0, rate=30.0, + unit="volts", ) ) From 28524e501bf6cfbc25fdf02b25db18a5336f91d1 Mon Sep 17 00:00:00 2001 From: weiglszonja Date: Mon, 13 Mar 2023 15:22:26 +0100 Subject: [PATCH 5/5] unit is required --- src/pynwb/tests/integration/test_photometry.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pynwb/tests/integration/test_photometry.py b/src/pynwb/tests/integration/test_photometry.py index 4f04ff1..1f16bd0 100644 --- a/src/pynwb/tests/integration/test_photometry.py +++ b/src/pynwb/tests/integration/test_photometry.py @@ -63,10 +63,10 @@ def test_roundtrip(self): commandedvoltage_series2 = ( multi_commanded_voltage.create_commanded_voltage_series( name="commanded_voltage2", - data=[1.0, 2.0, 3.0], - frequency=30.0, - power=500.0, + data=[4.0, 5.0, 6.0], + power=400.0, rate=30.0, + unit="volts", ) ) @@ -102,7 +102,7 @@ def test_roundtrip(self): name="roi_response_series", description="my roi response series", data=np.random.randn(100, 1), - unit = 'F', + unit='F', rate=30.0, rois=fibers_ref, )