4 Commits
3 changed files with 11 additions and 10 deletions

No files matched your search

+4 -4
View File
@@ -391,7 +391,7 @@ class refraction(Observatory):
R : float R : float
Atmospheric refraction in degrees 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) return np.degrees(_R)
@@ -430,7 +430,7 @@ class refraction(Observatory):
Parameters Parameters
---------- ----------
n1 : float n1 : float
Refractive index at the wavelength of interest Refractive index at the wavelength of interest at the observer
zenith : float zenith : float
Angle of observation in degrees. Angle of observation in degrees.
zenith = 0 means the observation is directly overhead. zenith = 0 means the observation is directly overhead.
@@ -469,10 +469,10 @@ class refraction(Observatory):
_R = R0 + _h * 1000 _R = R0 + _h * 1000
# Gladstone-Dale relation between refractive index and density # 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 # 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 # Calculation of log space derivative of n and r
_lnn = np.log(_n_h) _lnn = np.log(_n_h)
+5 -4
View File
@@ -60,10 +60,11 @@ The package contains the following files:
- `/data/1976USSA.txt` : Data file of the 1976 US Standard Atmosphere. - `/data/1976USSA.txt` : Data file of the 1976 US Standard Atmosphere.
- `ciddorModel.py` : Contains the `Observatory()` class to calculate the refractive index of atmospheric air, using the Ciddor (1996) model. - `ciddorModel.py` : Contains the `Observatory()` class to calculate the refractive index of atmospheric air, using the Ciddor (1996) model.
- `dispersionModels.py` : Contains various atmospheric models that can be used to calculate the atmospheric dispersion - `dispersionModels.py` : Contains various atmospheric models that can be used to calculate the atmospheric dispersion
- `misc.py` : Contains several miscellaneous functions, e.g. to quickly calculate the refractive index. - `misc.py` : Contains several miscellaneous functions, e.g. to quickly calculate the refractive index.
- `refractionModels.py` : Contains various atmospheric models that can be used to calculate the atmospheric refraction - `neoslalib.py` : Contains a Python native port of the `pyslalib.SLA_REFRO()` routine, translated from the original FORTRAN code.
- `observatories.py` : Contains a dictionary with the average atmospheric conditions for various large observatories around the world.
- `refractionModels.py` : Contains various atmospheric models that can be used to calculate the atmospheric refraction
- `refractivityModels.py` : Contains various functions from literature to calculate the refractive index. Some examples of works included are Ciddor (1996), Barrell & Sears (1939), SLALIB, Owens (1967) and Edlen (1966). - `refractivityModels.py` : Contains various functions from literature to calculate the refractive index. Some examples of works included are Ciddor (1996), Barrell & Sears (1939), SLALIB, Owens (1967) and Edlen (1966).
- `observatories` : Contains a dictionary with the average atmospheric conditions for various large observatories around the world.
@@ -120,7 +121,7 @@ rho = at.rho(p=101325, T=273.15, RH=0.2, xc=300)
# Initializing refraction model and setting the reduced height # Initializing refraction model and setting the reduced height
ref = refraction(lat=30, h=2200) ref = refraction(lat=30, h=2200)
ref.setReducedHeight(p=101325, rho) ref.setReducedHeight(p=101325, rho=rho)
# Calculating the atmospheric refraction # Calculating the atmospheric refraction
atm_ref = ref.cassini(n, zenith=30) atm_ref = ref.cassini(n, zenith=30)
+2 -2
View File
@@ -21,14 +21,14 @@ def setup_package():
# write_version_py() # write_version_py()
setup(name='AstroAtmosphere', setup(name='AstroAtmosphere',
version='1.3', version='1.3.1',
description='Collection of equations for refractive index, refraction and dispersion calculations of atmospheric air.', description='Collection of equations for refractive index, refraction and dispersion calculations of atmospheric air.',
long_description=__readme__, long_description=__readme__,
long_description_content_type='text/markdown', long_description_content_type='text/markdown',
author='Joost van den Born', author='Joost van den Born',
author_email='born@astron.nl', author_email='born@astron.nl',
url='https://gitlab.astro-wise.org/micado/atmosphericmodel', 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', license='GNU General Public License v3',
data_files = [('',['LICENSE.txt'])], data_files = [('',['LICENSE.txt'])],
package_dir={'AstroAtmosphere': 'AstroAtmosphere'}, package_dir={'AstroAtmosphere': 'AstroAtmosphere'},