Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions simpeg/directives/directives.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from ..typing import RandomSeed

from ..data_misfit import BaseDataMisfit
from ..objective_function import ComboObjectiveFunction
from ..objective_function import BaseObjectiveFunction, ComboObjectiveFunction
from ..maps import IdentityMap, Wires

from ..regularization import (
Expand Down Expand Up @@ -1841,8 +1841,6 @@ def name(self, value):
@property
def fileName(self):
if getattr(self, "_fileName", None) is None:
from datetime import datetime

self._fileName = "{0!s}-{1!s}".format(
self.name, datetime.now().strftime("%Y-%m-%d-%H-%M")
)
Expand Down Expand Up @@ -3027,12 +3025,12 @@ class ScaleMisfitMultipliers(InversionDirective):
Path to save the chi-factors log file.
"""

def __init__(self, path: Path | None, **kwargs):
def __init__(self, path: Path | None = None, **kwargs):
self.last_beta = None
self.chi_factors = None

if path is None:
path = Path()
path = Path("./")

self.filepath = path / "ChiFactors.log"

Expand Down Expand Up @@ -3081,7 +3079,7 @@ def endIter(self):
)

# Update the scaling
self.scalings *= scalings
self.scalings = self.scalings * scalings

# Normalize total phi_d with scalings
self.invProb.dmisfit.multipliers = self.multipliers * self.scalings
Expand Down