mceq-project / MCEq

Matrix cascade equation core code
BSD 3-Clause "New" or "Revised" License
30 stars 32 forks source link

Use detector zenith to check for cached value for IceCube-centered atmosphere #46

Closed afedynitch closed 2 years ago

afedynitch commented 2 years ago

In the previous version of the IceCube-centered atmosphere, the upgoing zenith angle >90 degree has been subtracted from 180 to obtain the equivalent zenith at the surface. This value (>90 degrees) has been used to store the previous value. If one requests after a calculation for 0deg, a calculation for 180deg, and then asks again for 0 degree, it will stick to 180 degrees since the last surface zenith is 0 deg in both cases. By storing the last detector zenith instead of the surface zenith, the check for the previous value will correctly detect the change and recalculate the spline.

jncots commented 2 years ago

Isn't it just enough to set to 180 degree and then try to set 0 back to reproduce the problem that was solved, i.e. without setting the angle to 0 at the beginning?

afedynitch commented 2 years ago

Maybe yes?