diff --git a/.github/workflows/core-test.yml b/.github/workflows/core-test.yml index 1609b8619c..fc4dcda5e7 100644 --- a/.github/workflows/core-test.yml +++ b/.github/workflows/core-test.yml @@ -5,6 +5,7 @@ on: types: [synchronize, opened, reopened] branches: - main + - 0.100-bug-fixes concurrency: # Cancel previous workflows on the same pull request group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/full-test.yml b/.github/workflows/full-test.yml index b432fbd4d5..da2d8ed212 100644 --- a/.github/workflows/full-test.yml +++ b/.github/workflows/full-test.yml @@ -5,6 +5,7 @@ on: types: [synchronize, opened, reopened] branches: - main + - 0.100-bug-fixes concurrency: # Cancel previous workflows on the same pull request group: ${{ github.workflow }}-${{ github.ref }} diff --git a/doc/releases/0.100.5.rst b/doc/releases/0.100.5.rst new file mode 100644 index 0000000000..1f480e942b --- /dev/null +++ b/doc/releases/0.100.5.rst @@ -0,0 +1,12 @@ +.. _release0.100.5: + +SpikeInterface 0.100.5 release notes +------------------------------------ + +6th April 2024 + +Minor release with bug fixes + +* Open Ephys: Use discovered recording ids to load sync timestamps (#2655) +* Fix channel gains in NwbRecordingExtractor with backend (#2661) +* Fix depth location in spikes on traces map (#2676) diff --git a/doc/whatisnew.rst b/doc/whatisnew.rst index 3c9f2b44c7..015d033385 100644 --- a/doc/whatisnew.rst +++ b/doc/whatisnew.rst @@ -8,6 +8,7 @@ Release notes .. toctree:: :maxdepth: 1 + releases/0.100.5.rst releases/0.100.4.rst releases/0.100.3.rst releases/0.100.2.rst @@ -38,6 +39,11 @@ Release notes releases/0.9.1.rst +Version 0.100.5 +=============== + +* Minor release with bug fixes + Version 0.100.4 =============== diff --git a/pyproject.toml b/pyproject.toml index 1c9bc56ac7..e17780890f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "spikeinterface" -version = "0.100.4" +version = "0.100.5" authors = [ { name="Alessio Buccino", email="alessiop.buccino@gmail.com" }, { name="Samuel Garcia", email="sam.garcia.die@gmail.com" }, @@ -59,7 +59,7 @@ changelog = "https://spikeinterface.readthedocs.io/en/latest/whatisnew.html" extractors = [ "MEArec>=1.8", - "pynwb>=2.3.0", + "pynwb>=2.6.0", "hdmf-zarr>=0.5.0", "pyedflib>=0.1.30", "sonpy;python_version<'3.10'", @@ -80,7 +80,7 @@ streaming_extractors = [ "fsspec", "aiohttp", "requests", - "pynwb>=2.3.0", + "pynwb>=2.6.0", "hdmf-zarr>=0.5.0", "remfile", "s3fs" diff --git a/src/spikeinterface/extractors/neoextractors/openephys.py b/src/spikeinterface/extractors/neoextractors/openephys.py index 65df593c77..419bb81451 100644 --- a/src/spikeinterface/extractors/neoextractors/openephys.py +++ b/src/spikeinterface/extractors/neoextractors/openephys.py @@ -180,6 +180,9 @@ def __init__( exp_id = exp_ids[0] else: exp_id = exp_ids[block_index] + rec_ids = sorted( + list(self.neo_reader.folder_structure[record_node]["experiments"][exp_id]["recordings"].keys()) + ) # do not load probe for NIDQ stream or if load_sync_channel is True if "NI-DAQmx" not in stream_name and not load_sync_channel: @@ -229,10 +232,8 @@ def __init__( # load synchronized timestamps and set_times to recording recording_folder = Path(folder_path) / record_node stream_folders = [] - for segment_index in range(self.get_num_segments()): - stream_folder = ( - recording_folder / f"experiment{exp_id}" / f"recording{segment_index+1}" / "continuous" / oe_stream - ) + for segment_index, rec_id in enumerate(rec_ids): + stream_folder = recording_folder / f"experiment{exp_id}" / f"recording{rec_id}" / "continuous" / oe_stream stream_folders.append(stream_folder) if load_sync_timestamps: if (stream_folder / "sample_numbers.npy").is_file(): @@ -245,7 +246,7 @@ def __init__( sync_times = None try: self.set_times(times=sync_times, segment_index=segment_index, with_warning=False) - except AssertionError: + except: warnings.warn(f"Could not load synchronized timestamps for {stream_name}") self._stream_folders = stream_folders diff --git a/src/spikeinterface/extractors/nwbextractors.py b/src/spikeinterface/extractors/nwbextractors.py index 09b462d5ae..39fdceceb0 100644 --- a/src/spikeinterface/extractors/nwbextractors.py +++ b/src/spikeinterface/extractors/nwbextractors.py @@ -842,7 +842,8 @@ def _fetch_main_properties_backend(self): data_attributes = self.electrical_series["data"].attrs electrical_series_conversion = data_attributes["conversion"] gains = electrical_series_conversion * 1e6 - if "channel_conversion" in data_attributes: + channel_conversion = self.electrical_series.get("channel_conversion", None) + if channel_conversion: gains *= self.electrical_series["channel_conversion"][:] # Channel offsets diff --git a/src/spikeinterface/widgets/spikes_on_traces.py b/src/spikeinterface/widgets/spikes_on_traces.py index 42fbd623cd..cc20c212cc 100644 --- a/src/spikeinterface/widgets/spikes_on_traces.py +++ b/src/spikeinterface/widgets/spikes_on_traces.py @@ -183,8 +183,7 @@ def plot_matplotlib(self, data_plot, **backend_kwargs): spike_times_to_plot = sorting.get_unit_spike_train( unit, segment_index=segment_index, return_times=True )[spike_start:spike_end] - unit_y_loc = min_y + max_y - dp.unit_locations[unit][1] - # markers = np.ones_like(spike_frames_to_plot) * (min_y + max_y - dp.unit_locations[unit][1]) + unit_y_loc = dp.unit_locations[unit][1] width = 2 * 1e-3 ellipse_kwargs = dict(width=width, height=10, fc="none", ec=dp.unit_colors[unit], lw=2) patches = [Ellipse((s, unit_y_loc), **ellipse_kwargs) for s in spike_times_to_plot]