Attachment 'NIKA2_Time_Estimator_2023.py'
Download 1 #!/usr/bin/env python
2 ##############################################################################################
3 ### Created by: P. Garcia ###
4 ### Revised by: A. Ritacco ###
5 ### Revised by: B. Ladjelate ###
6 ### Revised by: A. Bongiovanni ###
7 ### Title: NIKA2_Time_Estimator.py ###
8 ### Purpose: Calculation of the total integration time for observing proposals ###
9 ### Creation Date: 2016.JULY.28 ###
10 ### Date of last revision: 2018.JAN.20 ###
11 ### Revision history: ###
12 ### - 2016.JULY.29: comments from C. Kramer & A. Sievers implemented ###
13 ### - 2016.AUG.03 : changed formula to N. Billot expression ###
14 ### - 2017.JAN.29 : - fpix set to 0.75 (commisi. results) ###
15 ### - NEFD0 @ 2 mm set to 15 mJy/sqrt(hz) (commisi. results) ###
16 ### - overhead set as used defined parameter between 1.5 - 2.0 ###
17 ### - 2017.JULY.28: - According to the NIKA2 technical paper submitted on July, 3rd 2017 ###
18 ### - fpix @1mm, 2mm set to 0.84 and 0.90, respectively ###
19 ### - NEFD0 @1mm, 2mm set to 20 and 6 mJy/sqrt(hz), respectively ###
20 ### - FWHM set to 11.2 @1mm and 17.7 @2mm ###
21 ### - 2017.SEPT.28 - An error in the data software led sensitivities too optimistics ###
22 ### - NEFD0 @1mm, 2mm set to 40 and 10 mJy/sqrt(hz), respectively ###
23 ### - 2018.JAN.20: - NEFD0 @1mm, 2mm set to 33 and 8 mJy/sqrt(hz), respectively ###
24 ### - 2019.FEB.18: - Corrected a mistake in the calculation of the mapping speed ###
25 ### - 2020.JUL.22: - Implemented a warning regarding the scan size ###
26 ### - 2023.JUL.28: - NEFDs and valid pixels updated; some warnings added ###
27 ##############################################################################################
28 import numpy as np, sys
29 import math
30 import sys
31 import os
32 os.system("rm -f *.py~")
33
34 #version = 'v 2017.JAN.29'
35 #version = 'v 2017.JULY.28'
36 #version = 'v 2017.SEPT.28'
37 #version = 'v 2018.JAN.20'
38 #version = 'v 2019.FEB.18'
39 #version = 'v 2020.JUL.22'
40 version = 'v 2023.JUL.28'
41
42
43 class bcolors:
44 HEADER = '\033[95m'
45 OKBLUE = '\033[94m'
46 OKGREEN = '\033[92m'
47 WARNING = '\033[93m'
48 FAIL = '\033[91m'
49 ENDC = '\033[0m'
50 BOLD = '\033[1m'
51 UNDERLINE = '\033[4m'
52
53 print ''
54 print bcolors.UNDERLINE + bcolors.HEADER + bcolors.BOLD + 'NIKA2 time estimator '+version+' '+bcolors.ENDC
55 print ''
56 print bcolors.HEADER + bcolors.BOLD + 'To optimize the correction of data instabilities, the size of scans along'
57 print bcolors.HEADER + bcolors.BOLD + 'the scan direction must be at least:'
58 print bcolors.HEADER + bcolors.BOLD + 'NIKA2 FOV (6.5 arcminutes) + 2 * NIKA2 beam width (12 arcseconds at 1mm,'
59 print bcolors.HEADER + bcolors.BOLD + '18 arcseconds at 2mm) + source size above the noise + 2s * scan speed'
60 print ''
61 print bcolors.HEADER + bcolors.BOLD + bcolors.UNDERLINE + 'Please check your source size and your scanning speed to evaluate the'
62 print bcolors.HEADER + bcolors.BOLD + bcolors.UNDERLINE + 'correct map size fitting your needs, as well as the pwv [mm] adopted.' + bcolors.ENDC
63 print ''
64 print bcolors.HEADER + bcolors.BOLD + 'See the "Guidelines for observing time estimates with the NIKA2 continuum camera' + bcolors.ENDC
65 print bcolors.HEADER + bcolors.BOLD + 'at the IRAM-30m Telescope" for details on used parameters and calculations.\n' + bcolors.ENDC
66 print ''
67
68 raw_input('Press Enter to continue with the options given...')
69
70 #user_input = ''
71
72 #while True:
73 # user_input = raw_input('It is assumed that the scan size along the scan direction and the pwv are rightly set. Do you want to continue? (yes/no): ')
74 #
75 # if user_input.lower() == 'yes':
76 # break
77 # elif user_input.lower() == 'no':
78 # print bcolors.HEADER + bcolors.BOLD + 'See the "Guidelines for observing time estimates with the NIKA2 continuum camera' + bcolors.ENDC
79 # print bcolors.HEADER + bcolors.BOLD + 'at the IRAM-30m Telescope" for details on used parameters and calculations.\n' + bcolors.ENDC
80 # exit()
81 # else:
82 # print 'Type yes/no'
83
84 ################################
85 ##### CONVERSION FACTORS #######
86 ################################
87
88 ########## K_cmb ############
89 def b_v_cmb(freq,tcmb):
90 h = 6.626070040*10**(-34) # (J.s) Planck constant
91 k = 1.38064852*10**(-23) # (J/K) Boltzmann constant
92 c = 299792458 # (m/s^2) light speed
93 freq = freq*10**9 # Hz
94 bv = 1.0/(((2*h*freq**3)/((c**2)*(np.e**((h*freq)/(k*tcmb)) - 1)))*(np.e**((h*freq)/(k*tcmb))/(np.e**((h*freq)/(k*tcmb)) - 1))*(h*freq/(k*tcmb**2))) / 10**20
95 return bv
96
97 ########## Ysz ##############
98 def y_sz(freq,tcmb):
99 h = 6.626070040*10**(-34) # (J.s) Planck constant
100 k = 1.38064852*10**(-23) # (J/K) Boltzmann constant
101 c = 299792458 # (m/s^2) light speed
102 freq = freq*10**9 # Hz
103 Ysz = 1.0
104 bv = 1.0/(((2*h*freq**3)/((c**2)*(np.e**((h*freq)/(k*tcmb)) - 1)))*(np.e**((h*freq)/(k*tcmb))/(np.e**((h*freq)/(k*tcmb)) - 1))*(h*freq/(k*tcmb**2)))
105 bv = 1.0/bv
106 y_sz = (bv*tcmb)*(((h*freq/(k*tcmb))*((np.e**((h*freq)/(k*tcmb)) + 1)/(np.e**((h*freq)/(k*tcmb)) -1))) -4)*Ysz /10**(-20)
107 y_sz = 1.0/y_sz
108 return y_sz
109
110 #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
111 #%%%%%%%%%%%%%%%%%%%%% FIXED GENERAL PARAMETERS %%%%%%%%%%%%%%%%%%%%%%
112 #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
113
114 ################################################
115 ##### BEAM SIZES AND CONVERSION TO RADIANS #####
116 ################################################
117 res_band1_spec = 11.1 # From NIKA2 reference paper: Perotto et al. A&A 637, A71 (2020) # [arcsec]
118 res_band2_spec = 17.6 # From NIKA2 reference paper: Perotto et al. A&A 637, A71 (2020) # [arcsec]
119 teta_band1_spec = res_band1_spec*math.pi/180.0/3600.0 # in sr units
120 teta_band2_spec = res_band2_spec*math.pi/180.0/3600.0 # in sr units
121 area_teta_band1_spec = ((teta_band1_spec/2.0)**2)*math.pi # in sr units
122 area_teta_band2_spec = ((teta_band2_spec/2.0)**2)*math.pi # in sr units
123 ############################
124 ##### OTHER PARAMETERS #####
125 ############################
126 fpix_spec_1mm = 0.86 # Changed in 2023 Jul. 31; based on PIIC calibration data
127 fpix_spec_2mm = 0.83 # Changed in 2023 Jul. 31; id.
128 #
129 bv_1 = 0.075 # band1, do not change
130 cv_1 = 0.001 # band1, do not change
131 bv_2 = 0.025 # band2, do not change
132 cv_2 = 0.001 # band2, do not change
133 tiempo = 1.0 # [hours]
134 FoV = 6.5 # [arcmin] diameter
135 FoVArea = ((FoV/2.0)**2)*math.pi # [arcmin^2]
136 narrays1 = 2
137 narrays2 = 1
138 verbose_flag = 0
139 #foverhead = 2.0 # value fixed for all proposals in 2016
140 ##########################################
141 ##### NEFD_0 VALUES FROM OBSERVATIONS #####
142 ##########################################
143 NEFD_band1_spec = 30. # Changed in 2023 Jul. 31; NIKA2 reference paper: Perotto et al. A&A 637, A71 (2020) # [mJy sqrt(s)]
144 NEFD_band2_spec = 9. # Changed in 2023 Jul. 31; id.
145 #######################################
146 ##### SAMPLING ANGULAR VELOCITIES #####
147 #######################################
148 sampl_vel_fast = 48.0 # [arcsec/second]
149 sampl_vel_mid = 24.0 # [arcsec/second]
150 sampl_vel_slow = 12.0 # [arcsec/second]
151 sampl_rate = 23.84 # [hz]
152 sampl_rate_pol = 2*23.84 # [hz]
153 slewing_loss = 1.0 # to account for slewing of single OTF line
154 ##########################################
155 ##########################################
156 ##########################################
157
158 rango = len(sys.argv)
159 for i in range(rango):
160
161 if sys.argv[i] == ("--help") or rango == 1:
162 print ''
163 print 'USAGE:\n'
164 print ' python NIKA2_Time_Estimator_2023.py --help '
165 print ' python NIKA2_Time_Estimator_2023.py --band 1 --rms 2.00 --pwv 2 --elevation 40 --Xsize 6.5 --Ysize 6.5 --filter 1.0 --overhead 1.5'
166 print ' python NIKA2_Time_Estimator_2023.py --band 2 --rms 1.00 --pwv 4 --elevation 50 --Xsize 15 --Ysize 15 --filter 2.0 --overhead 2.0 --verbose '
167 print '\n'
168 print 'OPTIONS:\n'
169 print ' help => This help.'
170 print ' band => Set 1 or 2 for the 1 mm or the 2 mm bands, respectively.'
171 print ' rms => Wanted flux density per beam. Any value above the confusion limit in [mJy/beam].'
172 print ' pwv => Precipitable water vapor in [mm].'
173 print ' elevation => Values from 15 to < 83 [deg].'
174 print ' Xsize Ysize => Map lengths. Xsize and Ysize are in [arcmin]. Minimum map size is 6.5x6.5 [arcmin^2] for homogeneous RMS noise distribution.'
175 print ' filter => Factor for post-processing noise filtering. Values from 1.0 (point-like source) to 2.0 (extended bright emission).'
176 print ' overhead => Factor for telescope overheads between 1.5 and 2.0 (slewing, pointing, focusing, calibration), i.e. all telescope time which is not spend integrating on-source.'
177 print ' verbose => Set to get list of parameters used in the calculations, RMS noise unit conversion, and allowed OTF scan speeds.\n'
178 print ''
179 sys.exit()
180
181 if sys.argv[i] == ("--band"):
182 band = int(sys.argv[i+1])
183 if band == 1:
184 narrays = narrays1
185 mili = 1.2
186 if band == 2:
187 narrays = narrays2
188 mili = 2.0
189 if band < 1 or band > 2:
190 print ' %%%%%%%%%%%%%%%%%%%%%%%'
191 print bcolors.BOLD + bcolors.FAIL +' Band %2i is not defined.' % (band) + bcolors.ENDC
192 print ' %%%%%%%%%%%%%%%%%%%%%%%'
193 print ''
194 sys.exit()
195
196 if sys.argv[i] == ("--rms"):
197 rms = float(sys.argv[i+1])
198
199 if sys.argv[i] == ("--pwv"):
200 pwv = float(sys.argv[i+1])
201
202 if sys.argv[i] == ("--elevation"):
203 elevation = float(sys.argv[i+1])
204 if elevation < 15 or elevation > 83:
205 print ' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
206 print bcolors.BOLD + bcolors.FAIL +' Elevation %3i [degrees] is outside the telescope`s limits: 15 - 83 [degrees].' % (elevation) + bcolors.ENDC
207 print ' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
208 print ''
209 sys.exit()
210
211 if sys.argv[i] == ("--Xsize"):
212 dx = float(sys.argv[i+1])
213
214 if sys.argv[i] == ("--Ysize"):
215 dy = float(sys.argv[i+1])
216
217 if sys.argv[i] == ("--filter"):
218 filtering = float(sys.argv[i+1])
219 if filtering < 1 or filtering > 2:
220 print ' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
221 print bcolors.BOLD + bcolors.FAIL +' Filter value %2.1f is outside the standard limits: 1.0 - 2.0' % (filtering) + bcolors.ENDC
222 print ' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
223 print ''
224 sys.exit()
225
226 if sys.argv[i] == ("--overhead"):
227 foverhead = float(sys.argv[i+1])
228 if foverhead < 1.5 or foverhead > 2:
229 print ' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
230 print bcolors.BOLD + bcolors.FAIL +' Overhead value %2.1f is outside the standard limits: 1.5 - 2.0' % (foverhead) + bcolors.ENDC
231 print ' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
232 print ''
233 sys.exit()
234
235 if sys.argv[i] == ("--verbose"):
236 verbose_flag = 1
237
238 area_obs = dx*dy
239
240 if area_obs < 4.0:
241 print ' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
242 print bcolors.BOLD + bcolors.FAIL +' Introduced map size is %3.1f [arcmin^2]. Minimum value is 4.0 [arcmin^2]' % (area_obs) + bcolors.ENDC
243 print ' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
244 print ''
245 sys.exit()
246
247 ###############################################################################################
248 ### SIGMA ESTIMATION CALCULATION, EFFECTIVE NEFD FROM PWV GIVEN VALUES AND UNITS CONVERSION ###
249 ###############################################################################################
250
251 if band == 1:
252 tau = bv_1*pwv + cv_1
253 NEFD_spec_eff = NEFD_band1_spec*(np.e**(tau/np.sin(elevation*math.pi/180.)))
254 rms_point_MJy_spec = rms/area_teta_band1_spec/10**9
255 rms_point_cmb_spec = rms_point_MJy_spec*b_v_cmb(260,2.726)*10**6
256 rms_point_ys_spec = rms_point_MJy_spec*y_sz(260,2.726)*10**6
257 rms_point_ys_spec = np.abs(rms_point_ys_spec)
258 #########################################
259 ### ratio of areas with fraction of valid pixel in the 2mm band ###
260 #########################################
261 factor_area_spec = (1+(area_obs/(FoVArea*fpix_spec_1mm))) # from N. Billot Doc.
262 ##########################################################
263 ### Integration Time calculations for given conditions ###
264 ##########################################################
265 t_spec = ((NEFD_spec_eff*filtering/rms)**2)*factor_area_spec*(foverhead)/3600.0 #hours
266 s_map_spec = ((FoVArea*fpix_spec_1mm)/(((NEFD_spec_eff*filtering)**2)*foverhead))*3600.0 # arcmin^2 / hour^-1/ mJy^-2
267 if band == 2:
268 tau = bv_2*pwv + cv_2
269 NEFD_spec_eff = NEFD_band2_spec*(np.e**(tau/np.sin(elevation*math.pi/180.)))
270 rms_point_MJy_spec = rms/area_teta_band2_spec/10**9
271 rms_point_cmb_spec = rms_point_MJy_spec*b_v_cmb(150,2.726)*10**6
272 rms_point_ys_spec = rms_point_MJy_spec*y_sz(150,2.726)*10**6
273 rms_point_ys_spec = np.abs(rms_point_ys_spec)
274 #########################################
275 ### ratio of areas with fraction of valid pixel in the 2mm band ###
276 #########################################
277 factor_area_spec = (1+(area_obs/(FoVArea*fpix_spec_2mm))) # from N. Billot Doc.
278 ##########################################################
279 ### Integration Time calculations for given conditions ###
280 ##########################################################
281 t_spec = ((NEFD_spec_eff*filtering/rms)**2)*factor_area_spec*(foverhead)/3600.0 #hours
282 s_map_spec = ((FoVArea*fpix_spec_2mm)/(((NEFD_spec_eff*filtering)**2)*foverhead))*3600.0 # arcmin^2 / hour^-1/ mJy^-2
283
284 #########################################
285 #### TIME PER OTF LINE TO REACH TOTAL ###
286 #########################################
287
288 T_SLOW = slewing_loss*((dx*60.0)/sampl_vel_slow)/60.0 # [minutes]
289 T_MID = slewing_loss*((dx*60.0)/sampl_vel_mid)/60.0 # [minutes]
290 T_FAST = slewing_loss*((dx*60.0)/sampl_vel_fast)/60.0 # [minutes]
291
292 if verbose_flag == 1:
293
294 print ''
295 print '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
296 print '%%%%%%%%%% General Parameters Used for the Calculations %%%%%%%%%%%'
297 print '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
298 print ''
299 print '------------------------------------------------------------------------'
300 print '| Parameters | Band 1 (1.2 mm) | Band 2 (2.0 mm) |'
301 print '------------------------------------------------------------------------'
302 print '| opacity | %6.3fxpwv + %6.3f | %6.3fxpwv + %6.3f |' % (bv_1,cv_1,bv_2,cv_2)
303 print '------------------------------------------------------------------------'
304 print '| HPBW [arcsec] | %6.1f | %6.1f |' % (res_band1_spec,res_band2_spec)
305 print '------------------------------------------------------------------------'
306 print '| NEFDo [mJy.s^0.5] | %6.1f | %6.1f |' % (NEFD_band1_spec,NEFD_band2_spec)
307 print '------------------------------------------------------------------------'
308 print '| fpix | %6.2f | %6.2f |' % (fpix_spec_1mm, fpix_spec_2mm)
309 print '------------------------------------------------------------------------'
310 if band == 1:
311 print '| rms [mJy/beam] | %6.2f | |' % (rms)
312 if band == 2:
313 print '| rms [mJy/beam] | | %6.2f |' % (rms)
314 print '------------------------------------------------------------------------'
315 print '| FoV [arcmin] | %6.1f |' % (FoV)
316 print '------------------------------------------------------------------------'
317 print '| h-filtering | %6.2f |' % (filtering)
318 print '------------------------------------------------------------------------'
319 print '| h-overhead | %6.2f |' % (foverhead)
320 print '------------------------------------------------------------------------'
321 print '| OTF slow [arcsec/s] | %4i |' % (sampl_vel_slow)
322 print '------------------------------------------------------------------------'
323 print '| OTF mid [arcsec/s] | %4i |' % (sampl_vel_mid)
324 print '------------------------------------------------------------------------'
325 print '| OTF fast [arcsec/s] | %4i |' % (sampl_vel_fast)
326 print '------------------------------------------------------------------------'
327 print '| Dump [hz] | %6.2f |' % (sampl_rate)
328 print '------------------------------------------------------------------------'
329 print '| Dump POL [hz] | %6.2f |' % (sampl_rate_pol)
330 print '------------------------------------------------------------------------'
331 print ''
332
333 print ' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
334 print ' %%%%%%%%%%%%%%%%% Units Conversion %%%%%%%%%%%%%%%%%'
335 print ' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
336 print ''
337 print ' --------------------------------------------------------'
338 print ' | (User Defined) | Band %1i |' % (band)
339 print ' --------------------------------------------------------'
340 print ' |rms [mJy/beam] | %8.2f |' % (rms)
341 print ' --------------------------------------------------------'
342 print ' |rms point-like source [MJy/sr] | %6.2f |' % (rms_point_MJy_spec)
343 print ' |rms point-like source [K_CMB]x10^-6 | %5i |' % (rms_point_cmb_spec)
344 print ' |*rms point.like source [Ysz]x10^-6 | %5i |' % (rms_point_ys_spec)
345 print ' --------------------------------------------------------'
346 print ' |* for Ysz = 1.0 |'
347 print ' --------------------------------------------------------'
348 print ''
349
350
351 #############################
352 #### TABLE FINAL RESULTS ####
353 #############################
354
355 print ' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
356 print ' %%%%%%%%%%%%%%%%%%%%%% Results %%%%%%%%%%%%%%%%%%%%%%'
357 print ' %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
358 print ''
359 print ' for: El = %2i (deg), PWV = %1i (mm), tau = %4.2f, rms = %6.2f' % (elevation,pwv,tau,rms)
360 print ' Area = %4.1f (arcmin^2), Filter = %4.1f, Overhead = %4.1f' % (area_obs,filtering,foverhead)
361 print ' ---------------------------------------------------------------'
362 print ' | (User Defined) | | |'
363 print ' ---------------------------------------------------------------'
364 print ' | Band | | %1i |' % (band)
365 print ' ---------------------------------------------------------------'
366 if band == 1:
367 print ' | Total Integration Time at 1mm | [hours] | %6.1f |' % (t_spec)
368 print ' ---------------------------------------------------------------'
369 print ' | Mapping speed | [arcmin^-2/hour/mJy^-2 ] | %6.1f |' % (s_map_spec)
370 if band == 2:
371 print ' | Total Integration Time at 2mm | [hours] | %6.1f |' % (t_spec)
372 print ' ---------------------------------------------------------------'
373 print ' | Mapping speed | [arcmin^-2/hour/mJy^-2 ] | %6.1f |' % (s_map_spec)
374 print ' ---------------------------------------------------------------'
375 print ' '
376
377 if verbose_flag == 1:
378
379 print bcolors.WARNING + ' WARNING 1: For proposed maps taking longer than 40 minutes, the total'
380 print bcolors.WARNING + ' integration time should be split into several maps.\n' + bcolors.ENDC
381 print ' '
382 print bcolors.WARNING + ' WARNING 2: Note that the confusion noise is not included in this Time'
383 print bcolors.WARNING + ' Estimator and it should be discussed in the proposal whether appro-'
384 print bcolors.WARNING + ' priate. The RMS noise does not decrease indefinitely with integra- '
385 print bcolors.WARNING + ' tion time but stops at the confusion limit caused by unresolved sour-'
386 print bcolors.WARNING + ' ces within the beam. The exact threshold at which the RMS noise '
387 print bcolors.WARNING + ' reaches the confusion limit will vary with wavelength, beam size, '
388 print bcolors.WARNING + ' and the type of astronomical source (Galactic or Extra-Galactic). For'
389 print bcolors.WARNING + ' instance, for the GOODS-N field (part of the Deep Field GT Proposal),'
390 print bcolors.WARNING + ' a preliminary 1 sigma confusion limit around ~ 0.090 mJy and ~ 0.056'
391 print bcolors.WARNING + ' mJy at 1.2 mm and 2.0 mm, respectively, has been estimated (A. Beelen,'
392 print bcolors.WARNING + ' private communication).\n' + bcolors.ENDC
393
394 print ' '
395 print ' Time per OTF line for allowed scanning speeds '
396 print ' -----------------------------------------------------'
397 print ' | | OTF Scan Velocity | TIME PER OTF LINE |'
398 print ' -----------------------------------------------------'
399 print ' | | [arcsec/s] | [minutes] |'
400 print ' -----------------------------------------------------'
401 print ' | OTF-SLOW | %6.1f | %6.2f |' % (sampl_vel_slow,T_SLOW)
402 print ' | OTF-MID | %6.1f | %6.2f |' % (sampl_vel_mid,T_MID)
403 print ' | OTF-FAST | %6.1f | %6.2f |' % (sampl_vel_fast,T_FAST)
404 print ' -----------------------------------------------------'
405 print ' '
406
407 ###############################
408 #### CONVERSION TO MINUTES ####
409 ###############################
410
411 if t_spec >= 1.:
412 time_str_spec=str(round(t_spec,1))+' hours'
413
414 if t_spec < 1. and t_spec >= 1./60.:
415 time_str_spec=str(round(t_spec*60,1))+' minutes'
416
417 if t_spec < 1./60. and t_spec >= 0.1/3600.:
418 time_str_spec=str(int(t_spec*3600))+' seconds'
419
420 if t_spec < 0.1/3600.:
421 time_str_spec='0.1 (seconds)'
422
423 slew_overhe = str(int((slewing_loss-1.0)*100.0))
424
425 ##############################
426 #### OUTPUT FINAL RESULTS ####
427 ##############################
428
429 print ''
430 print bcolors.HEADER + '***********************************************'
431 print '*** Total Integration Time => ' + time_str_spec + ' ***'
432 print '***********************************************\n'
433 print ''
434
435 print bcolors.HEADER + bcolors.UNDERLINE + 'Please include the following text into your proposal:\n' + bcolors.ENDC
436
437 print 'According to the NIKA2 time estimator (2023), the total observing time using the NIKA2 '+str(band)+' mm band to map a region of '+str(round(area_obs,1))+' [arcmin^2] to reach an rms of '+str(rms)+' [mJy/beam], assuming '+str(pwv)+' [mm] pwv, '+str(elevation)+' [deg] elevation, Filter = '+str(filtering)+', Overhead = '+str(foverhead)+', was estimated to be *'+time_str_spec+'*, using the time estimator '+version+'.\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.