Last active
October 27, 2015 02:07
-
-
Save jmccormac01/1efda12589e0e6478a96 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as pl | |
| %matplotlib inline | |
| # pressure correction | |
| P=np.array([76]) #kPa | |
| T=np.array([0.,10.,20.,30.]) # degC | |
| pcor=(P[0]/101.)*(283./(273+T)) | |
| pix_scale=4.96 | |
| pix_per_arcmin=60./pix_scale | |
| dalt=2.8 | |
| alt=np.linspace(30,90,61)[::-1] | |
| dR=np.empty(len(alt)) | |
| for i in range(0,len(alt)): | |
| R1=1./np.tan(np.radians(alt[i]+(7.31/(alt[i]+4.4)))) | |
| R2=1./np.tan(np.radians(alt[i]-dalt+(7.31/(alt[i]-dalt+4.4)))) | |
| dR[i]=(R1-R2)*pix_per_arcmin | |
| pl.figure(1,figsize=(10,5)) | |
| pl.plot(alt,dR*pcor[0],'r-') | |
| pl.plot(alt,dR*pcor[1],'g-') | |
| pl.plot(alt,dR*pcor[2],'b-') | |
| pl.plot(alt,dR*pcor[3],'k-') | |
| pl.title('Differential Refraction Across NGTS FOV [%d kPa]' % (P[0])) | |
| pl.xlabel('Altitude of Highest Point (deg)') | |
| pl.ylabel('Differential Refraction (pix)') | |
| pl.legend(('T= 0 C','T=10 C','T=20 C','T=30 C'),loc='upper left') | |
| pl.xlim(25,90) | |
| pl.ylim(-2.5,0) | |
| pl.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment