Parameterization

Parameterization class definition.

class Parameterization(vp, pr, vs, rh)

Bases: object

Class for developing inversion parameterizations.

This class is intended to be used for developing various parameterization files for use in the open-source software Dinver. While parameterizations of various kinds can be built quickly using this tool, it does have limited functionality compared to the full user interface. It is recommended that the you use this tool to create general parameterizations in batches and fine tune them if necessary using the Dinver user interface.

Variables:vp, pr, rh (vs,) – Parameter objects defining shear-wave velocity, compression-wave velocity, Poisson’s ratio, and mass density respectively.
__init__(vp, pr, vs, rh)

Initialize an instance of the Parameterization class.

Initialize a Parameterization using instantiated Parameter objects.

Parameters:vp, pr, vs, rh (Parameter) – Instantiated Parameter objects, see :meth: Parameter <swprepost.Parameter.__init__>.
Returns:Parameterization – An initialized Parameterization object.
Raises:TypeError – If vp, pr, vs, and rh are not Parameter objects.
static check_parameter(name, val)

Check input for the parameter.

classmethod from_min_max(*args, **kwargs)
classmethod from_param(fname_prefix, version='3.4.2')

Create Parameterization from a .param file.

Note this method is still largely experimental and may not work for all cases.

Parameters:
  • fname_prefix (str) – Name of param file to be opened excluding the .param suffix, may include the relative or full path.
  • version ({‘3.4.2’, ‘2.10.1’}, optional) – Version of Geopsy, default is version ‘3.4.2’.
Returns:

Parameterization – Instantiated Parameterization object.

Raises:

NotImplementedError – If version does not match the options provided.

Notes

In previous versions of swprepost (v1.0.0 and earlier) an attempt was made to support all versions of Dinver’s .target and .param formats. However, this has become untenable due to the number and frequency of breaking changes that occur to these formats. Therefore, in lieu of supporting all versions, swprepost will seek to support only those versions directly associated with the open-source high-performance computing application swbatch.

to_param(fname_prefix, version='3.4.2')

Write info to the .param used by Dinver.

Parameters:
  • fname_prefix (str) – File name prefix (without the .param extension), may be a relative or the full path.
  • version ({‘3.4.2’, ‘2.10.1’}, optional) – Version of Geopsy, default is version ‘3.4.2’.
Returns:

None – Writes .param file to disk.

Raises:

NotImplementedError – If version does not match the options provided.

Notes

In previous versions of swprepost (v1.0.0 and earlier) an attempt was made to support all versions of Dinver’s .target and .param formats. However, this has become untenable due to the number and frequency of breaking changes that occur to these formats. Therefore, in lieu of supporting all versions, swprepost will seek to support only those versions directly associated with the open-source high-performance computing application swbatch.