Skip to content

Commit

Permalink
Improve handling of null FoV rotation speed.
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Emery <gabriel.emery@cta-consortium.org>
  • Loading branch information
gabemery committed Oct 18, 2024
1 parent 6f0ea58 commit 27c659f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gammapy/makers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,12 @@ def compute_rotation_time_step(rotation, pointing_altaz):
* np.abs(np.cos(pointing_altaz.az.rad))
)
if denom.value == 0:
return 3600 * u.s
if np.cos(pointing_altaz.location.lat.rad) == 0:
# Assuming that the observatory location is fixed during one observation, the time step can be infinite
return np.inf * u.s
if np.cos(pointing_altaz.az.rad) == 0:
# For fixed RaDec pointing, this is temporary. A short interval is thus provided
return 60 * u.s
return rotation * np.cos(pointing_altaz.alt.rad) / denom


Expand Down

0 comments on commit 27c659f

Please sign in to comment.