Skip to content

Commit

Permalink
Move in-function definition of the Earth rotation velocity to a const…
Browse files Browse the repository at this point in the history
…ant and rename it.

Signed-off-by: Gabriel Emery <gabriel.emery@cta-consortium.org>
  • Loading branch information
gabemery committed Oct 7, 2024
1 parent cbaf964 commit 851151c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gammapy/makers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
log = logging.getLogger(__name__)

MINIMUM_TIME_STEP = 1 * u.s # Minimum time step used to handle FoV rotations
EARTH_ANGULAR_VELOCITY = 360 * u.deg / u.day


def _get_fov_coords(pointing, irf, geom, use_region_center=True, obstime=None):
Expand Down Expand Up @@ -119,9 +120,8 @@ def compute_rotation_time_step(rotation, pointing_altaz):
duration : `~astropy.units.Quantity`
Time associated with the requested rotation.
"""
earth_rotation = 360 * u.deg / u.day
denom = (
earth_rotation
EARTH_ANGULAR_VELOCITY
* np.cos(pointing_altaz.location.lat.rad)
* np.abs(np.cos(pointing_altaz.az.rad))
)
Expand Down

0 comments on commit 851151c

Please sign in to comment.