nifty.cl.library.adjust_variances module#

do_adjust_variances(position, A, minimizer, xi_key='xi', samples=[])[source]#

Adjusts the variance of xi_key to be represented by amplitude_operator.

Solves a constant likelihood optimization of the form phi = A * position[xi_key] under the constraint that phi remains constant.

The field indexed by xi_key is desired to be a Gaussian white Field, thus variations that are more easily represented by A will be absorbed in A.

Parameters:
Returns:

The new position after variances have been adjusted.

Return type:

MultiField

make_adjust_variances_hamiltonian(a, xi, position, samples=[], scaling=None, ic_samp=None)[source]#

Creates a Hamiltonian for constant likelihood optimizations.

Constructs a Hamiltonian to solve constant likelihood optimizations of the form phi = a * xi under the constraint that phi remains constant.

xi is desired to be a Gaussian white Field, thus variations that are more easily represented by a should be absorbed in a.

Parameters:
Returns:

A Hamiltonian that can be used for further minimization.

Return type:

nifty.cl.operators.energy_operators.StandardHamiltonian