num_repeats#

iris.planning.num_repeats(time_start, time_stop, timedelta_raster, timedelta_slew=<Quantity 10. min>)[source]#

Calculate the number of times we can repeat a raster given the start and stop times and the length of the raster.

Parameters:
  • time_start (str | Time) – The starting time of the observation

  • time_stop (str | Time) – The stop time of the observation

  • timedelta_raster (Quantity) – The amount of time needed to complete one raster

  • timedelta_slew (Quantity) – The amount of time needed to slew before the observation begins

Return type:

ndarray

Examples

Determine how many times we can repeat a 1-hour raster from 00:00 to 04:00

import astropy.units as u
import iris

iris.planning.num_repeats(
    time_start="2024-01-01T00:00",
    time_stop="2024-01-01T04:00",
    timedelta_raster=1 * u.hr,
)
np.float64(3.833333333333332)