From b517a46b84a2148b1d269ead2f1b8ad6a43599c1 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Mon, 18 Dec 2023 11:09:04 +0100 Subject: [PATCH 1/2] expose starting time in mock Electrical Series --- src/pynwb/testing/mock/ecephys.py | 2 ++ src/pynwb/testing/mock/ophys.py | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/pynwb/testing/mock/ecephys.py b/src/pynwb/testing/mock/ecephys.py index 8afa9ebc3..54edf7680 100644 --- a/src/pynwb/testing/mock/ecephys.py +++ b/src/pynwb/testing/mock/ecephys.py @@ -71,6 +71,7 @@ def mock_ElectricalSeries( data=None, rate: float = 30000.0, timestamps=None, + starting_time: Optional[float] = None, electrodes: Optional[DynamicTableRegion] = None, filtering: str = "filtering", nwbfile: Optional[NWBFile] = None, @@ -83,6 +84,7 @@ def mock_ElectricalSeries( description=description, data=data if data is not None else np.ones((10, 5)), rate=rate, + starting_time=starting_time, timestamps=timestamps, electrodes=electrodes or mock_electrodes(nwbfile=nwbfile), filtering=filtering, diff --git a/src/pynwb/testing/mock/ophys.py b/src/pynwb/testing/mock/ophys.py index d9ba02572..cd99d5957 100644 --- a/src/pynwb/testing/mock/ophys.py +++ b/src/pynwb/testing/mock/ophys.py @@ -132,6 +132,7 @@ def mock_OnePhotonSeries( conversion=conversion, timestamps=timestamps, starting_time=starting_time, + offset=offset, rate=rate, comments=comments, description=description, @@ -162,6 +163,7 @@ def mock_TwoPhotonSeries( dimension=None, resolution=-1.0, conversion=1.0, + offset=0.0, timestamps=None, starting_time=None, comments="no comments", @@ -194,6 +196,7 @@ def mock_TwoPhotonSeries( control=control, control_description=control_description, device=device, + offset=offset, ) if nwbfile is not None: From 2108273897a207d0ce11f83eacfdf0b672fc485b Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Mon, 18 Dec 2023 11:42:29 +0100 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 09bc731e9..047e43788 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - Add `pynwb.get_nwbfile_version()`. @bendichter [#1703](https://github.com/NeurodataWithoutBorders/pynwb/pull/1703) - Updated timeseries data checks to warn instead of error when reading invalid files. @stephprince [#1793](https://github.com/NeurodataWithoutBorders/pynwb/pull/1793) - Expose the offset, conversion and channel conversion parameters in `mock_ElectricalSeries`. @h-mayorquin [#1796](https://github.com/NeurodataWithoutBorders/pynwb/pull/1796) +- Expose starting_time in `mock_ElectricalSeries`. @h-mayorquin [#1805](https://github.com/NeurodataWithoutBorders/pynwb/pull/1805) ### Bug fixes - Fix bug where namespaces were loaded in "w-" mode. @h-mayorquin [#1795](https://github.com/NeurodataWithoutBorders/pynwb/pull/1795)