@@ -0,0 +1,785 @@
+from utils import gauss_1d, gauss_2d_isotropic, gauss_2d_anisotropic%0A%0A%0Aclass Model(object):%0A    %22%22%22%0A    Basic class that implements models.%0A    %22%22%22%0A    def __init__(self, x):%0A        self.x = x%0A%0A    def __call__(self, p):%0A        raise NotImplementedError%0A%0A%0Aclass Model_1d(Model):%0A    def __call__(self, p):%0A        x = self.x%0A        return gauss_1d(p, x)%0A%0A%0Aclass Model_2d_isotropic(Model):%0A    def __call__(self, p):%0A        x = self.x%5B:, 0%5D%0A        y = self.x%5B:, 1%5D%0A        return gauss_2d_isotropic(p, x, y)%0A%0A%0Aclass Model_2d_anisotropic(Model):%0A    def __call__(self, p):%0A        %22%22%22%0A        :param p:%0A            Parameter vector (amplitude, major axis, e, rotation angle)%0A        %22%22%22%0A        x = self.x%5B:, 0%5D%0A        y = self.x%5B:, 1%5D%0A        return gauss_2d_anisotropic(p, x, y)%0A

Move model classes to models.py