Commit a4f4e0f1c1c4099514682d1293c58fc043e8776b
1 parent
9f2207a8
Optionally restrict GPS and EGAL surveys to south array only
Showing
1 changed file
with
38 additions
and
16 deletions
examples/make_pointings.py
| ... | ... | @@ -139,7 +139,7 @@ def set_tmin_for_next_pointing(tmin, duration): |
| 139 | 139 | # ====================== # |
| 140 | 140 | def set_patch(tmin, lmin=-30.0, lmax=30.0, bmin=-1.5, bmax=+1.5, |
| 141 | 141 | separation=3.0, hours=100.0, run_duration=30.0, |
| 142 | - site=None, caldb='prod2', lst=True, autodec=0.0): | |
| 142 | + site=None, caldb='prod2', lst=True, autodec=0.0, north=True): | |
| 143 | 143 | """ |
| 144 | 144 | Setup pointing patch on the sky |
| 145 | 145 | |
| ... | ... | @@ -167,6 +167,8 @@ def set_patch(tmin, lmin=-30.0, lmax=30.0, bmin=-1.5, bmax=+1.5, |
| 167 | 167 | Use LSTs |
| 168 | 168 | autodec : float, optional |
| 169 | 169 | Declination for switching automatically between South and North site |
| 170 | + north : bool, optional | |
| 171 | + Also use North array | |
| 170 | 172 | |
| 171 | 173 | Returns |
| 172 | 174 | ------- |
| ... | ... | @@ -229,6 +231,11 @@ def set_patch(tmin, lmin=-30.0, lmax=30.0, bmin=-1.5, bmax=+1.5, |
| 229 | 231 | else: |
| 230 | 232 | obs_site = site |
| 231 | 233 | |
| 234 | + # Fall through if array is North array and North array should | |
| 235 | + # not be used | |
| 236 | + if not north and obs_site == 'North': | |
| 237 | + continue | |
| 238 | + | |
| 232 | 239 | # Set IRF |
| 233 | 240 | irf = set_irf(obs_site, obs, caldb, lst=lst) |
| 234 | 241 | |
| ... | ... | @@ -324,7 +331,8 @@ def set_irf(site, obs, caldb, lst=True): |
| 324 | 331 | # =========================== # |
| 325 | 332 | # Setup Galactic plane survey # |
| 326 | 333 | # =========================== # |
| 327 | -def set_gps(separation=3.0, bmin=-1.3, bmax=1.3, caldb='prod2', lst=True): | |
| 334 | +def set_gps(separation=3.0, bmin=-1.3, bmax=1.3, caldb='prod2', lst=True, | |
| 335 | + north=True): | |
| 328 | 336 | """ |
| 329 | 337 | Setup Galactic plane survey |
| 330 | 338 | |
| ... | ... | @@ -340,6 +348,8 @@ def set_gps(separation=3.0, bmin=-1.3, bmax=1.3, caldb='prod2', lst=True): |
| 340 | 348 | Calibration database name |
| 341 | 349 | lst : bool, optional |
| 342 | 350 | Use LSTs |
| 351 | + north : bool, optional | |
| 352 | + Also use North array | |
| 343 | 353 | |
| 344 | 354 | Returns |
| 345 | 355 | ------- |
| ... | ... | @@ -373,21 +383,25 @@ def set_gps(separation=3.0, bmin=-1.3, bmax=1.3, caldb='prod2', lst=True): |
| 373 | 383 | separation=separation, hours=60, |
| 374 | 384 | site='South', caldb=caldb, lst=lst)) |
| 375 | 385 | |
| 376 | - # Initialise start time | |
| 377 | - tmin = 7671.0 * 86400.0 | |
| 386 | + # Also use North array | |
| 387 | + if north: | |
| 378 | 388 | |
| 379 | - # Add Cygnus, Perseus | |
| 380 | - obsdef.extend(set_patch(tmin, lmin=60.0, lmax=150.0, bmin=bmin, bmax=bmax, | |
| 381 | - separation=separation, hours=450, | |
| 382 | - site='North', caldb=caldb, lst=lst)) | |
| 389 | + # Initialise start time | |
| 390 | + tmin = 7671.0 * 86400.0 | |
| 383 | 391 | |
| 384 | - # Update start time | |
| 385 | - tmin = set_tmin_for_next_pointing(obsdef[-1]['tmin'], obsdef[-1]['duration']) | |
| 392 | + # Add Cygnus, Perseus | |
| 393 | + obsdef.extend(set_patch(tmin, lmin=60.0, lmax=150.0, | |
| 394 | + bmin=bmin, bmax=bmax, separation=separation, | |
| 395 | + hours=450, site='North', caldb=caldb, lst=lst)) | |
| 386 | 396 | |
| 387 | - # Add Anticentre | |
| 388 | - obsdef.extend(set_patch(tmin, lmin=150.0, lmax=210.0, bmin=bmin, bmax=bmax, | |
| 389 | - separation=separation, hours=150, | |
| 390 | - site='North', caldb=caldb, lst=lst)) | |
| 397 | + # Update start time | |
| 398 | + tmin = set_tmin_for_next_pointing(obsdef[-1]['tmin'], | |
| 399 | + obsdef[-1]['duration']) | |
| 400 | + | |
| 401 | + # Add Anticentre | |
| 402 | + obsdef.extend(set_patch(tmin, lmin=150.0, lmax=210.0, | |
| 403 | + bmin=bmin, bmax=bmax, separation=separation, | |
| 404 | + hours=150, site='North', caldb=caldb, lst=lst)) | |
| 391 | 405 | |
| 392 | 406 | # Return observation definition |
| 393 | 407 | return obsdef |
| ... | ... | @@ -396,7 +410,7 @@ def set_gps(separation=3.0, bmin=-1.3, bmax=1.3, caldb='prod2', lst=True): |
| 396 | 410 | # ========================== # |
| 397 | 411 | # Setup Extragalactic survey # |
| 398 | 412 | # ========================== # |
| 399 | -def set_egal(separation=3.0, caldb='prod2', lst=True): | |
| 413 | +def set_egal(separation=3.0, caldb='prod2', lst=True, north=True): | |
| 400 | 414 | """ |
| 401 | 415 | Setup Extragalactic survey. |
| 402 | 416 | |
| ... | ... | @@ -408,6 +422,8 @@ def set_egal(separation=3.0, caldb='prod2', lst=True): |
| 408 | 422 | Calibration database name |
| 409 | 423 | lst : bool, optional |
| 410 | 424 | Use LSTs |
| 425 | + north : bool, optional | |
| 426 | + Also use North array | |
| 411 | 427 | |
| 412 | 428 | Returns |
| 413 | 429 | ------- |
| ... | ... | @@ -424,7 +440,7 @@ def set_egal(separation=3.0, caldb='prod2', lst=True): |
| 424 | 440 | obsdef.extend(set_patch(tmin, lmin=-90.0, lmax=90.0, bmin=+5.0, bmax=+88.0, |
| 425 | 441 | separation=separation, hours=500, run_duration=25, |
| 426 | 442 | site='Automatic', caldb=caldb, lst=lst, |
| 427 | - autodec=-10.0)) | |
| 443 | + autodec=-10.0, north=north)) | |
| 428 | 444 | |
| 429 | 445 | # Return observation definition |
| 430 | 446 | return obsdef |
| ... | ... | @@ -639,6 +655,9 @@ def make_pointings(): |
| 639 | 655 | if obsname == 'gps': |
| 640 | 656 | obsdef = set_gps(caldb=caldb, lst=lst) |
| 641 | 657 | write_obsdef('gps.dat', obsdef) |
| 658 | + elif obsname == 'gps_south': | |
| 659 | + obsdef = set_gps(caldb=caldb, lst=lst, north=False) | |
| 660 | + write_obsdef('gps.dat', obsdef) | |
| 642 | 661 | elif obsname == 'gps3': |
| 643 | 662 | obsdef = set_gps(separation=1.5, caldb=caldb, lst=lst) |
| 644 | 663 | write_obsdef('gps3.dat', obsdef) |
| ... | ... | @@ -647,6 +666,9 @@ def make_pointings(): |
| 647 | 666 | elif obsname == 'egal': |
| 648 | 667 | obsdef = set_egal(caldb=caldb, lst=lst) |
| 649 | 668 | write_obsdef('egal.dat', obsdef) |
| 669 | + elif obsname == 'egal_south': | |
| 670 | + obsdef = set_egal(caldb=caldb, lst=lst, north=False) | |
| 671 | + write_obsdef('egal.dat', obsdef) | |
| 650 | 672 | |
| 651 | 673 | # Galactic centre |
| 652 | 674 | elif obsname == 'gc': | ... | ... |