Guess whether escape was aborted and extract position (distance from safe place) and absolute time. Looks for trials with outcome "survived" in which the minimum distance from the safe place was achieved at least 0.5 s before trial end (as derived from `guess_escape_end_time()`)

guess_escape_abortion(
  ref_movement,
  ref_position,
  begin_escape_time,
  end_escape_time,
  end_state
)

Arguments

ref_movement

Movement data frame

ref_position

Reference position of safe place

begin_escape_time

Start of escape

end_escape_time

End of escape

end_state

End state