adam_core.orbit_determination.outliers module

adam_core.orbit_determination.outliers.calculate_max_outliers(num_obs: int, min_obs: int, contamination_percentage: float) int[source]

Calculate the maximum number of allowable outliers. Linkages may contain err oneuos observations that need to be removed. This function calculates the maximum number of observations that can be removed before the linkage no longer has the minimum number of observations required. The contamination percentage is the maximum percentage of observations that allowed to be erroneous.

Parameters:
  • num_obs (int) – Number of observations in the linkage.

  • min_obs (int) – Minimum number of observations required for a valid linkage.

  • contamination_percentage (float) – Maximum percentage of observations that allowed to be erroneous. Range is [0, 100].

Returns:

outliers – Maximum number of allowable outliers.

Return type:

int

adam_core.orbit_determination.outliers.remove_lowest_probability_observation(orbit_members: FittedOrbitMembers, observations: OrbitDeterminationObservations) Tuple[str, OrbitDeterminationObservations][source]

Remove the observation with the worst residual from the observations. The probability is defined to be the probability of drawing a more extreme residual than the one observed. If multiple observations have the same probability, then the observation with the highest squared residual value is removed.

Parameters:
Returns:

  • obs_id (str) – The ID of the observation that was removed.

  • filtered_observations (OrbitDeterminationObservations) – The observations with the worst residual removed.