コード例 #1
0
ファイル: haser_psg.py プロジェクト: nasapsg/isocoma
def calculatefx(fov=1000.0, plam=7.7e4, dlam=0.0):
    # fov: diameter of field-of-view [km]
    # plam: Molecular lifetime of parent [km], if molecule is parent use plam = 0
    # dlam: Molecular lifetime of daughter [km]
    if fov == 0 or plam == 0.0: return 0.0
    x = 0.5 * fov / plam
    if dlam == 0.0:
        # Parent molecule
        gx = 1.0 / x
        gx += -special.k1(x)
        gx += np.pi / 2.0 - special.iti0k0(x)[1]
        fx = x * gx
    else:
        # Daughter molecule
        u2 = plam / dlam
        if u2 == 1.0: u2 = 1.001
        gx = 1.0 / (u2 * x) - 1.0 / x
        gx += -special.k1(u2 * x) + special.k1(x)
        gx += -special.iti0k0(u2 * x)[1] + special.iti0k0(x)[1]
        fx = (u2 * x / (1.0 - u2)) * gx
    #Endelse
    return fx
コード例 #2
0
ファイル: gas.py プロジェクト: rtanmay/sbpy
 def _iK0(self, x):
     """Integral of the modified Bessel function of 2nd kind, 0th order."""
     if not scipy:
         raise AstropyWarning('scipy is not present, cannot continue.')
     return special.iti0k0(x.decompose().value)[1]
コード例 #3
0
 def _iK0(self, x):
     """Integral of the modified Bessel function of 2nd kind, 0th order."""
     if not scipy:
         raise RequiredPackageUnavailable('scipy')
     return special.iti0k0(x)[1]
コード例 #4
0
ファイル: common.py プロジェクト: dmitrydi/pd_lapl
def i_frac_0(x, su):
    # x = np.array([vals])
    return 0.5 / su * iti0k0(x * su)[1]