Thermal broadening¶
- PyAstronomy.pyasl.thermalBroadeningWidth(lam0, T, m=None, fwhm=True)¶
Calculate the width for thermal broadening.
Thermal motion of particles causes a Doppler broadening of the line profile. The resulting line profile is Gaussian with FWHM given by
\[fwhm = \lambda_0\sqrt{\frac{8k_B T\ln(2)}{m c^2}}\]See, e.g., http://hyperphysics.phy-astr.gsu.edu/hbase/atomic/broaden.html
- Parameters
- lam0float
Wavelength at which to calculate the width.
- Tfloat
Temperature [K].
- mfloat, optional
Mass of the particles [kg]. If not specified, the proton mass is assumed.
- fwhmboolean, optional
If True (default), the FWHM of the Gaussian broadening kernel will be returned. Otherwise, the standard deviation is returned.
- Returns
- Widthfloat
The width of the Gaussian broadening kernel. By default, the FWHM is returned. To obtain the standard deviation, set the fwhm flag to False.
- PyAstronomy.pyasl.tempFromthermalBroadeningWidth(lam0, width, m=None, awidth=0.0)¶
Calculate the temperature required to obtain thermal broadening width.
Thermal motion of particles causes Doppler broadening of the line profile. The resulting line profile is Gaussian with FWHM given by
\[fwhm = \lambda_0\sqrt{\frac{8k_B T\ln(2)}{m c^2}}\]See, e.g., http://hyperphysics.phy-astr.gsu.edu/hbase/atomic/broaden.html
Here, the relation is reversed, so that the temperature, T, can be obtained from the width. The relation is only strictly valid in the case of Gaussian lines.
Note
Units of lam0, width, and awidth have to be consistent.
- Parameters
- lam0float
Wavelength at which to width (FWHM) was measured.
- widthfloat
Measured width of the feature (FWHM)
- mfloat, optional
Mass of the particles [kg]. If not specified, the proton mass is assumed.
- awidthfloat
Additional width contributed by other effects such as instrumental resolution. The thermal width, ft, is obtained by quadratic subtraction, i.e., ft**2 = width**2 - awidth**2. Default is zero.
- Returns
- Temperaturefloat
The temperature required to achieve the specified broadening width.
- Thermal widthfloat
The thermal width used in the calculations (may be modified if awidth has been specified.
Example¶
from PyAstronomy import pyasl
w0 = 6564.0
T = 9567.0
linefwhm = pyasl.thermalBroadeningWidth(w0, T)
tbroad = pyasl.tempFromthermalBroadeningWidth(w0, linefwhm, awidth=0.0)
print("Line width [FWHM]: %5.2f" % linefwhm)
print("Thermal broadening temperature: %6.1f" % tbroad)