Skip to content

Commit

Permalink
Log10 correvtly for EffectiveAreaInjector
Browse files Browse the repository at this point in the history
  • Loading branch information
robertdstein committed May 10, 2020
1 parent 0aed6d8 commit 4a7a137
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flarestack/core/injector.py
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ def inject_signal(self, scale):

random_fraction = [random.random() for _ in range(n_s)]

sim_ev["logE"] = np.log10(np.exp(convert_f(random_fraction)))
sim_ev["logE"] = convert_f(random_fraction)

# Simulates times according to Time PDF

Expand Down Expand Up @@ -622,13 +622,13 @@ def source_eff_area(log_e):
self.energy_pdf.f(log_e) * \
self.energy_proxy_mapping(log_e)

start_x = np.log(self.energy_pdf.integral_e_min)
start_x = np.log10(self.energy_pdf.integral_e_min)



x_vals = np.linspace(
start_x + 1e-7,
np.log(self.energy_pdf.integral_e_max),
np.log10(self.energy_pdf.integral_e_max),
100
)[1:]

Expand Down

0 comments on commit 4a7a137

Please sign in to comment.