harmonica.DatasetAccessorTesseroidLayer
harmonica.DatasetAccessorTesseroidLayer¶
- class harmonica.DatasetAccessorTesseroidLayer(xarray_obj)[source]¶
Define dataset accessor for layer of tesseroids
Warning
This class in not intended to be initialized. Use the tesseroid_layer accessor for accessing the methods and attributes of this class.
See also
Methods Summary
Return the boundaries of the chosen tesseroid |
|
|
Computes the gravity generated by the layer of tesseroids |
Update top and bottom boundaries of the layer |
- DatasetAccessorTesseroidLayer.get_tesseroid(indices)[source]¶
Return the boundaries of the chosen tesseroid
- Parameters
indices (tuple) – Indices of the desired tesseroid of the layer in the following order:
(index_northing, index_easting).- Returns
tesseroid (tuple) – Boundaries of the prisms in the following order:
longitude_w,longitude_e,latitude_s,latitude_n,bottom,top.
- DatasetAccessorTesseroidLayer.gravity(coordinates, field, density_name='density', **kwargs)[source]¶
Computes the gravity generated by the layer of tesseroids
- Parameters
coordinates (list or 1d-array) – List of array containing
latitude,longitudeandupwardof the computation points defined on a spherical coordinates system.upwardcoordinate should be in meters.field (str) – Gravitational field that wants to be computed. The variable fields are: - Gravitational potential:
potential- Downward acceleration:g_zdensity_name (str (optional)) – Name of the property layer (or
data_varof thexarray.Dataset) that will be used for the density of each tesseroid in the layer. Default to"density"
- Returns
result (array) – Gravitational field generated by the tesseroid on the computation point in mGal
See also
- DatasetAccessorTesseroidLayer.update_top_bottom(surface, reference)[source]¶
Update top and bottom boundaries of the layer
Change the values of the
topandbottomcoordinates based on the passedsurfaceandreference. Thetopandbottomboundaries of every tesseroid will be equal to the correspondingsurfaceandreferencevalues, respectively, ifsurfaceis above thereferenceon that point. Otherwise thetopandbottomboundaries of the tesseroid will be equal to its correspondingreferenceandsurface, respectively.- Parameters
surface (2d-array) – Array used to create the uppermost boundary of the tesseroid layer. All heights should be in meters. On every point where
surfaceis belowreference, thesurfacevalue will be used to set thebottomboundary of that tesseroid, while thereferencevalue will be used to set thetopboundary of the tesseroid.reference (2d-array or float) – Reference surface used to create the lowermost boundary of the tesseroid layer. It can be either a plane or an irregular surface passed as 2d array. Height(s) must be in meters.