From 2ea3f7ca50d67ed0c25357255db4965faa53cf04 Mon Sep 17 00:00:00 2001 From: Tom Donoghue Date: Mon, 3 Feb 2025 23:29:49 -0500 Subject: [PATCH] fix presence report printing --- specparam/core/strings.py | 2 +- specparam/utils/data.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specparam/core/strings.py b/specparam/core/strings.py index 0cd3dc64e..447a4da6e 100644 --- a/specparam/core/strings.py +++ b/specparam/core/strings.py @@ -483,7 +483,7 @@ def gen_time_results_str(time_model, concise=False): np.nanmean(time_model.time_results[pe_labels['cf'][ind]]), np.nanmean(time_model.time_results[pe_labels['pw'][ind]]), np.nanmean(time_model.time_results[pe_labels['bw'][ind]]), - compute_presence(time_model.time_results[pe_labels['cf'][ind]])) + compute_presence(time_model.time_results[pe_labels['cf'][ind]], output='percent')) for ind, label in enumerate(band_labels)], '', diff --git a/specparam/utils/data.py b/specparam/utils/data.py index 097780ecf..09429d04b 100644 --- a/specparam/utils/data.py +++ b/specparam/utils/data.py @@ -92,7 +92,7 @@ def compute_presence(data, average=False, output='ratio'): data : 1d or 2d array Data array to check presence of. average : bool, optional, default: False - Whether to average across . Only used for 2d array inputs. + Whether to average across elements. Only used for 2d array inputs. If False, for 2d array, the output is an array matching the length of the 0th dimension of the input. If True, for 2d arrays, the output is a single value averaged across the whole array. output : {'ratio', 'percent'}