irfpy.asperacommon.domain_common
¶
- irfpy.asperacommon.domain_common.bisect_boundary_crossing(t0, t1, inside_function, tolerance=0.1)[source]¶
A function that returns the boundary crossing time.
Todo
This function may go to irfpy.util
- Parameters
t0 – Time to start to examine.
t1 – Time to stop to examine.
inside_function – A function that receive a single time, returning the boolean. Examples are
inside_icb()
orinside_bowshock()
.tolerance – Tolerance in seconds.
- Returns
The boundary crossing time.
The crossing time in between
t0
andt1
is returned.inside_function(t0)
andinside_function(t1)
should not be the same value.Boundary crossing between t0 and t1 should be once. If multiple crossings exist, only a single crossing is returned, and we do not know which crossing is the returned.