Skip to content

Commit

Permalink
fix EAS lenDec bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Areustle committed Jan 24, 2024
1 parent 0600453 commit e6fb9d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nuspacesim/simulation/eas_optical/eas.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ def altDec(self, beta, tauBeta, tauLorentz, u=None, *args, **kwargs):

u = np.random.uniform(0, 1, len(beta)) if u is None else u

tDec = -tauLorentz * mean_Tau_life * np.log(u)
tDec = -tauLorentz * mean_Tau_life * np.log(u) # seconds

lenDec = tDec * tauBeta * c.value
lenDec = 1000.0 * tDec * tauBeta * c.value # km

altDec = np.sqrt(
R_earth.to(units.km).value ** 2
+ lenDec**2
+ 2.0 * R_earth.to(units.km).value * lenDec * np.sin(beta)
)
) # km

altDec -= R_earth.to(units.km).value

Expand Down

0 comments on commit e6fb9d3

Please sign in to comment.