Skip to content

Commit dd10bdf

Browse files
committed
Add spherical unit weights to directives
1 parent d6757ee commit dd10bdf

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

simpeg/directives/_vector_models.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
BaseSaveGeoH5,
55
InversionDirective,
66
SaveModelGeoH5,
7+
SphericalUnitsWeights,
78
Update_IRLS,
89
UpdateIRLS,
910
UpdateSensitivityWeights,
@@ -215,8 +216,13 @@ def endIter(self):
215216
elif isinstance(directive, UpdateSensitivityWeights):
216217
directive.every_iteration = True
217218

219+
spherical_units = SphericalUnitsWeights(
220+
amplitude=self.regularizations.objfcts[0].mapping,
221+
angles=self.regularizations.objfcts[1:],
222+
)
218223
directiveList = [
219-
ProjectSphericalBounds()
224+
ProjectSphericalBounds(),
225+
spherical_units,
220226
] + self.inversion.directiveList.dList
221227
self.inversion.directiveList = directiveList
222228

0 commit comments

Comments
 (0)