Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose starting time in mock_ElectricalSeries #1805

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading