mirror of
https://gitlab.astro-wise.org/micado/atmosphericmodel.git
synced 2026-10-29 20:51:05 +00:00
7.3 KiB
7.3 KiB
In [1]:
#!/usr/bin/env Python
import numpy as np
import matplotlib.pyplot as plt
from AstroAtmosphere import *
# Parameters at Cerro Armazones
T = 279.65 # k
P = 71200 # Pa
H = 0.22
xc = 450 # ppm
lat = -24.5983 # degrees
h = 3064 # m
l1 = 1.49 # micron
l2 = 1.78 # micron
# Initializing dispersion model
at = Observatory()
# Calculating indices of refraction for l1 and l2
n1 = at.n_tph(l=l1, T=T, p=P, RH=H, xc=xc)
n2 = at.n_tph(l=l2, T=T, p=P, RH=H, xc=xc)
In [2]:
# Density of the atmosphere (following CIPM-81/91 equations)
rho = at.rho(p=P, T=T, RH=H, xc=xc)
# Initializing refraction model and setting the reduced height
ref = refraction(lat, h)
ref.setReducedHeight(P, rho)In [3]:
zenith_obs = 45
refraction_obs = ref.cassini(n1, zenith_obs) * 3.6e3
print ('The refraction is %.03f arc seconds' %(refraction_obs))The refraction is 40.697 arc seconds
In [4]:
# Calculating the uncertainty in the refractive index
n1 = at.n_tph(l=l1, T=T, p=P, RH=H, xc=xc)
dn1 = at.dn_tph(l1, T, P, H, xc, dl=0.001, dT=0.2, dP=30, dRH=0.03, dCO2=25)
# Calculating the uncertainty in the atmospheric refraction
refError = ref.cassiniError(n1, dn1, zenith_obs, dz=1/3600)*3.6e3
print ('The refraction is: %.3f +/- %.3f arc seconds' %(refraction_obs, refError))The refraction is: 40.697 +/- 0.035 arc seconds
In [5]:
# Initializing dispersion object
disp = dispersion(lat, h)
disp.setReducedHeight(P, rho)
dispersion_obs = disp.cassini(n1, n2, zenith_obs)*3.6e6
# Calculating the uncertainty in the atmospheric dispersion
dispersion_unc = disp.cassiniError(zenith_obs, l1, l2, T, P, H, xc,
dl1=0.001, dl2=0.001, dT=0.2, dP=30, dRH=0.03, dCO2=25, dz=1/3600) * 3.6e6
print ('The dispersion is %.03f +/- %.03f milli arc seconds' %(dispersion_obs, dispersion_unc))The dispersion is 31.019 +/- 0.164 milli arc seconds
In [6]:
# Quick refractive index
nq = quick_refractive_index(l=1.49, conditions='STANDARD')
print('Quick refractive index: {}'.format(nq))
# Quick refraction
rq = quick_refraction(l1, zenith_obs, conditions='CERRO_ARMAZONES') * 3.6e3
print('Quick refraction: {:.3f} arcsec'.format(rq))
# Quick dispersion
dq = quick_dispersion(l1, l2, zenith_obs, conditions='CERRO_ARMAZONES') * 3.6e6
print('Quick dispersion: {:.3f} mas'.format(dq))
Quick refractive index: 1.0002733131243147 Quick refraction: 40.697 arcsec Quick dispersion: 31.019 mas