from recipes.almahelpers import fixsyscaltimes # SACM/JAO - Fixes
__rethrow_casa_exceptions = True
context = h_init()
context.set_state('ProjectSummary', 'proposal_code', '2017.1.01355.L')
context.set_state('ProjectSummary', 'piname', 'unknown')
context.set_state('ProjectSummary', 'proposal_title', 'unknown')
context.set_state('ProjectStructure', 'ous_part_id', 'X655800955')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state('ProjectStructure', 'ppr_file', '/opt/dared/opt/qa56.1712.1/mnt/dataproc/2017.1.01355.L_2018_07_03T10_47_17.314/SOUS_uid___A001_X1296_X211/GOUS_uid___A001_X1296_X212/MOUS_uid___A001_X1296_X215/working/PPR_uid___A001_X1296_X216.xml')
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id', 'uid://A001/X1296/X215')
try:
    hifa_importdata(vis=['uid___A002_Xcf0c6b_X4bbc'], session=['session_1'])
    fixsyscaltimes(vis = 'uid___A002_Xcf0c6b_X4bbc.ms')# SACM/JAO - Fixes
    h_save() # SACM/JAO - Finish weblog after fixes
    h_init() # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_Xcf0c6b_X4bbc'], session=['session_1'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setmodels(pipelinemode="automatic")
    hifa_bandpassflag(pipelinemode="automatic")
    hifa_spwphaseup(pipelinemode="automatic")
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_Xa4dcb9_Xbad.ms') == False:
    importasdm('uid___A002_Xa4dcb9_Xbad', asis='Antenna Station Receiver Source CalAtmosphere CalWVR CorrelatorMode SBSummary', bdfflags=True, lazy=True, process_caldevice=False)
  if applyonly != True: es.fixForCSV2555('uid___A002_Xa4dcb9_Xbad.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_Xa4dcb9_Xbad.ms')

print "# A priori calibration"

# listobs
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  os.system('rm -rf uid___A002_Xa4dcb9_Xbad.ms.listobs')
  listobs(vis = 'uid___A002_Xa4dcb9_Xbad.ms',
    listfile = 'uid___A002_Xa4dcb9_Xbad.ms.listobs')
  
  
            asis="Antenna Station Receiver Source CalAtmosphere CalWVR",
            bdfflags=True,
            lazy=False,
        )
    if applyonly != True:
        es.fixForCSV2555("uid___A002_X9d13e3_Xd4f.ms")

# Fix of SYSCAL table times
mystep = 1
if mystep in thesteps:
    casalog.post("Step " + str(mystep) + " " + step_title[mystep], "INFO")
    print "Step ", mystep, step_title[mystep]

    from recipes.almahelpers import fixsyscaltimes

    fixsyscaltimes(vis="uid___A002_X9d13e3_Xd4f.ms")

print "# A priori calibration"

# listobs
mystep = 2
if mystep in thesteps:
    casalog.post("Step " + str(mystep) + " " + step_title[mystep], "INFO")
    print "Step ", mystep, step_title[mystep]

    os.system("rm -rf uid___A002_X9d13e3_Xd4f.ms.listobs")
    listobs(vis="uid___A002_X9d13e3_Xd4f.ms", listfile="uid___A002_X9d13e3_Xd4f.ms.listobs")


# A priori flagging
mystep = 3
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_X9cffbd_Xefe.ms') == False:
    importasdm('uid___A002_X9cffbd_Xefe', asis='Antenna Station Receiver Source CalAtmosphere CalWVR', bdfflags=True, lazy=False)
  if applyonly != True: es.fixForCSV2555('uid___A002_X9cffbd_Xefe.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_X9cffbd_Xefe.ms')

print "# A priori calibration"

