photutils/psf/tests/test_misc.py
def moffimg():
    """
    This fixture requires scipy so don't call it from non-scipy tests
    """
    from scipy import integrate
    from astropy.modeling.models import Moffat2D

    mof = Moffat2D(alpha=4.8)

    # this is the analytic value needed to get a total flux of 1
    mof.amplitude = (mof.alpha-1)/(np.pi*mof.gamma**2)

    # first make sure it really is normalized
    assert (1 - integrate.dblquad(mof, -10, 10,
                                  lambda x: -10, lambda x: 10)[0]) < 1e-6

    # now create an "image" of the PSF
    xg, yg = np.meshgrid(*([np.linspace(-2, 2, 100)]*2))

    return mof, (xg, yg, mof(xg, yg))

    This fixture requires scipy so don't call it from non-scipy tests
    
This fixture requires scipy so don't call it from non-scipy tests
This fixture requires scipy so don ' t call it from non - scipy tests
def moffimg():
    from scipy import integrate
    from astropy.modeling.models import Moffat2D
    mof = Moffat2D(alpha=4.8)
    mof.amplitude = (mof.alpha-1)/(np.pi*mof.gamma**2)
    assert (1 - integrate.dblquad(mof, -10, 10,
                                  lambda x: -10, lambda x: 10)[0]) < 1e-6
    xg, yg = np.meshgrid(*([np.linspace(-2, 2, 100)]*2))
    return mof, (xg, yg, mof(xg, yg))
def moffimg ( ) : from scipy import integrate from astropy . modeling . models import Moffat2D mof = Moffat2D ( alpha = 4.8 ) mof . amplitude = ( mof . alpha - 1 ) / ( np . pi * mof . gamma ** 2 ) assert ( 1 - integrate . dblquad ( mof , - 10 , 10 , lambda x : - 10 , lambda x : 10 ) [ 0 ] ) < 1e-6 xg , yg = np . meshgrid ( * ( [ np . linspace ( - 2 , 2 , 100 ) ] * 2 ) ) return mof , ( xg , yg , mof ( xg , yg ) )
This fixture requires scipy so don't call it from non-scipy tests
This fixture requires scipy so don ' t call it from non - scipy tests
"""
    This fixture requires scipy so don't call it from non-scipy tests
    """ # this is the analytic value needed to get a total flux of 1 # first make sure it really is normalized # now create an "image" of the PSF