diff --git a/bowtie.py b/bowtie.py index 3081e75046be55aa65cbf42e690860a7b454a7e4..582ceb052a08b71553db7aec610f6ecfe59fadb7 100644 --- a/bowtie.py +++ b/bowtie.py @@ -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