API#
- nightshift.coverage(times: list, periods: array)#
Returns the phase coverage for given period(s)
- Parameters:
times (list of arrays) – a list of observed times arrays (such as [[0, 1, 2], [5, 6, 7]])
periods (np.array) – an array of periods (in the same units as
times)
- Returns:
coverage of each period
- Return type:
np.array
- nightshift.period_match(t0s, periods, tolerance=0.001)#
Returns a periodogram with period matching most input times
- Parameters:
t0s (array) – list of event observed times
periods (float or array) – periods to match
tolerance (float, optional) – timing error, by default 0.001
- Returns:
number of event matched per period
best period
- Return type:
tuple(np.array, float)