From f54b25b35fdef39f7e1bd715b69b522521dfa809 Mon Sep 17 00:00:00 2001 From: "Angeline G. Burrell" Date: Tue, 5 Nov 2024 16:47:12 -0500 Subject: [PATCH] BUG: fixed index evaluation Change the location of the index evaluation to work correctly. --- pysatSpaceWeather/instruments/methods/f107.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pysatSpaceWeather/instruments/methods/f107.py b/pysatSpaceWeather/instruments/methods/f107.py index 648da5c..d4ae7a4 100644 --- a/pysatSpaceWeather/instruments/methods/f107.py +++ b/pysatSpaceWeather/instruments/methods/f107.py @@ -245,10 +245,11 @@ def combine_f107(standard_inst, forecast_inst, start=None, stop=None): good_vals = np.array([ not is_fill_val(val, fill_val) for val in forecast_inst['f107'][good_times]]) - new_times = list(forecast_inst.index[good_times][good_vals]) # Save desired data and cycle time - if len(new_times) > 0: + if len(good_vals) > 0: + new_times = list(forecast_inst.index[good_times][ + good_vals]) f107_times.extend(new_times) new_vals = list( forecast_inst['f107'][good_times][good_vals])