Utility Classes and Functions (SimPEG.utils
)#
The utils
package contains utilities for helping with common operations involving
SimPEG.
Many of the utilities are imported from discretize.utils. See that package’s documentation for many details on items.
Counter Utility Functions#
|
Class for recording iterations and operation times. |
|
Count function (DOCSTRING INCOMPLETE) |
|
Timing function (DOCSTRING INCOMPLETE) |
IO Utility Functions#
|
Download all files stored in a cloud directory. |
|
Read UBC-GIF DCIP2D formatted survey or data files. |
|
Read UBC-GIF DCIP3D formatted survey or data files. |
|
Read UBC-GIF DCIP OcTree formatted survey or data files. |
|
Read 2D or 3D DC/IP data from XYZ-formatted file. |
|
Read UBC-GIF GG3D formatted survey or data files. |
|
Read UBC-GIF GRAV3D formatted survey or data files. |
|
Read UBC-GIF MAG3D formatted survey or data files. |
|
Write UBC-GIF DCIP2D formatted survey or data files. |
|
Write UBC-GIF DCIP3D formatted survey or data files. |
|
Write UBC-GIF DCIP OcTree formatted survey or data files. |
|
Write 2D or 3D DC/IP data to XYZ-formatted file. |
|
Write UBC-GIF GRAV3D formatted survey or data files. |
|
Write UBC-GIF GG3D formatted survey or data files. |
|
Write UBC-GIF MAG3D formatted survey or data files. |
Matrix Utility Functions#
Converts a set of 3D vectors from Cartesian to spherical coordinates. |
|
|
Compute coterminal angle |
|
Compute constants defining a plane from a set of points. |
|
Estimate largest eigenvalue in absolute value using power iteration. |
|
Estimate the diagonal of a matrix. |
Converts a set of 3D vectors from spherical to Catesian coordinates. |
|
|
Return unique rows, row indices and inverse indices. |
Mesh Utility Functions#
|
Takes a triangulated surface and determine which mesh cells it intersects. |
Model Utility Functions#
|
Construct diagonal elements of a depth weighting matrix |
|
Get indices of active cells from topography. |
|
Add a homogeneous block to an existing cell centered model |
|
Create a basic two layered model |
Construct cell-centered model comprised of a block in a wholespace. |
|
Construct cell-centered model comprised of an ellipsoid in a wholespace. |
|
Define physical property model from scalar analytic function. |
|
Create physical property model consisting of a set of infinite horizontal layers. |
|
|
Create random model by convolving a kernel with a uniformly distributed random model. |
|
Get indices for cells whose centers lie inside specified block |
|
Get indices for cells whose centers lie within the convex hull of a set of points. |
|
Get indices for cells whose centers lie inside a sphere |
Plotting Utility Functions#
|
Interpolate and plot unstructured 2D data. |
|
Plot the vertical profile for a 1D layered Earth model. |
PGI Utility Classes and Functions#
|
Weighted Gaussian mixture class |
|
This class built upon the WeightedGaussianMixture, which itself built upon from the mixture.gaussian_mixture.GaussianMixture class from Scikit-Learn. |
Gaussian mixture class for non-linear relationships. |
|
Gaussian mixture class for non-linear relationships with priors. |
Code Utility Functions#
Many of the functions here are used internally to SimPEG and have minimal documentation.
|
Wrap a function to an instance of a class. |
|
Check stopping rules. |
|
Creates a new class from the target class with memory profiled methods. |
|
Dependent property. |
|
Utility function to deprecate a class |
|
Deprecate function |
|
Deprecate method |
|
Deprecate module |
|
Deprecate property |
|
Dynamically bind a class's method to an instance of a different class. |
|
Print completion of an operation. |
|
Print line. |
|
Print stoppers. |
|
Print titles. |
|
Wrap a function to require a specfic attribute. |
|
Set key word arguments for an object or throw an error if any do not exist. |
|
Validate float property |
|
Validate integer property |
|
Validate list of instances of a certain class |
|
Validate a location |
|
Validate numerical array property |
|
Validate a string property |
|
Validate if an object is callable |
|
Validate if an object represents a direction. |
|
Validates an array intended to indicate a list of active indices. |