From d7d17bfe2474dc778ec7f2a5e3b1978b3a9e1ec4 Mon Sep 17 00:00:00 2001 From: Jan Gieseler Date: Fri, 17 Jan 2025 16:50:01 +0200 Subject: [PATCH] further fix array flattening to be comp. with cdflib 1.3.3 --- seppy/loader/psp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/seppy/loader/psp.py b/seppy/loader/psp.py index f4d28c2..6568287 100644 --- a/seppy/loader/psp.py +++ b/seppy/loader/psp.py @@ -410,8 +410,8 @@ def calc_av_en_flux_PSP_EPIHI(df, energies, en_channel, species, instrument, vie flux_key = 'H_Flux' en_str = energies[f'{species_str}_ENERGY_LABL'] if type(en_channel) == list: - energy_low = en_str[en_channel[0]][0].split('-')[0] - energy_up = en_str[en_channel[-1]][0].split('-')[-1] + energy_low = en_str[en_channel[0]].flat[0].split('-')[0] + energy_up = en_str[en_channel[-1]].flat[0].split('-')[-1] en_channel_string = energy_low + '-' + energy_up DE = energies[f'{species_str}_ENERGY_DELTAPLUS']+energies[f'{species_str}_ENERGY_DELTAMINUS']