Example #1
0
# Choose a non-thermal velocity dispersion. We'll also make this
# subsonic.
sigmaNT = 2.0e4

# Calculate the line profile for HCN(1-0). The functon returns two
# arrays, the first giving the brightness temperature and the second
# giving the velocity at which that brightness temperature is
# measured. The arguments of the function are, in order, the molecule
# to use, the upper state of the transition (where states are ordered
# by energy and the ground state is state 0), the lower state of the
# transition, the density, the temperature, the radial velocity, and
# the non-thermal velocity dispersion. The last four of this can be
# either constants or functions, and additional optional arguments
# also exist. See the User's Guide.
TB_HCN, vOut = lineProfLTE(HCN, 1, 0, R, nHCN, TProf, vProf, sigmaNT, \
                           vLim=[-2e5,2e5], nOut=400)

# Perform the same calculation for N2H+ (1-0)
TB_N2Hp, vOut1 = lineProfLTE(N2Hp, 1, 0, R, nN2Hp, TProf, vProf,
                             sigmaNT, vLim=[-2e5,2e5], nOut=400)

# Now make plots of both lines; divide by 10^5 to convert cm/s to km/s
plt.figure(1, figsize=(6,4))
plt.plot(vOut/1e5, TB_HCN, label='HCN(1-0)', linewidth=2)
plt.plot(vOut1/1e5, TB_N2Hp, label='N$_2$H$^+$(1-0)', linewidth=2)
plt.subplots_adjust(bottom=0.15)

# Adjust range and add labels
plt.xlim([-2,2])
plt.xlabel('v [km s$^{-1}$]')
plt.ylabel('$T_B$ [K]')
Example #2
0
# Choose a non-thermal velocity dispersion. We'll also make this
# subsonic.
sigmaNT = 2.0e4

# Calculate the line profile for CS(3-2). The functon returns two
# arrays, the first giving the brightness temperature and the second
# giving the velocity at which that brightness temperature is
# measured. The arguments of the function are, in order, the molecule
# to use, the upper state of the transition (where states are ordered
# by energy and the ground state is state 0), the lower state of the
# transition, the density, the temperature, the radial velocity, and
# the non-thermal velocity dispersion. The last four of this can be
# either constants or functions, and additional optional arguments
# also exist. See the User's Guide.
TBcs, vOut = lineProfLTE(cs, 2, 1, R, ncs, TProf, vProf, sigmaNT, \
                             vLim=[-2e5,2e5], nOut=400)

# Perform the same calculation for C^34S(3-2)
TBc34s, vOut1 = lineProfLTE(c34s,
                            2,
                            1,
                            R,
                            nc34s,
                            TProf,
                            vProf,
                            sigmaNT,
                            vLim=[-2e5, 2e5],
                            nOut=400)

# Now make plots of both lines; divide by 10^5 to convert cm/s to km/s
plt.figure(1, figsize=(6, 4))
Example #3
0
# Choose a non-thermal velocity dispersion. We'll also make this
# subsonic.
sigmaNT = 2.0e4

# Calculate the line profile for CS(3-2). The functon returns two
# arrays, the first giving the brightness temperature and the second
# giving the velocity at which that brightness temperature is
# measured. The arguments of the function are, in order, the molecule
# to use, the upper state of the transition (where states are ordered
# by energy and the ground state is state 0), the lower state of the
# transition, the density, the temperature, the radial velocity, and
# the non-thermal velocity dispersion. The last four of this can be
# either constants or functions, and additional optional arguments
# also exist. See the User's Guide.
TBcs, vOut = lineProfLTE(cs, 2, 1, R, ncs, TProf, vProf, sigmaNT, \
                             vLim=[-2e5,2e5], nOut=400)

# Perform the same calculation for C^34S(3-2)
TBc34s, vOut1 = lineProfLTE(c34s, 2, 1, R, nc34s, TProf, vProf,
                            sigmaNT, vLim=[-2e5,2e5], nOut=400)

# Now make plots of both lines; divide by 10^5 to convert cm/s to km/s
plt.figure(1, figsize=(6,4))
plt.plot(vOut/1e5, TBcs, label='CS(3-2)', linewidth=2)
plt.plot(vOut1/1e5, TBc34s, label='C$\,^{34}$S(3-2)', linewidth=2)
plt.subplots_adjust(bottom=0.15)

# Adjust range and add labels
plt.xlim([-2,2])
plt.xlabel('v [km s$^{-1}$]')
plt.ylabel('$T_B$ [K]')
Example #4
0
# Choose a non-thermal velocity dispersion. We'll also make this
# subsonic.
sigmaNT = 2.0e4

# Calculate the line profile for HCN(1-0). The functon returns two
# arrays, the first giving the brightness temperature and the second
# giving the velocity at which that brightness temperature is
# measured. The arguments of the function are, in order, the molecule
# to use, the upper state of the transition (where states are ordered
# by energy and the ground state is state 0), the lower state of the
# transition, the density, the temperature, the radial velocity, and
# the non-thermal velocity dispersion. The last four of this can be
# either constants or functions, and additional optional arguments
# also exist. See the User's Guide.
TB_HCN, vOut = lineProfLTE(HCN, 1, 0, R, nHCN, TProf, vProf, sigmaNT, vLim=[-2e5, 2e5], nOut=400)

# Perform the same calculation for N2H+ (1-0)
TB_N2Hp, vOut1 = lineProfLTE(N2Hp, 1, 0, R, nN2Hp, TProf, vProf, sigmaNT, vLim=[-2e5, 2e5], nOut=400)

# Now make plots of both lines; divide by 10^5 to convert cm/s to km/s
plt.figure(1, figsize=(6, 4))
plt.plot(vOut / 1e5, TB_HCN, label="HCN(1-0)", linewidth=2)
plt.plot(vOut1 / 1e5, TB_N2Hp, label="N$_2$H$^+$(1-0)", linewidth=2)
plt.subplots_adjust(bottom=0.15)

# Adjust range and add labels
plt.xlim([-2, 2])
plt.xlabel("v [km s$^{-1}$]")
plt.ylabel("$T_B$ [K]")