From 835ff586ab55d65f8d884d2f6c95890fa2ad73b0 Mon Sep 17 00:00:00 2001 From: yosata Date: Thu, 28 May 2020 11:30:37 +0200 Subject: [PATCH] Small bugfix in CO2 implementation of Ciddor function --- AstroAtmosphere/refractivityModels.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/AstroAtmosphere/refractivityModels.py b/AstroAtmosphere/refractivityModels.py index 1bcb1d9..1c58f2c 100644 --- a/AstroAtmosphere/refractivityModels.py +++ b/AstroAtmosphere/refractivityModels.py @@ -32,10 +32,10 @@ def BarrellAndSears(l, T=288.15, p=101325, H=0): n = R/1e6 + 1 return n -def Ciddor(l): +def Ciddor(l, CO2=450): ''' From Ciddor, 1996 - Equations 1 + Equations 1 and 2 At default conditions only. For more flexibility use Observatory.n_tph() @@ -47,6 +47,8 @@ def Ciddor(l): ''' s = 1 / l R = 5792105 / (238.0185 - s**2) + 167917 / (57.362 - s**2) + if CO2 != 450: + R = R * (1 + 0.534e-6 * (CO2 - 450)) n = R/1e8 + 1 return n