We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3524121 commit b2e117eCopy full SHA for b2e117e
1 file changed
SimPEG/directives/directives.py
@@ -2117,6 +2117,7 @@ class UpdateSensitivityWeights(InversionDirective):
2117
everyIter = True
2118
threshold: int = 0
2119
switch = True
2120
+ method = "percent_amplitude"
2121
2122
def initialize(self):
2123
@@ -2173,10 +2174,15 @@ def getWr(self):
2173
2174
wr += prob_JtJ
2175
2176
wr /= wr.max()
- wr = wr ** 0.5
2177
2178
- wr += np.percentile(wr, self.threshold)#threshold
+ if self.method == "percent_amplitude":
2179
+ wr += np.abs(wr.max() - wr.min()) * self.threshold / 100.
2180
+ elif self.method == "percentile":
2181
+ np.percentile(wr, self.threshold) #threshold
2182
+ else:
2183
+ wr += self.threshold
2184
2185
+ wr **= 0.5
2186
2187
else:
2188
wr += 1.0
0 commit comments