# listobs
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  os.system('rm -rf uid___A002_X9cffbd_Xefe.ms.listobs')
  listobs(vis = 'uid___A002_X9cffbd_Xefe.ms',
    listfile = 'uid___A002_X9cffbd_Xefe.ms.listobs')
  
  
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X217')
try:
    hifa_importdata(vis=[
        'uid___A002_Xc733ea_X753', 'uid___A002_Xc772ca_X392',
        'uid___A002_Xca2b8a_X6be2', 'uid___A002_Xcbdb2a_X6e67',
        'uid___A002_Xcbdb2a_X8114', 'uid___A002_Xcbdb2a_X13ce2',
        'uid___A002_Xcc10e0_X6dd3', 'uid___A002_Xcc3ae3_X95bc',
        'uid___A002_Xccb526_Xcc36', 'uid___A002_Xccb526_Xd6ae'
    ],
                    session=[
                        'session_1', 'session_2', 'session_3', 'session_4',
                        'session_5', 'session_6', 'session_7', 'session_8',
                        'session_11', 'session_11'
                    ])
    fixsyscaltimes(vis='uid___A002_Xcbdb2a_X13ce2.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xcc3ae3_X95bc.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xcbdb2a_X6e67.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc772ca_X392.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xcc10e0_X6dd3.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xccb526_Xcc36.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xcbdb2a_X8114.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc733ea_X753.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xccb526_Xd6ae.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xca2b8a_X6be2.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    context = h_init()  # SACM/JAO - Restart weblog after fixes
    context.set_state('ProjectSummary', 'proposal_code', '2017.1.01355.L')
    context.set_state('ProjectSummary', 'piname', 'unknown')
    context.set_state('ProjectSummary', 'proposal_title', 'unknown')
    context.set_state('ProjectStructure', 'ous_part_id', 'X458885948')
context.set_state('ProjectSummary', 'piname', 'unknown')
context.set_state('ProjectSummary', 'proposal_title', 'unknown')
context.set_state('ProjectStructure', 'ous_part_id', 'X1724859540')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opt/dared/opt/qa56.1712.1/mnt/dataproc/2017.1.01355.L_2018_07_03T07_46_03.651/SOUS_uid___A001_X1296_X14b/GOUS_uid___A001_X1296_X14c/MOUS_uid___A001_X1296_X14f/working/PPR_uid___A001_X1296_X150.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X14f')
try:
    hifa_importdata(vis=['uid___A002_Xcf196f_X21b7'], session=['session_1'])
    fixsyscaltimes(vis='uid___A002_Xcf196f_X21b7.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_Xcf196f_X21b7'], session=['session_1'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setmodels(pipelinemode="automatic")
    hifa_bandpassflag(pipelinemode="automatic")
    hifa_spwphaseup(pipelinemode="automatic")
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_Xa4ce71_X49f.ms') == False:
    importasdm('uid___A002_Xa4ce71_X49f', asis='Antenna Station Receiver Source CalAtmosphere CalWVR CorrelatorMode SBSummary', bdfflags=True, lazy=True, process_caldevice=False)
  if applyonly != True: es.fixForCSV2555('uid___A002_Xa4ce71_X49f.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_Xa4ce71_X49f.ms')

print "# A priori calibration"

# listobs
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  os.system('rm -rf uid___A002_Xa4ce71_X49f.ms.listobs')
  listobs(vis = 'uid___A002_Xa4ce71_X49f.ms',
    listfile = 'uid___A002_Xa4ce71_X49f.ms.listobs')
  
  
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_X95e355_X1f13.ms') == False:
    importasdm('uid___A002_X95e355_X1f13', asis='Antenna Station Receiver Source CalAtmosphere CalWVR', bdfflags=True, lazy=False)
  if applyonly != True: es.fixForCSV2555('uid___A002_X95e355_X1f13.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_X95e355_X1f13.ms')

print "# A priori calibration"

# Running fixplanets on fields with 0,0 coordinates
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  fixplanets(vis = 'uid___A002_X95e355_X1f13.ms',
    field = '1', # Venus
    fixuvw = T)
  

# listobs
Ejemplo n.º 9
0
from recipes.almahelpers import fixsyscaltimes # SACM/JAO - Fixes
__rethrow_casa_exceptions = True
h_init()
try:
    hifa_importdata(vis=['uid___A002_X9707f1_Xfee'], session=['session_1'])
    fixsyscaltimes(vis = 'uid___A002_X9707f1_Xfee.ms')# SACM/JAO - Fixes
    h_save() # SACM/JAO - Finish weblog after fixes
    h_init() # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_X9707f1_Xfee'], session=['session_1'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    hifa_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setjy(pipelinemode="automatic")
    hif_bandpass(pipelinemode="automatic")
    hif_bpflagchans(pipelinemode="automatic")
    hifa_gfluxscale(pipelinemode="automatic")
    hifa_timegaincal(pipelinemode="automatic")
    hif_applycal(pipelinemode="automatic")
    hif_makecleanlist(intent='PHASE,BANDPASS,CHECK')
    hif_cleanlist(pipelinemode="automatic")
finally:
    h_save()
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_X9f852b_X134a.ms') == False:
    importasdm('uid___A002_X9f852b_X134a', asis='Antenna Station Receiver Source CalAtmosphere CalWVR CorrelatorMode', bdfflags=False, lazy=False)
    os.system(os.environ['CASAPATH'].split()[0]+'/bin/bdflags2MS -f "COR DELA INT MIS SIG SYN TFB WVR ZER" uid___A002_X9f852b_X134a uid___A002_X9f852b_X134a.ms')
  if applyonly != True: es.fixForCSV2555('uid___A002_X9f852b_X134a.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_X9f852b_X134a.ms')

print "# A priori calibration"

# listobs
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  os.system('rm -rf uid___A002_X9f852b_X134a.ms.listobs')
  listobs(vis = 'uid___A002_X9f852b_X134a.ms',
    listfile = 'uid___A002_X9f852b_X134a.ms.listobs')
  
  
Ejemplo n.º 11
0
from recipes.almahelpers import fixsyscaltimes # SACM/JAO - Fixes
__rethrow_casa_exceptions = True
h_init()
try:
    hifa_importdata(vis=['uid___A002_X9998b8_Xee3', 'uid___A002_X9998b8_X11eb', 'uid___A002_X9a3e71_Xffc', 'uid___A002_X9a3e71_X1256', 'uid___A002_X9a3e71_X15ca', 'uid___A002_X9a3e71_X1839', 'uid___A002_X9aca45_Xf3f'], session=['session_1', 'session_2', 'session_3', 'session_3', 'session_4', 'session_4', 'session_5'])
    fixsyscaltimes(vis = 'uid___A002_X9998b8_Xee3.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_X9998b8_X11eb.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_X9a3e71_Xffc.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_X9a3e71_X1256.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_X9a3e71_X15ca.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_X9a3e71_X1839.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_X9aca45_Xf3f.ms')# SACM/JAO - Fixes
    h_save() # SACM/JAO - Finish weblog after fixes
    h_init() # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_X9998b8_Xee3', 'uid___A002_X9998b8_X11eb', 'uid___A002_X9a3e71_Xffc', 'uid___A002_X9a3e71_X1256', 'uid___A002_X9a3e71_X15ca', 'uid___A002_X9a3e71_X1839', 'uid___A002_X9aca45_Xf3f'], session=['session_1', 'session_2', 'session_3', 'session_3', 'session_4', 'session_4', 'session_5'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    hifa_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setjy(pipelinemode="automatic")
    hif_bandpass(pipelinemode="automatic")
    hif_bpflagchans(pipelinemode="automatic")
    hifa_gfluxscale(pipelinemode="automatic")
    hifa_timegaincal(pipelinemode="automatic")
    hif_applycal(pipelinemode="automatic")
    hif_makecleanlist(intent='PHASE,BANDPASS,CHECK')
    hif_cleanlist(pipelinemode="automatic")
finally:
Ejemplo n.º 12
0
from recipes.almahelpers import fixsyscaltimes
__rethrow_casa_exceptions = True
h_init()
try:
    hifa_importdata(vis=['uid___A002_X86dcae_X416'], session=['session_1'])
    fixsyscaltimes(vis = 'uid___A002_X86dcae_X416.ms')
    fixplanets(vis = 'uid___A002_X86dcae_X416.ms', field = '2', fixuvw = T)
    h_save()
    h_init()
    hifa_importdata(vis=['uid___A002_X86dcae_X416'], session=['session_1'])
    hifa_flagdata(hm_tbuff='manual')
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    hifa_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setjy(pipelinemode="automatic")
    hif_bandpass(pipelinemode="automatic")
    hif_bpflagchans(pipelinemode="automatic")
    hifa_gfluxscale(pipelinemode="automatic")
    hifa_timegaincal(pipelinemode="automatic")
    hif_applycal(pipelinemode="automatic")
    hif_makecleanlist(intent='PHASE,BANDPASS,CHECK')
    hif_cleanlist(pipelinemode="automatic")
finally:
    h_save()
Ejemplo n.º 13
0
__rethrow_casa_exceptions = True
h_init()
try:
    hifa_importdata(
        vis=[
            "uid___A002_X960614_X39db",
            "uid___A002_X9630c0_Xc26",
            "uid___A002_X966cea_X14a4",
            "uid___A002_X9d26c8_X39a",
            "uid___A002_X9d4710_X1a57",
            "uid___A002_X9d6f4c_X154",
        ],
        session=["session_1", "session_2", "session_3", "session_4", "session_5", "session_6"],
    )
    fixsyscaltimes(vis="uid___A002_X960614_X39db.ms")  # SACM/JAO - Fixes
    fixsyscaltimes(vis="uid___A002_X9630c0_Xc26.ms")  # SACM/JAO - Fixes
    fixsyscaltimes(vis="uid___A002_X966cea_X14a4.ms")  # SACM/JAO - Fixes
    fixsyscaltimes(vis="uid___A002_X9d26c8_X39a.ms")  # SACM/JAO - Fixes
    fixsyscaltimes(vis="uid___A002_X9d4710_X1a57.ms")  # SACM/JAO - Fixes
    fixsyscaltimes(vis="uid___A002_X9d6f4c_X154.ms")  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(
        vis=[
            "uid___A002_X960614_X39db",
            "uid___A002_X9630c0_Xc26",
            "uid___A002_X966cea_X14a4",
            "uid___A002_X9d26c8_X39a",
            "uid___A002_X9d4710_X1a57",
            "uid___A002_X9d6f4c_X154",
context.set_state('ProjectSummary', 'piname', 'unknown')
context.set_state('ProjectSummary', 'proposal_title', 'unknown')
context.set_state('ProjectStructure', 'ous_part_id', 'X1761900290')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opsw/alma/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2018_01_23T08_51_02.099/SOUS_uid___A001_X1296_X1bd/GOUS_uid___A001_X1296_X1be/MOUS_uid___A001_X1296_X1bf/working/PPR_uid___A001_X1296_X1c0.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X1bf')
try:
    hifa_importdata(vis=['uid___A002_Xc8d560_X789f'], session=['session_1'])
    fixsyscaltimes(vis='uid___A002_Xc8d560_X789f.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_Xc8d560_X789f'], session=['session_1'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setmodels(pipelinemode="automatic")
    hifa_bandpassflag(pipelinemode="automatic")
    hifa_spwphaseup(pipelinemode="automatic")
from recipes.almahelpers import fixsyscaltimes # SACM/JAO - Fixes
__rethrow_casa_exceptions = True
h_init()
try:
    hifa_importdata(vis=['uid___A002_X95e355_X1f13', 'uid___A002_X95e355_X220a', 'uid___A002_X9cffbd_Xefe', 'uid___A002_X9d13e3_Xd4f'], session=['session_1', 'session_2', 'session_3', 'session_4'])
    fixsyscaltimes(vis = 'uid___A002_X95e355_X1f13.ms')# SACM/JAO - Fixes
    fixplanets(vis = 'uid___A002_X95e355_X1f13.ms', field = '1', fixuvw = T)# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_X95e355_X220a.ms')# SACM/JAO - Fixes
    fixplanets(vis = 'uid___A002_X95e355_X220a.ms', field = '1', fixuvw = T)# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_X9cffbd_Xefe.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_X9d13e3_Xd4f.ms')# SACM/JAO - Fixes
    h_save() # SACM/JAO - Finish weblog after fixes
    h_init() # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_X95e355_X1f13', 'uid___A002_X95e355_X220a', 'uid___A002_X9cffbd_Xefe', 'uid___A002_X9d13e3_Xd4f'], session=['session_1', 'session_2', 'session_3', 'session_4'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    hifa_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setjy(pipelinemode="automatic")
    hif_bandpass(pipelinemode="automatic")
    hif_bpflagchans(pipelinemode="automatic")
    hifa_gfluxscale(pipelinemode="automatic")
    hifa_timegaincal(pipelinemode="automatic")
    hif_applycal(pipelinemode="automatic")
    hif_makecleanlist(intent='PHASE,BANDPASS,CHECK')
    hif_cleanlist(pipelinemode="automatic")
finally:
    h_save()
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_X95e355_X220a.ms') == False:
    importasdm('uid___A002_X95e355_X220a', asis='Antenna Station Receiver Source CalAtmosphere CalWVR', bdfflags=True, lazy=False)
  if applyonly != True: es.fixForCSV2555('uid___A002_X95e355_X220a.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_X95e355_X220a.ms')

print "# A priori calibration"

# Running fixplanets on fields with 0,0 coordinates
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  fixplanets(vis = 'uid___A002_X95e355_X220a.ms',
    field = '1', # Venus
    fixuvw = T)
  

# listobs
        os.system(
            os.environ["CASAPATH"].split()[0]
            + '/bin/bdflags2MS -f "COR DELA INT MIS SIG SYN TFB WVR ZER" uid___A002_Xa1e1bf_X6f1 uid___A002_Xa1e1bf_X6f1.ms'
        )
    if applyonly != True:
        es.fixForCSV2555("uid___A002_Xa1e1bf_X6f1.ms")

# Fix of SYSCAL table times
mystep = 1
if mystep in thesteps:
    casalog.post("Step " + str(mystep) + " " + step_title[mystep], "INFO")
    print "Step ", mystep, step_title[mystep]

    from recipes.almahelpers import fixsyscaltimes

    fixsyscaltimes(vis="uid___A002_Xa1e1bf_X6f1.ms")

print "# A priori calibration"

# listobs
mystep = 2
if mystep in thesteps:
    casalog.post("Step " + str(mystep) + " " + step_title[mystep], "INFO")
    print "Step ", mystep, step_title[mystep]

    os.system("rm -rf uid___A002_Xa1e1bf_X6f1.ms.listobs")
    listobs(vis="uid___A002_Xa1e1bf_X6f1.ms", listfile="uid___A002_Xa1e1bf_X6f1.ms.listobs")


# A priori flagging
mystep = 3
Ejemplo n.º 18
0
context.set_state('ProjectSummary', 'piname', 'unknown')
context.set_state('ProjectSummary', 'proposal_title', 'unknown')
context.set_state('ProjectStructure', 'ous_part_id', 'X1355974333')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opt/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2017_12_10T14_28_31.410/SOUS_uid___A001_X1296_X1f5/GOUS_uid___A001_X1296_X1f6/MOUS_uid___A001_X1296_X1fb/working/PPR_uid___A001_X1296_X1fc.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X1fb')
try:
    hifa_importdata(vis=['uid___A002_Xc7a409_X39b5'], session=['session_2'])
    fixsyscaltimes(vis='uid___A002_Xc7a409_X39b5.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_Xc7a409_X39b5'], session=['session_2'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setmodels(pipelinemode="automatic")
    hifa_bandpassflag(pipelinemode="automatic")
    hifa_spwphaseup(pipelinemode="automatic")
Ejemplo n.º 19
0
    casalog.post('Step ' + str(mystep) + ' ' + step_title[mystep], 'INFO')
    print 'Step ', mystep, step_title[mystep]

    if os.path.exists('uid___A002_X85dcf7_Xefe.ms') == False:
        importasdm('uid___A002_X85dcf7_Xefe',
                   asis='Antenna Station Receiver Source CalAtmosphere CalWVR')
    if applyonly != True: es.fixForCSV2555('uid___A002_X85dcf7_Xefe.ms')

# Fix of SYSCAL table times
mystep = 1
if (mystep in thesteps):
    casalog.post('Step ' + str(mystep) + ' ' + step_title[mystep], 'INFO')
    print 'Step ', mystep, step_title[mystep]

    from recipes.almahelpers import fixsyscaltimes
    fixsyscaltimes(vis='uid___A002_X85dcf7_Xefe.ms')

print "# A priori calibration"

# listobs
mystep = 2
if (mystep in thesteps):
    casalog.post('Step ' + str(mystep) + ' ' + step_title[mystep], 'INFO')
    print 'Step ', mystep, step_title[mystep]

    os.system('rm -rf uid___A002_X85dcf7_Xefe.ms.listobs')
    listobs(vis='uid___A002_X85dcf7_Xefe.ms',
            listfile='uid___A002_X85dcf7_Xefe.ms.listobs')

# A priori flagging
mystep = 3
from recipes.almahelpers import fixsyscaltimes # SACM/JAO - Fixes
__rethrow_casa_exceptions = True
context = h_init()
context.set_state('ProjectSummary', 'proposal_code', '2017.1.01355.L')
context.set_state('ProjectSummary', 'piname', 'unknown')
context.set_state('ProjectSummary', 'proposal_title', 'unknown')
context.set_state('ProjectStructure', 'ous_part_id', 'X243629570')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state('ProjectStructure', 'ppr_file', '/opt/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2018_04_03T21_09_57.607/SOUS_uid___A001_X1296_X1ab/GOUS_uid___A001_X1296_X1ac/MOUS_uid___A001_X1296_X1b1/working/PPR_uid___A001_X1296_X1b2.xml')
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id', 'uid://A001/X1296/X1b1')
try:
    hifa_importdata(vis=['uid___A002_Xc8ed16_X696d', 'uid___A002_Xc91189_X284b', 'uid___A002_Xc92012_X1a8e', 'uid___A002_Xc92fe3_X8038', 'uid___A002_Xc96463_X741a', 'uid___A002_Xc9957b_Xbd7', 'uid___A002_Xc9957b_X1347', 'uid___A002_Xca0142_X2950'], session=['session_3', 'session_4', 'session_5', 'session_6', 'session_7', 'session_8', 'session_8', 'session_10'])
    fixsyscaltimes(vis = 'uid___A002_Xc91189_X284b.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_Xc8ed16_X696d.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_Xc9957b_X1347.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_Xc96463_X741a.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_Xc9957b_Xbd7.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_Xc92012_X1a8e.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_Xc92fe3_X8038.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis = 'uid___A002_Xca0142_X2950.ms')# SACM/JAO - Fixes
    h_save() # SACM/JAO - Finish weblog after fixes
    h_init() # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_Xc8ed16_X696d', 'uid___A002_Xc91189_X284b', 'uid___A002_Xc92012_X1a8e', 'uid___A002_Xc92fe3_X8038', 'uid___A002_Xc96463_X741a', 'uid___A002_Xc9957b_Xbd7', 'uid___A002_Xc9957b_X1347', 'uid___A002_Xca0142_X2950'], session=['session_3', 'session_4', 'session_5', 'session_6', 'session_7', 'session_8', 'session_8', 'session_10'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
            bdfflags=True,
            lazy=False,
            process_caldevice=False)
        if not os.path.exists('uid___A002_Xd90607_X10f75.ms.flagversions'):
            print 'ERROR in importasdm. Output MS is probably not useful. Will stop here.'
            thesteps = []
    if applyonly != True: es.fixForCSV2555('uid___A002_Xd90607_X10f75.ms')

# Fix of SYSCAL table times
mystep = 1
if (mystep in thesteps):
    casalog.post('Step ' + str(mystep) + ' ' + step_title[mystep], 'INFO')
    print 'Step ', mystep, step_title[mystep]

    from recipes.almahelpers import fixsyscaltimes
    fixsyscaltimes(vis='uid___A002_Xd90607_X10f75.ms')

print "# A priori calibration"

# listobs
mystep = 2
if (mystep in thesteps):
    casalog.post('Step ' + str(mystep) + ' ' + step_title[mystep], 'INFO')
    print 'Step ', mystep, step_title[mystep]

    os.system('rm -rf uid___A002_Xd90607_X10f75.ms.listobs')
    listobs(vis='uid___A002_Xd90607_X10f75.ms',
            listfile='uid___A002_Xd90607_X10f75.ms.listobs')

# A priori flagging
mystep = 3
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_X85dcf7_Xc7c.ms') == False:
    importasdm('uid___A002_X85dcf7_Xc7c', asis='Antenna Station Receiver Source CalAtmosphere CalWVR')
  if applyonly != True: es.fixForCSV2555('uid___A002_X85dcf7_Xc7c.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_X85dcf7_Xc7c.ms')

print "# A priori calibration"

# listobs
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  os.system('rm -rf uid___A002_X85dcf7_Xc7c.ms.listobs')
  listobs(vis = 'uid___A002_X85dcf7_Xc7c.ms',
    listfile = 'uid___A002_X85dcf7_Xc7c.ms.listobs')
  
  
Ejemplo n.º 23
0
from recipes.almahelpers import fixsyscaltimes # SACM/JAO - Fixes
__rethrow_casa_exceptions = True
context = h_init()
context.set_state('ProjectSummary', 'proposal_code', '2017.1.01355.L')
context.set_state('ProjectSummary', 'piname', 'unknown')
context.set_state('ProjectSummary', 'proposal_title', 'unknown')
context.set_state('ProjectStructure', 'ous_part_id', 'X481159893')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state('ProjectStructure', 'ppr_file', '/opt/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2018_05_11T01_16_18.215/SOUS_uid___A001_X1296_X141/GOUS_uid___A001_X1296_X142/MOUS_uid___A001_X1296_X145/working/PPR_uid___A001_X1296_X146.xml')
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id', 'uid://A001/X1296/X145')
try:
    hifa_importdata(vis=['uid___A002_Xcd07af_X590b'], session=['session_1'])
    fixsyscaltimes(vis = 'uid___A002_Xcd07af_X590b.ms')# SACM/JAO - Fixes
    h_save() # SACM/JAO - Finish weblog after fixes
    h_init() # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_Xcd07af_X590b'], session=['session_1'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setmodels(pipelinemode="automatic")
    hifa_bandpassflag(pipelinemode="automatic")
    hifa_spwphaseup(pipelinemode="automatic")
Ejemplo n.º 24
0
context.set_state('ProjectSummary', 'piname', 'unknown')
context.set_state('ProjectSummary', 'proposal_title', 'unknown')
context.set_state('ProjectStructure', 'ous_part_id', 'X1494228743')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opsw/alma/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2018_05_15T18_22_15.755/SOUS_uid___A001_X1296_X179/GOUS_uid___A001_X1296_X17a/MOUS_uid___A001_X1296_X17d/working/PPR_uid___A001_X1296_X17e.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X17d')
try:
    hifa_importdata(vis=['uid___A002_Xcd1950_X314a'], session=['session_1'])
    fixsyscaltimes(vis='uid___A002_Xcd1950_X314a.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_Xcd1950_X314a'], session=['session_1'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setmodels(pipelinemode="automatic")
    hifa_bandpassflag(pipelinemode="automatic")
    hifa_spwphaseup(pipelinemode="automatic")
Ejemplo n.º 25
0
context.set_state('ProjectSummary', 'piname', 'unknown')
context.set_state('ProjectSummary', 'proposal_title', 'unknown')
context.set_state('ProjectStructure', 'ous_part_id', 'X578516786')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opt/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2018_05_02T16_57_53.502/SOUS_uid___A001_X1296_X1e3/GOUS_uid___A001_X1296_X1e4/MOUS_uid___A001_X1296_X1e7/working/PPR_uid___A001_X1296_X1e8.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X1e7')
try:
    hifa_importdata(vis=['uid___A002_Xcc626d_X9fda'], session=['session_1'])
    fixsyscaltimes(vis='uid___A002_Xcc626d_X9fda.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_Xcc626d_X9fda'], session=['session_1'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setmodels(pipelinemode="automatic")
    hifa_bandpassflag(pipelinemode="automatic")
    hifa_spwphaseup(pipelinemode="automatic")
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_Xa8df68_Xb4b.ms') == False:
    importasdm('uid___A002_Xa8df68_Xb4b', asis='Antenna Station Receiver Source CalAtmosphere CalWVR CorrelatorMode SBSummary', bdfflags=True, lazy=False, process_caldevice=False)
  if applyonly != True: es.fixForCSV2555('uid___A002_Xa8df68_Xb4b.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_Xa8df68_Xb4b.ms')

print "# A priori calibration"

# listobs
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  os.system('rm -rf uid___A002_Xa8df68_Xb4b.ms.listobs')
  listobs(vis = 'uid___A002_Xa8df68_Xb4b.ms',
    listfile = 'uid___A002_Xa8df68_Xb4b.ms.listobs')
  
  
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_X85b7b2_Xb3.ms') == False:
    importasdm('uid___A002_X85b7b2_Xb3', asis='Antenna Station Receiver Source CalAtmosphere CalWVR')
  if applyonly != True: es.fixForCSV2555('uid___A002_X85b7b2_Xb3.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_X85b7b2_Xb3.ms')

print "# A priori calibration"

# Running fixplanets on fields with 0,0 coordinates
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  fixplanets(vis = 'uid___A002_X85b7b2_Xb3.ms',
    field = '2', # Neptune
    fixuvw = T)
  

# listobs
Ejemplo n.º 28
0
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_X87436c_Xb7a.ms') == False:
    importasdm('uid___A002_X87436c_Xb7a', asis='Antenna Station Receiver Source CalAtmosphere CalWVR', bdfflags=True)
  if applyonly != True: es.fixForCSV2555('uid___A002_X87436c_Xb7a.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_X87436c_Xb7a.ms')

print "# A priori calibration"

# Running fixplanets on fields with 0,0 coordinates
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  fixplanets(vis = 'uid___A002_X87436c_Xb7a.ms',
    field = '2', # Uranus
    fixuvw = T)
  

# listobs
Ejemplo n.º 29
0
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X10b')
try:
    hifa_importdata(vis=[
        'uid___A002_Xc6d2f9_X54b3', 'uid___A002_Xc6e968_X4e3b',
        'uid___A002_Xc7111c_X4b2', 'uid___A002_Xc790bf_X5527',
        'uid___A002_Xc7a409_X3cca'
    ],
                    session=[
                        'session_1', 'session_2', 'session_3', 'session_4',
                        'session_5'
                    ])
    fixsyscaltimes(vis='uid___A002_Xc7a409_X3cca.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc7111c_X4b2.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc6d2f9_X54b3.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc6e968_X4e3b.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc790bf_X5527.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=[
        'uid___A002_Xc6d2f9_X54b3', 'uid___A002_Xc6e968_X4e3b',
        'uid___A002_Xc7111c_X4b2', 'uid___A002_Xc790bf_X5527',
        'uid___A002_Xc7a409_X3cca'
    ],
                    session=[
                        'session_1', 'session_2', 'session_3', 'session_4',
                        'session_5'
                    ])
Ejemplo n.º 30
0
context.set_state('ProjectStructure', 'ous_part_id', 'X2121228479')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opsw/alma/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2018_04_30T10_15_24.375/SOUS_uid___A001_X1296_X12d/GOUS_uid___A001_X1296_X12e/MOUS_uid___A001_X1296_X131/working/PPR_uid___A001_X1296_X132.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X131')
try:
    hifa_importdata(
        vis=['uid___A002_Xcc626d_Xbbac', 'uid___A002_Xcc8b19_X292a'],
        session=['session_1', 'session_2'])
    fixsyscaltimes(vis='uid___A002_Xcc626d_Xbbac.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xcc8b19_X292a.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(
        vis=['uid___A002_Xcc626d_Xbbac', 'uid___A002_Xcc8b19_X292a'],
        session=['session_1', 'session_2'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
            'uid___A002_Xaec9ef_X88a',
            asis=
            'Antenna Station Receiver Source CalAtmosphere CalWVR CorrelatorMode SBSummary',
            bdfflags=True,
            lazy=True,
            process_caldevice=False)
    if applyonly != True: es.fixForCSV2555('uid___A002_Xaec9ef_X88a.ms')

# Fix of SYSCAL table times
mystep = 1
if (mystep in thesteps):
    casalog.post('Step ' + str(mystep) + ' ' + step_title[mystep], 'INFO')
    print 'Step ', mystep, step_title[mystep]

    from recipes.almahelpers import fixsyscaltimes
    fixsyscaltimes(vis='uid___A002_Xaec9ef_X88a.ms')

print "# A priori calibration"

# listobs
mystep = 2
if (mystep in thesteps):
    casalog.post('Step ' + str(mystep) + ' ' + step_title[mystep], 'INFO')
    print 'Step ', mystep, step_title[mystep]

    os.system('rm -rf uid___A002_Xaec9ef_X88a.ms.listobs')
    listobs(vis='uid___A002_Xaec9ef_X88a.ms',
            listfile='uid___A002_Xaec9ef_X88a.ms.listobs')

# A priori flagging
mystep = 3
from recipes.almahelpers import fixsyscaltimes  # SACM/JAO - Fixes
__rethrow_casa_exceptions = True
h_init()
try:
    hifa_importdata(dbservice=False,
                    bdfflags=False,
                    vis=['../rawdata/uid___A002_Xcfae6a_Xff3'],
                    session=['session_2'],
                    ocorr_mode='ca')
    fixsyscaltimes(vis='uid___A002_Xcfae6a_Xff3.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_restoredata(vis=['uid___A002_Xcfae6a_Xff3'],
                     session=['session_2'],
                     ocorr_mode='ca')
finally:
    h_save()
Ejemplo n.º 33
0
context.set_state('ProjectStructure', 'ous_part_id', 'X398437297')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opt/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2017_12_26T14_40_52.294/SOUS_uid___A001_X1296_X14b/GOUS_uid___A001_X1296_X14c/MOUS_uid___A001_X1296_X151/working/PPR_uid___A001_X1296_X152.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X151')
try:
    hifa_importdata(
        vis=['uid___A002_Xc805c1_X31cd', 'uid___A002_Xc83b78_X4517'],
        session=['session_1', 'session_2'])
    fixsyscaltimes(vis='uid___A002_Xc83b78_X4517.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc805c1_X31cd.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(
        vis=['uid___A002_Xc805c1_X31cd', 'uid___A002_Xc83b78_X4517'],
        session=['session_1', 'session_2'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_X87c075_X1066.ms') == False:
    importasdm('uid___A002_X87c075_X1066', asis='Antenna Station Receiver Source CalAtmosphere CalWVR', bdfflags=True)
  if applyonly != True: es.fixForCSV2555('uid___A002_X87c075_X1066.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_X87c075_X1066.ms')

print "# A priori calibration"

# listobs
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  os.system('rm -rf uid___A002_X87c075_X1066.ms.listobs')
  listobs(vis = 'uid___A002_X87c075_X1066.ms',
    listfile = 'uid___A002_X87c075_X1066.ms.listobs')
  
  
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_Xa1e1bf_X290.ms') == False:
    importasdm('uid___A002_Xa1e1bf_X290', asis='Antenna Station Receiver Source CalAtmosphere CalWVR CorrelatorMode', bdfflags=False, lazy=False)
    os.system(os.environ['CASAPATH'].split()[0]+'/bin/bdflags2MS -f "COR DELA INT MIS SIG SYN TFB WVR ZER" uid___A002_Xa1e1bf_X290 uid___A002_Xa1e1bf_X290.ms')
  if applyonly != True: es.fixForCSV2555('uid___A002_Xa1e1bf_X290.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_Xa1e1bf_X290.ms')

print "# A priori calibration"

# listobs
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  os.system('rm -rf uid___A002_Xa1e1bf_X290.ms.listobs')
  listobs(vis = 'uid___A002_Xa1e1bf_X290.ms',
    listfile = 'uid___A002_Xa1e1bf_X290.ms.listobs')
  
  
Ejemplo n.º 36
0
context.set_state('ProjectSummary', 'proposal_title', 'unknown')
context.set_state('ProjectStructure', 'ous_part_id', 'X1988847564')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opsw/alma/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2017_11_22T16_25_55.616/SOUS_uid___A001_X1296_X167/GOUS_uid___A001_X1296_X168/MOUS_uid___A001_X1296_X16d/working/PPR_uid___A001_X1296_X16e.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X16d')
try:
    hifa_importdata(vis=['uid___A002_Xc6c0d5_X3f2e'], session=['session_1'])
    #fixsyscaltimes(vis = 'uid___A002_Xc6d2f9_X4380.ms')# SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc6c0d5_X3f2e.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_Xc6c0d5_X3f2e'], session=['session_1'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    flagdata(vis='uid___A002_Xc6c0d5_X3f2e.ms.h_tsyscal.s6_1.tsyscal.tbl',
             mode='manual',
             spw='16:990~1100',
             field="G328.25",
             reason='N2HP_line')
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
context.set_state('ProjectSummary', 'piname', 'unknown')
context.set_state('ProjectSummary', 'proposal_title', 'unknown')
context.set_state('ProjectStructure', 'ous_part_id', 'X530690853')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opt/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2018_03_23T15_47_02.235/SOUS_uid___A001_X1296_X1cf/GOUS_uid___A001_X1296_X1d0/MOUS_uid___A001_X1296_X1d1/working/PPR_uid___A001_X1296_X1d2.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X1d1')
try:
    hifa_importdata(vis=['uid___A002_Xca6c94_X4de2'], session=['session_1'])
    fixsyscaltimes(vis='uid___A002_Xca6c94_X4de2.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_Xca6c94_X4de2'], session=['session_1'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setmodels(pipelinemode="automatic")
    hifa_bandpassflag(pipelinemode="automatic")
    hifa_spwphaseup(pipelinemode="automatic")
Ejemplo n.º 38
0
context.set_state('ProjectSummary', 'piname', 'unknown')
context.set_state('ProjectSummary', 'proposal_title', 'unknown')
context.set_state('ProjectStructure', 'ous_part_id', 'X1712283488')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opsw/alma/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2018_01_26T12_33_20.062/SOUS_uid___A001_X1296_X167/GOUS_uid___A001_X1296_X168/MOUS_uid___A001_X1296_X169/working/PPR_uid___A001_X1296_X16a.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X169')
try:
    hifa_importdata(vis=['uid___A002_Xc8ed16_Xd8b0'], session=['session_1'])
    fixsyscaltimes(vis='uid___A002_Xc8ed16_Xd8b0.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_Xc8ed16_Xd8b0'], session=['session_1'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setmodels(pipelinemode="automatic")
    hifa_bandpassflag(pipelinemode="automatic")
    hifa_spwphaseup(pipelinemode="automatic")
Ejemplo n.º 39
0
context.set_state('ProjectStructure', 'ous_part_id', 'X272746100')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opt/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2018_02_13T12_55_51.648/SOUS_uid___A001_X1296_X211/GOUS_uid___A001_X1296_X212/MOUS_uid___A001_X1296_X213/working/PPR_uid___A001_X1296_X214.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X213')
try:
    hifa_importdata(
        vis=['uid___A002_Xc96463_X6519', 'uid___A002_Xc96f17_X6e3d'],
        session=['session_1', 'session_2'])
    fixsyscaltimes(vis='uid___A002_Xc96f17_X6e3d.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc96463_X6519.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(
        vis=['uid___A002_Xc96463_X6519', 'uid___A002_Xc96f17_X6e3d'],
        session=['session_1', 'session_2'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
Ejemplo n.º 40
0
            'uid___A002_Xa4dcb9_Xbad',
            asis=
            'Antenna Station Receiver Source CalAtmosphere CalWVR CorrelatorMode SBSummary',
            bdfflags=True,
            lazy=True,
            process_caldevice=False)
    if applyonly != True: es.fixForCSV2555('uid___A002_Xa4dcb9_Xbad.ms')

# Fix of SYSCAL table times
mystep = 1
if (mystep in thesteps):
    casalog.post('Step ' + str(mystep) + ' ' + step_title[mystep], 'INFO')
    print 'Step ', mystep, step_title[mystep]

    from recipes.almahelpers import fixsyscaltimes
    fixsyscaltimes(vis='uid___A002_Xa4dcb9_Xbad.ms')

print "# A priori calibration"

# listobs
mystep = 2
if (mystep in thesteps):
    casalog.post('Step ' + str(mystep) + ' ' + step_title[mystep], 'INFO')
    print 'Step ', mystep, step_title[mystep]

    os.system('rm -rf uid___A002_Xa4dcb9_Xbad.ms.listobs')
    listobs(vis='uid___A002_Xa4dcb9_Xbad.ms',
            listfile='uid___A002_Xa4dcb9_Xbad.ms.listobs')

# A priori flagging
mystep = 3
Ejemplo n.º 41
0
context.set_state('ProjectStructure', 'ous_part_id', 'X1265628748')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opt/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2018_03_14T14_11_26.212/SOUS_uid___A001_X1296_X1ff/GOUS_uid___A001_X1296_X200/MOUS_uid___A001_X1296_X203/working/PPR_uid___A001_X1296_X204.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X203')
try:
    hifa_importdata(
        vis=['uid___A002_Xc8b2b0_X6bea', 'uid___A002_Xca3f23_X2452'],
        session=['session_1', 'session_2'])
    fixsyscaltimes(vis='uid___A002_Xc8b2b0_X6bea.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xca3f23_X2452.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(
        vis=['uid___A002_Xc8b2b0_X6bea', 'uid___A002_Xca3f23_X2452'],
        session=['session_1', 'session_2'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
Ejemplo n.º 42
0
context.set_state('ProjectSummary', 'piname', 'unknown')
context.set_state('ProjectSummary', 'proposal_title', 'unknown')
context.set_state('ProjectStructure', 'ous_part_id', 'X1439646047')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opsw/alma/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2018_04_30T09_34_00.492/SOUS_uid___A001_X1296_X18d/GOUS_uid___A001_X1296_X18e/MOUS_uid___A001_X1296_X191/working/PPR_uid___A001_X1296_X192.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X191')
try:
    hifa_importdata(vis=['uid___A002_Xcc8b19_X3f97'], session=['session_2'])
    fixsyscaltimes(vis='uid___A002_Xcc8b19_X3f97.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_Xcc8b19_X3f97'], session=['session_2'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setmodels(pipelinemode="automatic")
    hifa_bandpassflag(pipelinemode="automatic")
    hifa_spwphaseup(pipelinemode="automatic")
Ejemplo n.º 43
0
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_X872bbc_X7c.ms') == False:
    importasdm('uid___A002_X872bbc_X7c', asis='Antenna Station Receiver Source CalAtmosphere CalWVR', bdfflags=True)
  if applyonly != True: es.fixForCSV2555('uid___A002_X872bbc_X7c.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_X872bbc_X7c.ms')

print "# A priori calibration"

# Running fixplanets on fields with 0,0 coordinates
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  fixplanets(vis = 'uid___A002_X872bbc_X7c.ms',
    field = '2', # Uranus
    fixuvw = T)
  

# listobs
Ejemplo n.º 44
0
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X115')
try:
    hifa_importdata(vis=[
        'uid___A002_Xc6141c_X2870', 'uid___A002_Xc6b674_X42f',
        'uid___A002_Xc845c0_X4928', 'uid___A002_Xc96463_X6903',
        'uid___A002_Xcaf094_X3cc0', 'uid___A002_Xcb1740_X5dcb',
        'uid___A002_Xcb5bc7_X2eba', 'uid___A002_Xcba691_X6b8e'
    ],
                    session=[
                        'session_1', 'session_2', 'session_3', 'session_4',
                        'session_5', 'session_6', 'session_7', 'session_9'
                    ])
    fixsyscaltimes(vis='uid___A002_Xc6141c_X2870.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xcba691_X6b8e.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc96463_X6903.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xcb1740_X5dcb.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc845c0_X4928.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xcaf094_X3cc0.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc6b674_X42f.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xcb5bc7_X2eba.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=[
        'uid___A002_Xc6141c_X2870', 'uid___A002_Xc6b674_X42f',
        'uid___A002_Xc845c0_X4928', 'uid___A002_Xc96463_X6903',
        'uid___A002_Xcaf094_X3cc0', 'uid___A002_Xcb1740_X5dcb',
        'uid___A002_Xcb5bc7_X2eba', 'uid___A002_Xcba691_X6b8e'
    ],
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opt/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2018_01_18T20_18_42.505/SOUS_uid___A001_X1296_X1ab/GOUS_uid___A001_X1296_X1ac/MOUS_uid___A001_X1296_X1ad/working/PPR_uid___A001_X1296_X1ae.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X1ad')
try:
    hifa_importdata(vis=[
        'uid___A002_Xc845c0_X349f', 'uid___A002_Xc845c0_X3911',
        'uid___A002_Xc845c0_X4842'
    ],
                    session=['session_2', 'session_2', 'session_3'])
    fixsyscaltimes(vis='uid___A002_Xc845c0_X349f.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc845c0_X3911.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc845c0_X4842.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=[
        'uid___A002_Xc845c0_X349f', 'uid___A002_Xc845c0_X3911',
        'uid___A002_Xc845c0_X4842'
    ],
                    session=['session_2', 'session_2', 'session_3'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_X9ee74a_X26f0.ms') == False:
    importasdm('uid___A002_X9ee74a_X26f0', asis='Antenna Station Receiver Source CalAtmosphere CalWVR CorrelatorMode SBSummary', bdfflags=True, lazy=False, process_caldevice=False)
  if applyonly != True: es.fixForCSV2555('uid___A002_X9ee74a_X26f0.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_X9ee74a_X26f0.ms')

print "# A priori calibration"

# listobs
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  os.system('rm -rf uid___A002_X9ee74a_X26f0.ms.listobs')
  listobs(vis = 'uid___A002_X9ee74a_X26f0.ms',
    listfile = 'uid___A002_X9ee74a_X26f0.ms.listobs')
  
  
context.set_state('ProjectStructure', 'ous_part_id', 'X90039159')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opsw/alma/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2017_12_17T05_32_56.894/SOUS_uid___A001_X1296_X1bd/GOUS_uid___A001_X1296_X1be/MOUS_uid___A001_X1296_X1c3/working/PPR_uid___A001_X1296_X1c4.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X1c3')
try:
    hifa_importdata(
        vis=['uid___A002_Xc74b5b_X4c87', 'uid___A002_Xc7e4e4_X445f'],
        session=['session_1', 'session_4'])
    fixsyscaltimes(vis='uid___A002_Xc74b5b_X4c87.ms')  # SACM/JAO - Fixes
    fixsyscaltimes(vis='uid___A002_Xc7e4e4_X445f.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(
        vis=['uid___A002_Xc74b5b_X4c87', 'uid___A002_Xc7e4e4_X445f'],
        session=['session_1', 'session_4'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    if os.path.exists('uid___A002_X9cffbd_Xefe.ms') == False:
        importasdm('uid___A002_X9cffbd_Xefe',
                   asis='Antenna Station Receiver Source CalAtmosphere CalWVR',
                   bdfflags=True,
                   lazy=False)
    if applyonly != True: es.fixForCSV2555('uid___A002_X9cffbd_Xefe.ms')

# Fix of SYSCAL table times
mystep = 1
if (mystep in thesteps):
    casalog.post('Step ' + str(mystep) + ' ' + step_title[mystep], 'INFO')
    print 'Step ', mystep, step_title[mystep]

    from recipes.almahelpers import fixsyscaltimes
    fixsyscaltimes(vis='uid___A002_X9cffbd_Xefe.ms')

print "# A priori calibration"

# listobs
mystep = 2
if (mystep in thesteps):
    casalog.post('Step ' + str(mystep) + ' ' + step_title[mystep], 'INFO')
    print 'Step ', mystep, step_title[mystep]

    os.system('rm -rf uid___A002_X9cffbd_Xefe.ms.listobs')
    listobs(vis='uid___A002_X9cffbd_Xefe.ms',
            listfile='uid___A002_X9cffbd_Xefe.ms.listobs')

# A priori flagging
mystep = 3
context.set_state('ProjectSummary', 'piname', 'unknown')
context.set_state('ProjectSummary', 'proposal_title', 'unknown')
context.set_state('ProjectStructure', 'ous_part_id', 'X979149868')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opt/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2018_01_18T14_07_03.979/SOUS_uid___A001_X1296_X141/GOUS_uid___A001_X1296_X142/MOUS_uid___A001_X1296_X143/working/PPR_uid___A001_X1296_X144.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X143')
try:
    hifa_importdata(vis=['uid___A002_Xc89480_Xe90d'], session=['session_1'])
    fixsyscaltimes(vis='uid___A002_Xc89480_Xe90d.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_Xc89480_Xe90d'], session=['session_1'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setmodels(pipelinemode="automatic")
    hifa_bandpassflag(pipelinemode="automatic")
    hifa_spwphaseup(pipelinemode="automatic")
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_X9ff365_X2a83.ms') == False:
    importasdm('uid___A002_X9ff365_X2a83', asis='Antenna Station Receiver Source CalAtmosphere CalWVR CorrelatorMode', bdfflags=False, lazy=False)
    os.system(os.environ['CASAPATH'].split()[0]+'/bin/bdflags2MS -f "COR DELA INT MIS SIG SYN TFB WVR ZER" uid___A002_X9ff365_X2a83 uid___A002_X9ff365_X2a83.ms')
  if applyonly != True: es.fixForCSV2555('uid___A002_X9ff365_X2a83.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_X9ff365_X2a83.ms')

print "# A priori calibration"

# listobs
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  os.system('rm -rf uid___A002_X9ff365_X2a83.ms.listobs')
  listobs(vis = 'uid___A002_X9ff365_X2a83.ms',
    listfile = 'uid___A002_X9ff365_X2a83.ms.listobs')
  
  
Ejemplo n.º 51
0
context.set_state('ProjectSummary', 'piname', 'unknown')
context.set_state('ProjectSummary', 'proposal_title', 'unknown')
context.set_state('ProjectStructure', 'ous_part_id', 'X738487140')
context.set_state('ProjectStructure', 'ous_title', 'Undefined')
context.set_state(
    'ProjectStructure', 'ppr_file',
    '/opt/dared/opt/c5r1/mnt/dataproc/2017.1.01355.L_2018_01_25T14_45_02.430/SOUS_uid___A001_X1296_X179/GOUS_uid___A001_X1296_X17a/MOUS_uid___A001_X1296_X17b/working/PPR_uid___A001_X1296_X17c.xml'
)
context.set_state('ProjectStructure', 'ps_entity_id', 'uid://A001/X1220/Xddd')
context.set_state('ProjectStructure', 'recipe_name', 'hifa_calimage')
context.set_state('ProjectStructure', 'ous_entity_id', 'uid://A001/X1220/Xdd9')
context.set_state('ProjectStructure', 'ousstatus_entity_id',
                  'uid://A001/X1296/X17b')
try:
    hifa_importdata(vis=['uid___A002_Xc889b6_X5cbc'], session=['session_1'])
    fixsyscaltimes(vis='uid___A002_Xc889b6_X5cbc.ms')  # SACM/JAO - Fixes
    h_save()  # SACM/JAO - Finish weblog after fixes
    h_init()  # SACM/JAO - Restart weblog after fixes
    hifa_importdata(vis=['uid___A002_Xc889b6_X5cbc'], session=['session_1'])
    hifa_flagdata(pipelinemode="automatic")
    hifa_fluxcalflag(pipelinemode="automatic")
    hif_rawflagchans(pipelinemode="automatic")
    hif_refant(pipelinemode="automatic")
    h_tsyscal(pipelinemode="automatic")
    hifa_tsysflag(pipelinemode="automatic")
    hifa_antpos(pipelinemode="automatic")
    hifa_wvrgcalflag(pipelinemode="automatic")
    hif_lowgainflag(pipelinemode="automatic")
    hif_setmodels(pipelinemode="automatic")
    hifa_bandpassflag(pipelinemode="automatic")
    hifa_spwphaseup(pipelinemode="automatic")
Ejemplo n.º 52
0
    # flagdata(vis=msfile, mode='unflag', flagbackup=False)
    # flagmanager(vis=msfile, mode='list')
    flagdata(vis=obs, mode='manual', autocorr=True, flagbackup=False)
    flagdata(vis=obs,
             mode='manual',
             intent='*POINTING*,*SIDEBAND_RATIO*,*ATMOSPHERE*',
             flagbackup=False)
    flagdata(vis=obs, mode='shadow', flagbackup=False)
    #>> Flag edge channel
    #flagdata(vis = msfile, spw='17:0~3,19:0~3,21:0~3,23:0~3')
    flagmanager(vis=obs, mode='save', versionname='priori_flag')

    if False:
        #>> Fix the ASDM SYSCal table issue, data before 2015
        from recipes.almahelpers import fixsyscaltimes
        fixsyscaltimes(vis=msfile)

    try:
        plot_utils.check_info(obs, refant=refant, plotdir='plots/before_prior')
    except:
        print("Load plot_utils to generate the plots!")

#######################################################
#                  Prior Calibration
#######################################################
print("\n==============> Start Prior Calibration <=============\n")

#> Tsys Calibration
#>> It gives the first-order correction for atmospheric opacity as a funcction of time and freq
for obs in obs_list:
    basename = os.path.basename(obs)
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  if os.path.exists('uid___A002_X85c183_X1434.ms') == False:
    importasdm('uid___A002_X85c183_X1434', asis='Antenna Station Receiver Source CalAtmosphere CalWVR')
  if applyonly != True: es.fixForCSV2555('uid___A002_X85c183_X1434.ms')

# Fix of SYSCAL table times
mystep = 1
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  from recipes.almahelpers import fixsyscaltimes
  fixsyscaltimes(vis = 'uid___A002_X85c183_X1434.ms')

print "# A priori calibration"

# Running fixplanets on fields with 0,0 coordinates
mystep = 2
if(mystep in thesteps):
  casalog.post('Step '+str(mystep)+' '+step_title[mystep],'INFO')
  print 'Step ', mystep, step_title[mystep]

  fixplanets(vis = 'uid___A002_X85c183_X1434.ms',
    field = '2', # Neptune
    fixuvw = T)
  

# listobs