harmonica.DatasetAccessorPrismsLayer¶
- 
class harmonica.DatasetAccessorPrismsLayer(xarray_obj)[source]¶
- Defines dataset accessor for layer of prisms - Warning - This class is not intended to be initialized. Use the prisms_layer accessor for accessing the methods and attributes of this class. - See also 
Methods Summary
| 
 | Return the boundaries of the chosen prism | 
| Computes the gravity generated by the layer of prisms | |
| Update top and bottom boundaries of the layer | 
- 
DatasetAccessorPrismsLayer.get_prism(indices)[source]¶
- Return the boundaries of the chosen prism - Parameters
- indices (tuple) – Indices of the desired prism of the layer in the following order: - (index_northing, index_easting).
- Returns
- prism (tuple) – Boundaries of the prisms in the following order: - west,- east,- south,- north,- bottom,- top.
 
- 
DatasetAccessorPrismsLayer.gravity(coordinates, field, density_name='density', **kwargs)[source]¶
- Computes the gravity generated by the layer of prisms - Uses - harmonica.prism_gravityfor computing the gravity field generated by the prisms of the layer. The density of the prisms will be assigned from the- data_varchosen through the- density_nameargument. Ignores the prisms which- topor- bottomboundaries are- np.nan``s. All ``kwargswill be passed to- harmonica.prism_gravity.- Parameters
- coordinates (list or 1d-array) – List or array containing - easting,- northingand- upwardof the computation points defined on a Cartesian coordinate system. All coordinates should be in meters.
- field (str) – Gravitational field that wants to be computed. The available fields are: - Gravitational potential: - potential- Downward acceleration:- g_z
- density_name (str (optional)) – Name of the property layer (or - data_varof the- xarray.Dataset) that will be used for the density of each prism in the layer. Default to- "density"
 
- Returns
- result (array) – Gravitational field generated by the prisms on the computation points in mGal. 
 - See also 
- 
DatasetAccessorPrismsLayer.update_top_bottom(surface, reference)[source]¶
- Update top and bottom boundaries of the layer - Change the values of the - topand- bottomcoordiantes based on the passed- surfaceand- reference. The- topand- bottomboundaries of every prism will be equal to the corresponding- surfaceand- referencevalues, respectively, if- surfaceis above the- referenceon that point. Otherwise the- topand- bottomboundaries of the prism will be equal to its corresponding- referenceand- surface, respectively.- Parameters
- surface (2d-array) – Array used to create the uppermost boundary of the prisms layer. All heights should be in meters. On every point where - surfaceis below- reference, the- surfacevalue will be used to set the- bottomboundary of that prism, while the- referencevalue will be used to set the- topboundary of the prism.
- reference (float or 2d-array) – Reference surface used to create the lowermost boundary of the prisms layer. It can be either a plane or an irregular surface passed as 2d array. Height(s) must be in meters. 
 
 
