Skip to content

Commit

Permalink
Expose starting time in mock_ElectricalSeries (#1805)
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan Ly <[email protected]>
  • Loading branch information
h-mayorquin and rly authored Dec 22, 2023
1 parent 17b5621 commit 6498000
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
- 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) and [#1809](https://github.com/NeurodataWithoutBorders/pynwb/pull/1809)
- Expose the offset, conversion and channel conversion parameters in `mock_ElectricalSeries`. @h-mayorquin [#1796](https://github.com/NeurodataWithoutBorders/pynwb/pull/1796)
- Enhance `get_data_in_units()` to work with objects that have a `channel_conversion` attribute like the `ElectricalSeries` @h-mayorquin [#1806](https://github.com/NeurodataWithoutBorders/pynwb/pull/1806)
- Expose `starting_time` in `mock_ElectricalSeries`. @h-mayorquin [#1805](https://github.com/NeurodataWithoutBorders/pynwb/pull/1805)
- Enhance `get_data_in_units()` to work with objects that have a `channel_conversion` attribute like the `ElectricalSeries`. @h-mayorquin [#1806](https://github.com/NeurodataWithoutBorders/pynwb/pull/1806)

### Bug fixes
- Fix bug where namespaces were loaded in "w-" mode. @h-mayorquin [#1795](https://github.com/NeurodataWithoutBorders/pynwb/pull/1795)
Expand Down
2 changes: 2 additions & 0 deletions src/pynwb/testing/mock/ecephys.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions src/pynwb/testing/mock/ophys.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ def mock_OnePhotonSeries(
conversion=conversion,
timestamps=timestamps,
starting_time=starting_time,
offset=offset,
rate=rate,
comments=comments,
description=description,
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -194,6 +196,7 @@ def mock_TwoPhotonSeries(
control=control,
control_description=control_description,
device=device,
offset=offset,
)

if nwbfile is not None:
Expand Down

0 comments on commit 6498000

Please sign in to comment.