Skip to content

Commit

Permalink
[#85] debug Voigt
Browse files Browse the repository at this point in the history
  • Loading branch information
cjperks7 committed Feb 17, 2024
1 parent e8d88bb commit 8095610
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions aurora/line_broaden.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,29 +341,27 @@ def _get_Voigt(
theta[tr,:],
FWHM[tr]
) = _calc_Voigt_scipy(
FWHM_G = out_G['FWHM'][tr,:],
FWHM_L = out_L['FWHM'][tr,:],
FWHM_G = out_G['FWHM'][tr],
FWHM_L = out_L['FWHM'][tr],
lambda0 = wave_A[tr]
)

# Use pseudo-Voigt weighted sum function
elif use_pseudo:
(
lambs_profs_A[tr,:],
lams_profs_A[tr,:],
theta[tr,:],
FWHM[tr]
) = _calc_Voigt_pseudo(
FWHM_G = out_G['FWHM'][tr,:],
FWHM_G = out_G['FWHM'][tr],
lams_G = out_G['lams_profs_A'][tr,:],
theta_G = out_G['theta'][tr,:],
FWHM_L = out_L['FWHM'][tr,:],
FWHM_L = out_L['FWHM'][tr],
lams_L = out_L['lams_profs_A'][tr,:],
theta_L = out_L['theta'][tr,:],
lambda0 = wave_A[tr]
)

print('Voigt')
print(FWHM)
# Output line shape and wavelength mesh
return {
'lams_profs_A': lams_profs_A, # [AA], dim(trs,nlamb)
Expand Down Expand Up @@ -411,8 +409,6 @@ def _get_Doppler(
wave_A=wave_A,
)

print('Doppler')
print(FWHM)
# Output line shape and wavelength mesh
return {
'lams_profs_A': lams_profs_A, # [AA], dim(trs,nlamb)
Expand Down Expand Up @@ -513,8 +509,7 @@ def _get_Natural(
dnu = FWHM[ii],
wave_A=wave_A[ii],
)
print('Natural')
print(FWHM)

# Output line shape and wavelength mesh
return {
'lams_profs_A': lams_profs_A, # [AA], dim(trs,nlamb)
Expand Down Expand Up @@ -652,6 +647,9 @@ def _calc_Voigt_scipy(
)
) # [AA]

# Ensure normalization
theta /= np.trapz(theta,mesh_A)

# Output
return mesh_A, theta, FWHM_V

Expand Down

0 comments on commit 8095610

Please sign in to comment.