invert4geom.DatasetAccessorInvert4Geom.regional_constraints#
- DatasetAccessorInvert4Geom.regional_constraints(constraints_df, grid_method='eq_sources', constraints_block_size=None, constraints_weights_column=None, tension_factor=1, spline_dampings=None, depth=None, damping=None, cv=False, block_size=None, grav_obs_height=None, cv_kwargs=None, regional_shift=0, mask_column=None, reverse_regional_residual=False)[source]#
Calculate the gravity misfit as the difference between dataset variables
gravity_anomalyandforward_gravity. Then separate the misfit into regional and residual components whereresidual = misfit - regional.Approximate the regional field by sampling the gravity misfit at constraint points (points of known elevation of the layer of interest) and interpolating those sampled
values. The interpolation can be accomplished with the following methods:- Equivalent sources (grid_method=βeq_sourcesβ)
depthanddampingcan be set, or optimal values found through a cross-validation procedure usingoptimize_eq_source_params
- Tensioned splines (grid_method=βpygmtβ)
uses
pygmt.surfaceamount of tension (0-1) can be set with
tension_factor
- Bi-harmonic splines (grid_method=βverdeβ)
uses
verde.Splineamount of damping can be set with
spline_dampings, or a list of damping values can be provided to find the optimal damping through cross-validation usingoptimal_spline_damping
If there are many constraints, they can be block reduced with
constraints_block_sizeand optionalconstraints_weights_columncan be used to weight the constraints during block reduction.The resulting regional field can be shifted with
regional_shift, and the calculated residual field can be multiplied by the values inmask_column.The following new variables are added to the dataset:
misfit,reg,res,starting_forward_gravity,starting_misfit,starting_reg,starting_res- Parameters:
constraints_df (
DataFrame) β dataframe of constraints with columnseasting,northing(orlongitude,latitude), andupward.grid_method (
str) β method used to grid the sampled gravity data at the constraint points. Choose betweenverde,pygmt, oreq_sources, by defaulteq_sourcesconstraints_block_size (
float|None) β size of block used in a block-mean reduction of the constraints points, by default Noneconstraints_weights_column (
str|None) β column name for weighting values of each constraint point. Used ifconstraints_block_sizeis not None or ifgrid_methodisverdeoreq_sources, by default Nonetension_factor (
float) β Tension factor used ifgrid_methodispygmt, by default 1spline_dampings (
float|list[float] |None) β damping values used ifgrid_methodisverde, by default Nonedepth (
float|str|None) β depth of each source relative to the data elevation, positive downwards in meters, by default Nonedamping (
float|None) β damping values used ifgrid_methodiseq_sources, by default Nonecv (
bool) β use cross-validation to find the best equivalent source parameters, by default False, provide dictionarycv_kwargswhich is passed tooptimization.optimize_eq_source_paramsand can contain:n_trials,damping_limits,depth_limits,block_size_limits, andprogressbar.block_size (
float|None) β block size used ifgrid_methodiseq_sources, by default Nonegrav_obs_height (
float|None) β Observation height to use ifgrid_methodiseq_sources, by default Nonecv_kwargs (
dict[str,Any] |None) β additional keyword arguments to be passed tooptimize_eq_source_params, by default None. Can contain:n_trials,damping_limits,depth_limits,block_size_limits,sampler,plot,progressbar,parallel,fname,dtype, ordelayed.regional_shift (
float) β shift to add to the regional field, by default 0mask_column (
str|None) β Name of optional dataset variable with values to multiply the calculated residual gravity field by, should have values of 1 or 0, by default None.reverse_regional_residual (
bool) β if True, reverse the regional and residual fields after calculation, by default False
- Return type: