nifty7.operators.endomorphic_operator module#
- class EndomorphicOperator[source]#
Bases:
LinearOperator
Represents a
LinearOperator
which is endomorphic, i.e. one which has identical domain and target.- draw_sample(from_inverse=False)[source]#
Generates a sample from a Gaussian distribution with zero mean and covariance given by the operator.
May or may not be implemented. Only optional.
- Parameters:
from_inverse (bool (default : False)) – if True, the sample is drawn from the inverse of the operator
- Returns:
A sample from the Gaussian of given covariance.
- Return type:
Field or MultiField
- draw_sample_with_dtype(dtype, from_inverse=False)[source]#
Generates a sample from a Gaussian distribution with zero mean, covariance given by the operator and specified data type.
This method is implemented only for operators which actually draw samples (e.g. DiagonalOperator). Operators which process the sample (like SandwichOperator) implement only draw_sample().
May or may not be implemented. Only optional.
- Parameters:
dtype (numpy.dtype or dict of numpy.dtype) – Dtype used for sampling from this operator. If the domain of op is a MultiDomain, the dtype can either be specified as one value for all components of the MultiDomain or in form of a dictionary whose keys need to conincide the with keys of the MultiDomain.
from_inverse (bool (default : False)) – if True, the sample is drawn from the inverse of the operator
- Returns:
A sample from the Gaussian of given covariance.
- Return type:
Field or MultiField
- get_sqrt()[source]#
Return operator op which obeys self == op.adjoint @ op.
Note that this function is only implemented for operators with real spectrum.
- Returns:
Operator which is the square root of self
- Return type:
- property target#
returns
domain
Returns self.domain, because this is also the target domain for endomorphic operators.
- Type: