Skip to content

Commit 4db53e3

Browse files
committed
Fixed bug where the wrong approximation may be used for pure Voigt profiles.
1 parent db288b1 commit 4db53e3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

hapi/hapi.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51971,9 +51971,9 @@ def pcqsdhc(sg0,GamD,Gam0,Gam2,Shift0,Shift2,anuVC,eta,sg,Ylm=0.0):
5197151971
index_Z1 = abs(Z1) <= 4.0e3
5197251972
index_NOT_Z1 = ~index_Z1
5197351973
if any(index_Z1):
51974-
Bterm_GLOBAL = rpi*cte*((1.0e0 - Z1**2)*__ComplexType__(WR1 + 1.0e0j*WI1) + Z1/rpi)
51974+
Bterm_GLOBAL[index_Z1] = rpi*cte*((1.0e0 - Z1[index_Z1]**2)*__ComplexType__(WR1[index_Z1] + 1.0e0j*WI1[index_Z1]) + Z1[index_Z1]/rpi)
5197551975
if any(index_NOT_Z1):
51976-
Bterm_GLOBAL = cte*(rpi*__ComplexType__(WR1 + 1.0e0j*WI1) + 0.5e0/Z1 - 0.75e0/(Z1**3))
51976+
Bterm_GLOBAL[index_NOT_Z1] = cte*(rpi*__ComplexType__(WR1[index_NOT_Z1] + 1.0e0j*WI1[index_NOT_Z1]) + 0.5e0/Z1[index_NOT_Z1] - 0.75e0/(Z1[index_NOT_Z1]**3))
5197751977
else:
5197851978
# PART2, PART3 AND PART4 (PART4 IS A MAIN PART)
5197951979

@@ -53646,7 +53646,6 @@ def absorptionCoefficient_Generic(Components=None,SourceTables=None,partitionFun
5364653646
raise Exception('Unknown GammaL value: %s' % GammaL)
5364753647

5364853648
# Simple check
53649-
print(Diluent) # Added print statement # CHANGED RJH 23MAR18 # Simple check
5365053649
for key in Diluent:
5365153650
val = Diluent[key]
5365253651
if val < 0 or val > 1: # if val < 0 and val > 1:# CHANGED RJH 23MAR18

0 commit comments

Comments
 (0)