From 2085cbe9a7fb74ce5d9c2c831611eb2a596de686 Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Thu, 8 Aug 2024 16:29:52 -0300 Subject: [PATCH 1/2] fix sampling frequency repr --- src/spikeinterface/core/baserecording.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/spikeinterface/core/baserecording.py b/src/spikeinterface/core/baserecording.py index e65afabaca..edcc23f339 100644 --- a/src/spikeinterface/core/baserecording.py +++ b/src/spikeinterface/core/baserecording.py @@ -96,14 +96,18 @@ def list_to_string(lst, max_size=6): def _repr_header(self): num_segments = self.get_num_segments() num_channels = self.get_num_channels() - sf_hz = self.get_sampling_frequency() - sf_khz = sf_hz / 1000 dtype = self.get_dtype() total_samples = self.get_total_samples() total_duration = self.get_total_duration() total_memory_size = self.get_total_memory_size() - sampling_frequency_repr = f"{sf_khz:0.1f}kHz" if sf_hz > 10_000.0 else f"{sf_hz:0.1f}Hz" + + sf_hz = self.get_sampling_frequency() + if not sf_hz.is_integer(): + sampling_frequency_repr = f"{sf_hz:f} Hz" + else: + # Khz for high sampling rate and Hz for LFP + sampling_frequency_repr = f"{(sf_hz/1000.0):0.1f}kHz" if sf_hz > 10_000.0 else f"{sf_hz:0.1f}Hz" txt = ( f"{self.name}: " From 46c6342d13b92d9dceb6b07bee780f6a726aa85b Mon Sep 17 00:00:00 2001 From: Heberto Mayorquin Date: Tue, 3 Sep 2024 20:17:32 -0600 Subject: [PATCH 2/2] fix streaming extractor condition --- .github/workflows/all-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/all-tests.yml b/.github/workflows/all-tests.yml index b695c7d627..2a50c976a5 100644 --- a/.github/workflows/all-tests.yml +++ b/.github/workflows/all-tests.yml @@ -139,7 +139,7 @@ jobs: - name: Test streaming extractors shell: bash - if: env.RUN_STREAMING_EXTRACTORS_TESTS + if: env.RUN_STREAMING_EXTRACTORS_TESTS == 'true' run: | pip install -e .[streaming_extractors,test_extractors] ./.github/run_tests.sh "streaming_extractors" --no-virtual-env