altar.models.seismic.Static
Module Contents
Classes
- class altar.models.seismic.Static.Static(name, locator, **kwds)
Bases:
altar.models.bayesianStatic inversion with cuda (d = G theta) Modeled as N patches with dip and slip displacements
- parametersets
- doc = the set of parameters in the model
- parameters
- doc = total number of parameters in the model
- observations
- doc = the number of data samples
- patches
- norm
- default
- doc = the norm to use when computing the data log likelihood
- case
- doc = the directory with the input files
- green_file
- doc = the name of the file with the Green functions
- data_file
- doc = the name of the file with the observations
- cd_file
- doc = the name of the file with the data covariance matrix
- output_path
- ifs
- G
- d
- Cd
- Cd_inv
- residuals
- normalization = 1
- processor = cpu
- initialize(self, application)
Initialize the state of the model given a {problem} specification
- initializeSample(self, step)
Fill {step.θ} with an initial random sample from my prior distribution.
- computePrior(self, step)
Fill {step.prior} with the densities of the samples in {step.theta} in the prior distribution
- computeDataLikelihood(self, step)
Fill {step.data} with the densities of the samples in {step.theta} given the available data. This is what is usually referred to as the “forward model”
- verify(self, step, mask)
Check whether the samples in {step.theta} are consistent with the model requirements and update the {mask}, a vector with zeroes for valid samples and non-zero for invalid ones
- initializeParameterSets(self)
Initialize the parameter set
- mountInputDataspace(self, pfs)
Mount the directory with my input files
- loadInputs(self)
Load the data in the input files into memory
- initializeCovariance(self, samples)
Compute the Cholesky decomposition of the inverse of the data covariance and merge it to data
- computeCovarianceInverse(self, cd)
Compute the inverse of the data covariance matrix
- computeNormalization(self, observations, cd)
Compute the normalization of the L2 norm
- initializeResiduals(self, samples, data)
Prime the matrix that will hold the residuals (G θ - d) for each sample by duplicating the observation vector as many times as there are samples
- update(self, annealer)
Model updating at the bottom of each annealing step Output step data
- forwardModel(theta, green, data_residuals=None, data_observations=None, batches=None)
Forward model: compute data prediction or data residuals from a set of theta :param theta [in: :type theta [in: samples, parameters :param cuarray] parameters with shape=: :type cuarray] parameters with shape=: samples, parameters :param green [in: :type green [in: observations, parameters :param cuarray] Green’s function with shape =: :type cuarray] Green’s function with shape =: observations, parameters :param batches [in: :param integer: :param optional] number of samples needto be computed <=samples: :param data_observations [in: :param cuarray: :param optional] data observations: :param data_residuals[inout: :type data_residuals[inout: observations, samples :param cuarray: :type cuarray: observations, samples :param optional] data predictions or residuals shape=: :type optional] data predictions or residuals shape=: observations, samples
- Returns:
data predictions or residuals if data_observations is provides