Simulation and Parameter Estimation in Geophysics - A python package for simulation and gradient based parameter estimation in the context of geophysical applications.
updates to keep pace with changes in simpeg/discretize#134
A complicated pattern that was copy/pasted several times in the code was able to be replaced with a simple np.where. An example:
actv = np.asarray([inds for inds, elem in enumerate(actv, 1) if elem], dtype=int) - 1
is now
actv = np.where(actv)[0]
Also, a few spelling mistakes and corrections in the examples. A couple of cases where variables were defined twice before use are now just done once.
This PR addresses issue #761 and follows PR #758 and PR #757 .
There was a naming discrepancy in the PF
module and that causes me some trouble.
In the Gravity
module, there are two aliases for rhoMap
: mapping
and mapPair
.
In the Magnetics
module, there is one alias for chiMap
: modelMap
.
This PR settle for modelMap
as only alias, consistent with the definition of the LinearProblem
class in Problem.py
Additional: Fix mapping name in LinearProblem
(from mapping
(depreciated) to modelMap
)
This formulation takes into account the regularization mapping into the preconditioner and remove the need to check for a specific wiresmap.
from pr: #758
commits from: @lheagy
review from: @thast
soft removal of python 2.7: we don't explicitly break compatibility as in #731, but it is no longer tested on Python 2.7
added a note in the docs saying we will not be working to ensure compatibility with python 2.7 anymore
import matlib explicitly as in numpy 1.16, it isn't imported in the numpy namespace be default
A couple of improvements or fix for Potential Fields:
ModelMap
propertysurvey.nD
definition so it is independent of Problem
reg.deriv2
instead of reg.W
for computing the preconditioner in Directives.updatePreconditioner
readUBCgravObs
becomes readGravityObservations
(for consistency between Grav
and Mag
names conventions.)Magnetics.MagneticIntegral
Fix for Issue #746
fixed DataMisfit.std
that now take into consideration survey.std
. So you are not forced to set DataMisfit.W
manually anymore
Fixed: Survey.MakeSyntheticData
, if not given a std
, was overwriting survey.std
even if already set. Now it will use survey.std
if not given a std
argument.
Explanation:
DataMisfit.std
was set to 5% by default, but to change it to survey.std
, it expected a None
value, thus it never gets updated...
bonus: light improvement again of Plot2DData
(reordering of if
statement so specifying contourOpts['vmin','vmax']
without a clim
works.
bonus: Somehow PR #725 did not make it to improve plot_misfit_curves
so I put it back here. Mainly, more option to plot $\phi_m$ or $\phi_small$ and $\phi_smooth$ independently, plus more options to save the figure.
Add a code of conduct based on the contributor covenant to SimPEG
SimPEG.Utils.plot2DDdata
SimPEG.Utils.plot2DDdata
SimPEG.Utils.plot2DDdata
Example output: