Commit d5217f22 authored by Philipp Oleynik's avatar Philipp Oleynik
Browse files

removed usage of the geometric_mean function native to Python 3.9 to run on...

removed usage of the geometric_mean function native to Python 3.9 to run on clusters with old Python.
parent 7723a398
......@@ -15,7 +15,6 @@ import matplotlib.colors as clr
import matplotlib.pyplot as plt
import numpy as np
import plotutil as plu
from statistics import geometric_mean
def make_energy_grid(*, channels_per_decade=256, min_energy=0.01, max_energy=1.0E5):
......@@ -292,10 +291,8 @@ def calculate_bowtie_gf(response_data,
except ValueError:
channel_energy_high = 0
# gf = np.mean(multi_geometric_factors_usable, axis = 0) # Average geometric factor for all model spectra
# gf_cross = gf[bowtie_cross_index] # The mean geometric factor for the bowtie crossing point
gf = np.mean(multi_geometric_factors_usable, axis = 0) # Average geometric factor for all model spectra
gf_cross = gf[bowtie_cross_index] # The mean geometric factor for the bowtie crossing point
gf_cross = geometric_mean(multi_geometric_factors_usable[:, bowtie_cross_index])
energy_cross = energy_grid_local[bowtie_cross_index]
return gf_cross, energy_cross, channel_energy_low, channel_energy_high
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment