position.py 376 Bytes
Newer Older
1
2
import nifty4 as ift

Philipp Arras's avatar
Philipp Arras committed
3
from .model import Model
4
5


Philipp Arras's avatar
Philipp Arras committed
6
class PositionModel(Model):
7
8
9
10
11
12
13
14
15
16
17
    """
    Returns the MultiField.
    """
    def __init__(self, position):
        super(PositionModel, self).__init__(position)

        self._value = position
        self._gradient = ift.ScalingOperator(1., position.domain)

    def at(self, position):
        return self.__class__(position)