Skip to content

Commit

Permalink
Corrected bug in the definition of the Voigt profile
Browse files Browse the repository at this point in the history
  • Loading branch information
ladsantos committed Apr 9, 2024
1 parent 863f699 commit 372ba57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions p_winds/transit.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ def _normalized_optical_depth(delta_nu_grid, nu0_k, a_ij_k,
if _method == 'formal':
# Calculate Doppler width (standard deviation) of the Voigt profile
alpha_nu = \
nu0_k / c_speed * (2 * k_b * temp / mass) ** 0.5
nu0_k / c_speed * (k_b * temp / mass) ** 0.5

# Calculate the frequency shifts due to wind and bulk motion
delta_nu_wind = (velocity_los + v_bulk +
Expand All @@ -488,13 +488,13 @@ def _normalized_optical_depth(delta_nu_grid, nu0_k, a_ij_k,

if turbulence_broadening is True:
# Similar to Lampon et al. (2020), calculate the broadening
# as the turbulent velocity = sqrt(5/3 * kT / m)
turbulence_velocity = np.sqrt(5 / 3 * k_b * average_temp / mass)
# as the turbulent velocity = sqrt(5/3 * kT / 2m)
turbulence_velocity = np.sqrt(5 / 6 * k_b * average_temp / mass)
else:
turbulence_velocity = 0.0

# Calculate Doppler width of the Voigt profile
alpha_nu = nu0_k / c_speed * (2 * k_b * average_temp / mass +
alpha_nu = nu0_k / c_speed * (k_b * average_temp / mass +
wind_broadening_velocity ** 2 +
turbulence_velocity ** 2) ** 0.5

Expand Down

0 comments on commit 372ba57

Please sign in to comment.