extract_cp_times#

ethograph.features.changepoints.changepoint_fired(mask, selections=None)[source]#

Where mask fires at selections: a boolean (T,) array on the mask’s own time axis.

This is the one reading of a changepoint mask the GUI has. The lineplot draws it (XarrayLoader.select) and a click snaps to it (XarrayLoader.get_cp_times), so what is drawn and what is snapped to are the same set by construction.

A selection key that is a dim of the mask pins that dim — .sel where the dim has a coordinate, .isel where it does not (the rule of ethograph.utils.xr_utils.sel_valid()). Every other key is ignored, and every non-time dim left free is OR’d across.

Return type:

ndarray