simpeg.directives.SaveOutputDictEveryIteration#

class simpeg.directives.SaveOutputDictEveryIteration(on_disk=False, **kwargs)[source]#

Bases: SaveEveryIteration

Saves inversion parameters to a dictionary at every iteration.

At the end of every iteration, information about the current iteration is saved to the outDict property of this object.

Parameters:
on_diskbool, optional

Whether to also save the parameters to an npz file at the end of each iteration.

directorypathlib.Path or str, optional

Directory to save inversion parameters to if on_disk, defaults to current directory.

namestr, optional

Root name of the output file. The inversion start time and the iteration are appended to this.

Attributes

directory

Directory to save results in.

dmisfit

Data misfit associated with the directive.

file_abs_path

The absolute path to the saved output file.

invProb

Inverse problem associated with the directive.

inversion

Inversion object associated with the directive.

name

Root of the filename to be saved.

on_disk

Whether this object stores information to file_abs_path.

opt

Optimization algorithm associated with the directive.

reg

Regularization associated with the directive.

saveOnDisk

SaveEveryIteration.saveOnDisk has been deprecated.

simulation

Return simulation for all data misfits.

survey

Return survey for all data misfits

verbose

Whether or not to print debugging information.

fileName

Methods

endIter()

Update inversion parameter(s) according to directive at end of iteration.

finish()

Update inversion parameter(s) according to directive at end of inversion.

initialize()

Initialize inversion parameter(s) according to directive.

validate([directiveList])

Validate directive.