Attachment 'time-estimator-IRAM30m-nika-gismo.py'
Download 1 import numpy as np, sys
2 #
3 print '\n time-estimator-IRAM30m-nika-gismo v 2014.03.28'
4 print '\n Based on the Billot et al. (2014) time estimator guide. \n'
5 #
6 if len(sys.argv) != 17:
7 print ' USAGE:\n'
8 print ' python time-estimator-IRAM30m-nika-gismo.py --camera "GISMO" --rms 0.5 --pwv 2 --elevation 30 --Xsize 4 --Ysize 6 --filtering 1.2 --overheads 2.0'
9 print '\n'
10 print ' OPTIONS:\n'
11 print ' camera => IRAM 30m continuum camera. Options are GISMO, NIKA1mm, NIKA2mm.'
12 print ' rms => Any value above the confussion limit.'
13 print ' pwv => Precipitable water vapor. Possible values 2, 4, and 7 mm.'
14 print ' elevation => Values from 20 to 83 degrees.'
15 print ' Xsize Ysize => Mapping area. Xsize and Ysize must be equal (point sources) or larger than the Field of View.'
16 print ' filtering => Data filtering scheme. Values from 1 to 4.'
17 print ' overheads => Telescope/observing overheads (calibration, pointing, focus). Values from 1.6 to 2.6.\n'
18 sys.exit()
19 #
20 #
21 for i in range(8):
22 #
23 if sys.argv[i*2+1] == ("--camera"):
24 camera = sys.argv[i*2+2]
25 #
26 if sys.argv[i*2+1] == ("--rms"):
27 rms = float(sys.argv[i*2+2])
28 #
29 if sys.argv[i*2+1] == ("--pwv"):
30 if float(sys.argv[i*2+2]) < 3:
31 pwv=2
32 if 3 <= float(sys.argv[i*2+2]) < 5.5:
33 pwv=4
34 if float(sys.argv[i*2+2]) >= 5.5:
35 pwv=7
36 #
37 if sys.argv[i*2+1] == ("--elevation"):
38 elevation = float(sys.argv[i*2+2])
39 #
40 if sys.argv[i*2+1] == ("--Xsize"):
41 Xsize = float(sys.argv[i*2+2])
42 #
43 if sys.argv[i*2+1] == ("--Ysize"):
44 Ysize = float(sys.argv[i*2+2])
45 #
46 if sys.argv[i*2+1] == ("--overheads"):
47 overheads = float(sys.argv[i*2+2])
48 #
49 if sys.argv[i*2+1] == ("--filtering"):
50 filtering = float(sys.argv[i*2+2])
51 #
52 #
53 #
54 if camera == 'GISMO':
55 #
56 Np=100. #Number of pixels
57 Sp=13.75 #Pixel size (in arcsec)
58 HPBW=16.7 #Half-power beamwidth (in arcsec)
59 Wavelength=1200. #Central wavelength in microns
60 NEFD=14. #Noise ==uivalent flux density
61 #
62 if pwv == 2:
63 tau=0.06
64 if pwv == 4:
65 tau=0.11
66 if pwv == 7:
67 tau=0.19
68 #
69 if Xsize <= 1.:
70 Xsize=1.8
71 Xpoint=1
72 else:
73 Xpoint=0
74 #
75 if Ysize <= 1.8:
76 Ysize=3.7
77 Ypoint=1
78 else:
79 Ypoint=0
80 #
81 #
82 #
83 if camera == 'NIKA1mm':
84 #
85 Np=136. #Number of pixels
86 Sp=6.8 #Pixel size (in arcsec)
87 HPBW=12. #Half-power beamwidth (in arcsec)
88 Wavelength=1250. #Central wavelength in microns
89 NEFD=35. #Noise equivalent flux density
90 #
91 if pwv == 2:
92 tau=0.22
93 if pwv == 4:
94 tau=0.36
95 if pwv == 7:
96 tau=0.57
97 #
98 if Xsize <= 1.:
99 Xsize=1.8
100 Xpoint=1
101 else:
102 Xpoint=0
103 #
104 if Ysize <= 1.:
105 Ysize=1.8
106 Ypoint=1
107 else:
108 Ypoint=0
109 #
110 #
111 #
112 if camera == 'NIKA2mm':
113 #
114 Np=114. #Number of pixels
115 Sp=9.6 #Pixel size (in arcsec)
116 HPBW=17.5 #Half-power beamwidth (in arcsec)
117 Wavelength=2000. #Central wavelength in microns
118 NEFD=14. #Noise equivalent flux density
119 #
120 if pwv == 2:
121 tau=0.06
122 if pwv == 4:
123 tau=0.11
124 if pwv == 7:
125 tau=0.19
126 #
127 if Xsize <= 1.0:
128 Xsize=2.0
129 Xpoint=1
130 else:
131 Xpoint=0
132 #
133 if Ysize <= 1.0:
134 Ysize=2.0
135 Ypoint=1
136 else:
137 Ypoint=0
138 #
139 #
140 transmission = np.e**(-tau/np.sin(elevation*np.pi/180.))
141 #
142 if Xpoint+Ypoint != 2:
143 time=(NEFD*filtering/transmission/rms)**2*(1.+Xsize*60.*Ysize*60./Np/Sp**2)*overheads/3600.
144 print ' camera => ', camera
145 print ' rms => ', rms, ' mJy/beam'
146 print ' pwv => ', pwv, ' mm'
147 print ' elevation => ', elevation, ' deg'
148 print ' Xsize Ysize => ', Xsize, Ysize, ' arcmin'
149 print ' overheads => ', overheads
150 print ' filtering => ', filtering
151 print ' '
152 else:
153 time=(NEFD*filtering/transmission/rms)**2*overheads/3600.
154 print ' camera => ', camera
155 print ' rms => ', rms, ' mJy/beam'
156 print ' pwv => ', pwv, ' mm'
157 print ' elevation => ', elevation, ' deg'
158 print ' Xsize Ysize => ', 'Point source'
159 print ' overheads => ', overheads
160 print ' filtering => ', filtering
161 print ' '
162 #
163 if time >= 1.:
164 time_str=str(round(time,1))+' hours'
165 #
166 if time <= 1. and time >= 1./60.:
167 time_str=str(round(time*60,1))+' minutes'
168 #
169 if time <= 1./60. and time >= 0.1/3600.:
170 time_str=str(round(time*3600,1))+' seconds'
171 #
172 if time <= 0.1/3600.:
173 time_str='0.1 seconds'
174 #
175 print ' time => '+time_str+' \n'
176 #
177 print 'Please include the following text into your proposal:\n'
178 #
179 print 'The total observing time using '+camera+' to map a region of '+str(Xsize)+'x'+str(Ysize)+' arcminutes to reach an rms of '+str(rms)+' mJy/beam, assuming '+str(pwv)+' mm pwv, '+str(elevation)+' deg elevation, Ffilter='+str(filtering)+', Foverhead='+str(overheads)+', was estimated to be *'+time_str+'*, using the time estimator v 2014.03.27. \n '
Attached Files
To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.You are not allowed to attach a file to this page.