rise_set_times#

caput.astro.observer.Observer.rise_set_times(source, t0, t1=None, step=None, diameter=0.0)[source]#

Find all times a sources rises or sets in an interval.

Typical atmospheric refraction at the horizon is 34 arcminutes, but this method does _not_ take that into account.

Parameters:
source_SkySourceLike

The source we are calculating the rising and setting of.

t0ctime.TimeLike

The start time to search for. Any type that be converted to a UNIX time by caput.

t1ctime.TimeLike | None, optional

The end time of the search interval. If not set, this is 1 day after the start time t0.

stepfloat | None, optional

The initial search step in days. This is used to find the approximate times of risings and settings, and should be set to something less than the spacing between events. If None is passed, an initial search step of 0.2 days, or else one fifth of the specified interval, is used, whichever is smaller.

diameterfloat, optional

The size of the source in degrees. Use this to ensure the whole source is below the horizon. Also, if the local horizon is higher (i.e. mountains), this can be set to a negative value to account for this. You may also use this parameter to account for atmospheric refraction, if desired, by adding 68 arcminutes to the nominal diameter.

Returns:
unix_timesndarray

Source rise/set times as UNIX epoch times.

rise_or_setbool ndarray

Boolean array of whether the time corresponds to a rising (True) or setting (False).