API#
- portrait.coverage(time, gap=0.1, precision=0.001, n=1)#
Returns the mean phase coverage for given period(s)
- Parameters:
times (list of arrays) – an array of observed times
gap (float, optional) – minimum gap between observations to be considered an independent segment, by default 0.5
precision (float, optional) – precision of the phase coverage returned, by default 1e-3
- Returns:
a function that computes the overall phase coverage for a given period, i.e. with signature
fun(float or array) -> float or array- Return type:
function
- portrait.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)
- portrait.phase_coverage(time, phases, gap=0.1)#
Returns the coverage of given phases, in number of times observed
- Parameters:
times (list of arrays) – an array of observed times
phases (array) – a grid of phases to compute the coverage for
gap (float, optional) – minimum gap between observations to be considered an independent segment, by default 0.1
- Returns:
a function that computes the phases coverage for a given period, i.e. with signature
fun(float) -> array- Return type:
function