Ejemplo n.º 1
0
def test_Ellipse2D_circular():
    """Test that circular Ellipse2D agrees with Disk2D [3736]."""
    amplitude = 7.5
    radius = 10
    size = (radius * 2) + 1
    y, x = np.mgrid[0:size, 0:size]
    ellipse = models.Ellipse2D(amplitude, radius, radius, radius, radius,
                               theta=0)(x, y)
    disk = models.Disk2D(amplitude, radius, radius, radius)(x, y)
    assert np.all(ellipse == disk)
Ejemplo n.º 2
0
 def __init__(self, radius, **kwargs):
     self._model = models.Disk2D(1. / (np.pi * radius ** 2), 0, 0, radius)
     self._default_size = _round_up_to_odd_integer(2 * radius)
     super().__init__(**kwargs)
     self.normalize()
Ejemplo n.º 3
0
 astmodels.Multiply(10 * u.m),
 astmodels.RotateCelestial2Native(5.63, -72.5, 180),
 astmodels.EulerAngleRotation(23, 14, 2.3, axes_order='xzx'),
 astmodels.Mapping((0, 1), n_inputs=3),
 astmodels.Shift(2. * u.deg),
 astmodels.Scale(3.4 * u.deg),
 astmodels.RotateNative2Celestial(5.63 * u.deg, -72.5 * u.deg, 180 * u.deg),
 astmodels.RotateCelestial2Native(5.63 * u.deg, -72.5 * u.deg, 180 * u.deg),
 astmodels.RotationSequence3D([1.2, 2.3, 3.4, .3], 'xyzx'),
 astmodels.SphericalRotationSequence([1.2, 2.3, 3.4, .3], 'xyzy'),
 astmodels.AiryDisk2D(amplitude=10., x_0=0.5, y_0=1.5),
 astmodels.Box1D(amplitude=10., x_0=0.5, width=5.),
 astmodels.Box2D(amplitude=10., x_0=0.5, x_width=5., y_0=1.5, y_width=7.),
 astmodels.Const1D(amplitude=5.),
 astmodels.Const2D(amplitude=5.),
 astmodels.Disk2D(amplitude=10., x_0=0.5, y_0=1.5, R_0=5.),
 astmodels.Ellipse2D(amplitude=10., x_0=0.5, y_0=1.5, a=2., b=4.,
                     theta=0.1),
 astmodels.Exponential1D(amplitude=10., tau=3.5),
 astmodels.Gaussian1D(amplitude=10., mean=5., stddev=3.),
 astmodels.Gaussian2D(amplitude=10.,
                      x_mean=5.,
                      y_mean=5.,
                      x_stddev=3.,
                      y_stddev=3.),
 astmodels.KingProjectedAnalytic1D(amplitude=10., r_core=5., r_tide=2.),
 astmodels.Logarithmic1D(amplitude=10., tau=3.5),
 astmodels.Lorentz1D(amplitude=10., x_0=0.5, fwhm=2.5),
 astmodels.Moffat1D(amplitude=10., x_0=0.5, gamma=1.2, alpha=2.5),
 astmodels.Moffat2D(amplitude=10., x_0=0.5, y_0=1.5, gamma=1.2, alpha=2.5),
 astmodels.Planar2D(slope_x=0.5, slope_y=1.2, intercept=2.5),