From 3c049ffde180144e808ba6d876216fa10f22063e Mon Sep 17 00:00:00 2001 From: Tom Donoghue Date: Tue, 26 Mar 2024 15:55:05 -0400 Subject: [PATCH] small fix to periodic tests --- specparam/objs/event.py | 4 +++- specparam/tests/analysis/test_periodic.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/specparam/objs/event.py b/specparam/objs/event.py index a10d8208..92d6e6bf 100644 --- a/specparam/objs/event.py +++ b/specparam/objs/event.py @@ -325,8 +325,9 @@ def get_group(self, event_inds, window_inds, output_type='event'): Parameters ---------- - event_inds, window_inds : array_like of int or array_like of bool + event_inds, window_inds : array_like of int or array_like of bool or None Indices to extract from the object, for event and time windows. + If None, selects all available indices. output_type : {'time', 'group'}, optional Type of model object to extract: 'event' : SpectralTimeEventObject @@ -384,6 +385,7 @@ def get_group(self, event_inds, window_inds, output_type='event'): return output + def print_results(self, concise=False): """Print out SpectralTimeEventModel results. diff --git a/specparam/tests/analysis/test_periodic.py b/specparam/tests/analysis/test_periodic.py index 549017c1..6477befa 100644 --- a/specparam/tests/analysis/test_periodic.py +++ b/specparam/tests/analysis/test_periodic.py @@ -15,7 +15,7 @@ def test_get_band_peak_group(tfg): assert np.all(get_band_peak_group(tfg, (8, 12))) -def test_get_band_peak_group(): +def test_get_band_peak_group_arr(): data = np.array([[10, 1, 1.8, 0], [13, 1, 2, 2], [14, 2, 4, 2]]) @@ -27,7 +27,7 @@ def test_get_band_peak_group(): assert out2.shape == (3, 3) assert np.array_equal(out2[2, :], [14, 2, 4]) -def test_get_band_peak(): +def test_get_band_peak_arr(): data = np.array([[10, 1, 1.8], [14, 2, 4]])