diff --git a/geoapps/inversion/components/models.py b/geoapps/inversion/components/models.py index 35009ae80..64a2c6b38 100644 --- a/geoapps/inversion/components/models.py +++ b/geoapps/inversion/components/models.py @@ -118,6 +118,7 @@ def starting(self): mstart = self._starting.model if mstart is not None and self.is_sigma: + mstart = mstart.copy() mstart = np.log(mstart) return mstart @@ -132,11 +133,13 @@ def reference(self): if mref is None: mref = self.starting self.driver.params.alpha_s = 0.0 - elif self.is_sigma & (all(mref == 0)): - mref = self.starting - self.driver.params.alpha_s = 0.0 else: - mref = np.log(mref) if self.is_sigma else mref + mref = mref.copy() + if self.is_sigma & (all(mref == 0)): + mref = self.starting + self.driver.params.alpha_s = 0.0 + else: + mref = np.log(mref) if self.is_sigma else mref return mref @property @@ -146,6 +149,8 @@ def lower_bound(self): if lbound is None: return -np.inf + lbound = lbound.copy() + if self.is_sigma: is_finite = np.isfinite(lbound) lbound[is_finite] = np.log(lbound[is_finite]) @@ -158,6 +163,7 @@ def upper_bound(self): if ubound is None: return np.inf + ubound = ubound.copy() if self.is_sigma: is_finite = np.isfinite(ubound) ubound[is_finite] = np.log(ubound[is_finite]) @@ -169,6 +175,7 @@ def conductivity(self): mstart = self._conductivity.model if mstart is not None and self.is_sigma: + mstart = mstart.copy() mstart = np.log(mstart) return mstart diff --git a/geoapps/inversion/joint/driver.py b/geoapps/inversion/joint/driver.py index a7bbdafe6..374557b9b 100644 --- a/geoapps/inversion/joint/driver.py +++ b/geoapps/inversion/joint/driver.py @@ -69,6 +69,7 @@ def drivers(self) -> list[InversionDriver] | None: group = self.workspace.get_entity(group.uid)[0] ui_json = group.options ui_json["geoh5"] = self.workspace + ui_json["workspace_geoh5"] = None ifile = InputFile(ui_json=ui_json) mod_name, class_name = DRIVER_MAP.get(ifile.data["inversion_type"])