From a3521a2426f58992eca801567d974aa3539c6c5d Mon Sep 17 00:00:00 2001 From: yosata Date: Sun, 15 Nov 2020 18:04:39 +0100 Subject: [PATCH] Small bugfixes in refractionModels.py --- AstroAtmosphere/refractionModels.py | 8 ++++---- README.md | 2 +- setup.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/AstroAtmosphere/refractionModels.py b/AstroAtmosphere/refractionModels.py index d07a7b5..5c9a94b 100644 --- a/AstroAtmosphere/refractionModels.py +++ b/AstroAtmosphere/refractionModels.py @@ -391,7 +391,7 @@ class refraction(Observatory): R : float Atmospheric refraction in degrees ''' - _R = np.arcsin(n * np.sin( np.deg2rad(zenith) )) - np.deg2rad(zenith) + _R = np.arcsin(n1 * np.sin( np.deg2rad(zenith) )) - np.deg2rad(zenith) return np.degrees(_R) @@ -430,7 +430,7 @@ class refraction(Observatory): Parameters ---------- n1 : float - Refractive index at the wavelength of interest + Refractive index at the wavelength of interest at the observer zenith : float Angle of observation in degrees. zenith = 0 means the observation is directly overhead. @@ -469,10 +469,10 @@ class refraction(Observatory): _R = R0 + _h * 1000 # Gladstone-Dale relation between refractive index and density - _n_h = 1 + (n0 - 1) / _Dens[0] * _Dens + _n_h = 1 + (n1 - 1) / _Dens[0] * _Dens # Calculation of the zenith angle for given height and refractive index, from the refractive invariant - _z = np.arcsin( (n0 * R0) / (_n_h * _R) * np.sin(zenith) ) + _z = np.arcsin( (n1 * R0) / (_n_h * _R) * np.sin(zenith) ) # Calculation of log space derivative of n and r _lnn = np.log(_n_h) diff --git a/README.md b/README.md index 50dbc32..34bb7eb 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ rho = at.rho(p=101325, T=273.15, RH=0.2, xc=300) # Initializing refraction model and setting the reduced height ref = refraction(lat=30, h=2200) -ref.setReducedHeight(p=101325, rho) +ref.setReducedHeight(p=101325, rho=rho) # Calculating the atmospheric refraction atm_ref = ref.cassini(n, zenith=30) diff --git a/setup.py b/setup.py index 17f2dfd..ff829bf 100644 --- a/setup.py +++ b/setup.py @@ -21,14 +21,14 @@ def setup_package(): # write_version_py() setup(name='AstroAtmosphere', - version='1.3', + version='1.3.1', description='Collection of equations for refractive index, refraction and dispersion calculations of atmospheric air.', long_description=__readme__, long_description_content_type='text/markdown', author='Joost van den Born', author_email='born@astron.nl', url='https://gitlab.astro-wise.org/micado/atmosphericmodel', - download_url='https://gitlab.astro-wise.org/micado/atmosphericmodel/-/archive/v1.3/atmosphericmodel-v1.3.tar.gz', + download_url='https://gitlab.astro-wise.org/micado/atmosphericmodel/-/archive/v1.3.1/atmosphericmodel-v1.3.1.tar.gz', license='GNU General Public License v3', data_files = [('',['LICENSE.txt'])], package_dir={'AstroAtmosphere': 'AstroAtmosphere'},