invert4geom.regional_separation_score

invert4geom.regional_separation_score#

regional_separation_score(grav_ds, testing_df, method, true_regional=None, score_as_median=False, **kwargs)[source]#

Evaluate the effectiveness of the gravity regional-residual separation. The optimal regional component is that which results in a residual component which is lowest at constraint points, while still contains a high amplitude elsewhere.

Parameters:
  • grav_ds (Dataset) – gravity dataset with variables “gravity_anomaly” and “forward_gravity”.

  • testing_df (DataFrame) – dataframe containing a priori measurements of the topography of interest with columns “upward”, “easting”, and “northing”

  • method (str) – regional separation method to use, passed to DatasetAccessorInvert4Geom.regional_separation.

  • true_regional (DataArray | None) – the true regional field, if known, used to calculate an additional score, by default None

  • score_as_median (bool) – switch from using the root mean square to the root median square for the score, by default False

  • **kwargs (Any) – additional keyword arguments for the specified method.

Return type:

tuple[float, float, float | None, Dataset]

Returns:

  • residual_constraint_score (float) – the RMS of the residual at constraint points

  • residual_amplitude_score (float) – the RMS of the residuals amplitude at all grid points

  • true_reg_score (float | None) – the RMSE between the true regional field and the estimated field, if provided, otherwise None

  • ds_anomalies (xarray.Dataset) – the dataset of the regional and residual gravity anomalies