New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP - Chi-factor for CO2 #533
base: develop
Are you sure you want to change the base?
Conversation
radis/lbl/broadening.py
Outdated
wV_ij = olivero_1977(wG[l], wL[m]) # FWHM | ||
lineshape = voigt_lineshape( | ||
wbroad_centered, wL[m] / 2, wV_ij / 2, jit=jit | ||
) # FWHM > HWHM | ||
#lineshape = voigt_lineshape(wbroad_centered, wL[m] / 2, wV_ij / 2, jit=jit) # FWHM > HWHM | ||
lineshape = voigt_lineshape_xiFactor(wbroad_centered, wL[m] / 2, wV_ij / 2, xi_factor, jit=jit) # with xi_factor | ||
line_profile_LDM[l][m] = lineshape |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pgokulak It might be possible to avoid rewriting existing code such as voigt_lineshape
For instance :
lineshape = voigt_lineshape(...) # keep the default
lineshape *= self.add_chi_factor(self.input.molecule)
Where most of the new code is added in add_chi_factor
:
def add_chi_factor(molecule, w_centered, wv):
"""molecule, wavenumber array, voigt width"""
if molecule == 'CO2':
pressure_mbar = self.input.pressure_mbar
mole_fraction = self.input.mole_fraction # note, might be a dictionary if mulitple molecules ? check later
Tgas = self.input.Tgas
Tref = self.input.Tref
xi_factor = get_xiFactor(pressure_mbar*1e-3, mole_fraction, Tgas, Tref)
# xi_factor correction for pseudo-Lorentzian of Westlye et al.(2022)
gamma_v = wv/2 # Voigt half-width
alpha_xi = xi_factor*np.sin(np.pi/xi_factor)/(2*np.pi*gamma_v) # see see Westlye et al. (2022); Eqn(6)
lineshape_correction = alpha_xi / (1 + abs(w_centered/gamma_v)**xi_factor) # see see Westlye et al. (2022); Eqn(5)
return lineshape_correction
else:
raise NotImplementedError
This would make it easier to maintain the codebase
@pgokulak can we proceed towards merging these new additions ? |
Erwan:
Yes. CO2 lineshape correction (i.e., chi_correction) in the latest version
is based on a pseudo-Lorentzian correction factor (i.e., xi_factor). It is
validated for high-pressure conditions for 4.3 micron band.
Regards,
-Gokul-
…On Tue, Mar 21, 2023 at 10:52 AM Erwan Pannier ***@***.***> wrote:
@pgokulak <https://github.com/pgokulak> can we proceed towards merging
these new additions ?
—
Reply to this email directly, view it on GitHub
<#533 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARUWFE6QRYKF5CHWJSLJLX3W5G6BJANCNFSM6AAAAAATLPUZ7E>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@@ -1570,7 +1677,12 @@ def _init_w_axis(w_dat, log_p): | |||
lineshape = voigt_lineshape( | |||
wbroad_centered, wL[m] / 2, wV_ij / 2, jit=jit | |||
) # FWHM > HWHM | |||
|
|||
if self.params.chi_correction == True: | |||
lineshape *= self._add_CO2_chiCorrection(self.input.molecule, wbroad_centered, wV_ij / 2) # CO2 chi-correction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add this only if the molecule is CO2.
I can take this one if you want @pgokulak
Description
This pull request is to address ...
Fixes #