apply_data.py 373 Bytes
Newer Older
1
def ApplyData(data, var, model_data):
Philipp Arras's avatar
Comment  
Philipp Arras committed
2
    # TODO This is rather confusing. Delete that eventually.
Martin Reinecke's avatar
Martin Reinecke committed
3 4 5
    from ..operators.diagonal_operator import DiagonalOperator
    from ..models.constant import Constant
    from ..sugar import sqrt
6 7
    sqrt_n = DiagonalOperator(sqrt(var))
    data = Constant(model_data.position, data)
8
    return sqrt_n.inverse_times(model_data - data)