|
14 | 14 | from ..typing import RandomSeed |
15 | 15 |
|
16 | 16 | from ..data_misfit import BaseDataMisfit |
17 | | -from ..objective_function import ComboObjectiveFunction |
| 17 | +from ..objective_function import BaseObjectiveFunction, ComboObjectiveFunction |
18 | 18 | from ..maps import IdentityMap, Wires |
19 | 19 |
|
20 | 20 | from ..regularization import ( |
@@ -1841,8 +1841,6 @@ def name(self, value): |
1841 | 1841 | @property |
1842 | 1842 | def fileName(self): |
1843 | 1843 | if getattr(self, "_fileName", None) is None: |
1844 | | - from datetime import datetime |
1845 | | - |
1846 | 1844 | self._fileName = "{0!s}-{1!s}".format( |
1847 | 1845 | self.name, datetime.now().strftime("%Y-%m-%d-%H-%M") |
1848 | 1846 | ) |
@@ -3027,12 +3025,12 @@ class ScaleMisfitMultipliers(InversionDirective): |
3027 | 3025 | Path to save the chi-factors log file. |
3028 | 3026 | """ |
3029 | 3027 |
|
3030 | | - def __init__(self, path: Path | None, **kwargs): |
| 3028 | + def __init__(self, path: Path | None = None, **kwargs): |
3031 | 3029 | self.last_beta = None |
3032 | 3030 | self.chi_factors = None |
3033 | 3031 |
|
3034 | 3032 | if path is None: |
3035 | | - path = Path() |
| 3033 | + path = Path("./") |
3036 | 3034 |
|
3037 | 3035 | self.filepath = path / "ChiFactors.log" |
3038 | 3036 |
|
@@ -3081,7 +3079,7 @@ def endIter(self): |
3081 | 3079 | ) |
3082 | 3080 |
|
3083 | 3081 | # Update the scaling |
3084 | | - self.scalings *= scalings |
| 3082 | + self.scalings = self.scalings * scalings |
3085 | 3083 |
|
3086 | 3084 | # Normalize total phi_d with scalings |
3087 | 3085 | self.invProb.dmisfit.multipliers = self.multipliers * self.scalings |
|
0 commit comments