invert4geom.create_data#
- create_data(gravity, buffer_width=None, model_type='prisms')[source]#
Convert a dataset of gravity data into the format needed for the inversion. This includes adding various attributes to the dataset, and defining an inner region which will be used for plotting and statistics to avoid edge effects.
- Parameters:
gravity (
Dataset) β A dataset with coordinateseastingandnorthing(if using prisms) orlongitudeandlatitude(if using tesseroids), as well as variablesupwarddefining the gravity observation height (with same vertical reference as the model, (i.e. WGS84) in meters andgravity_anomalywith the observed gravity values in mGals. If using tesseroids, the dataset must also contain a variablegeocentric_radiusdefining the geocentric radius at each observation point in meters. This can be created using the Python package Boule.buffer_width (
float|None) β The width in meters or decimal degrees of a buffer zone used to zoom-in on the provided data creating an inner region. This inner region will be used for plotting and calculating statistics for processes such as cross validation, and l2-norms, this avoids skewing plots and values by edge effects, by default will use a width of the 10% of the shortest dimension length, to the nearest multiple of grid spacing.model_type (
str) β Choose betweenprismsandtesseroids, which affects whether geographic or projected coordinates are expect, by defaultprisms
- Returns:
A dataset with new attributes
model_type,dataset_type,spacing, βbuffer_width``,spacing,region, andinner_region.- Return type: