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:
- Returns:
outliers – Maximum number of allowable outliers.
- Return type:
- 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:
orbit_members (FittedOrbitMembers) – The orbit members that contain the residuals with respect to the observations.
observations (OrbitDeterminationObservations) – The observations to remove the worst residual from.
- Returns:
obs_id (str) – The ID of the observation that was removed.
filtered_observations (OrbitDeterminationObservations) – The observations with the worst residual removed.