Exemplo n.º 1
0
def run(s):
    """Function to create mirstr and run
    
    Arguments:
        s {tuple} -- Element one is the miriad task to execute and
                     the second is the working directory to execute in
    """

    task = mu.mirstr(s[0])
    task.run(cwd=s[1])
    print(task)
Exemplo n.º 2
0
"""
import mir_utils as mu 
import shutil
import glob
import os

NFBIN = 4
IFSEL = 1
FREQ = '7700'

primary = f"{mu.primary}.{FREQ}"
secondary = f"{mu.secondary}.{FREQ}"
mosaic = f"{mu.science}.{FREQ}"

# Load in the data
atlod = mu.mirstr(f"atlod in=raw/*C3171 options=rfiflag,birdie,xycorr,noauto ifsel={IFSEL} out=data{IFSEL}.uv").run()
print(atlod)

# Flag the known bad channels out
mu.uvflag(atlod.attribute('out'), mu.flags_7)

# Split the data up
uvsplit = mu.mirstr(f"uvsplit vis={atlod.attribute('out')} options=mosaic").run()
print(uvsplit)

# Primary calibration
mfcal = mu.mirstr(f'mfcal vis={primary} interval=0.1').run()
gpcal = mu.mirstr(f'gpcal vis={primary} interval=0.1 nfbin={NFBIN} options=xyvary').run()

print(mfcal)
print(gpcal)
Exemplo n.º 3
0
FREQ = '7700'

primary = f"{mu.primary}.{FREQ}"
secondary = f"{mu.secondary}.{FREQ}"
mosaic = f"{mu.science}.{FREQ}"

# Check for directories and files
if not os.path.exists('uv'):
    print('Data uv files do not exist')
    sys.exit(1)

# Load in the data
uv = 'uv/data1.uv'

# Split the data up
uvsplit = mu.mirstr(f"uvsplit vis={uv} options=mosaic").run()
print(uvsplit)

# Automated flagging
pgflag = mu.mirstr(f"pgflag vis={secondary} command='<b' stokes=i,q,u,v flagpar=8,5,5,3,6,3 options=nodisp").run()
print(pgflag)

pgflag = mu.mirstr(f"pgflag vis={secondary} command='<b' stokes=i,v,q,u flagpar=8,2,2,3,6,3  options=nodisp").run()
print(pgflag)

pgflag = mu.mirstr(f"pgflag vis={secondary} command='<b' stokes=i,v,u,q flagpar=8,2,2,3,6,3  options=nodisp").run()
print(pgflag)



sec_model = mu.model_secondary()