def link(name,id,lroot,anchor,wdir):
    if os.path.isfile(wdir+id+'/'+name):
        return '<a href="%s%s">%s</a>' % (lroot,name,anchor)
    else:
        return '&mdash;'
    

workdir='/data/lofar/DR2'
skip_construct=False
while True:
    print(datetime.now())
    print

    # make status plot
    separator('Making plot')
    os.system('plot_db_projection.py /home/mjh/lofar-surveys/static/Tier1-dbstatus.png')

    # make JSON file for HIPS
    separator('Make JSON file')
    os.chdir('/home/mjh/lofar-surveys/static/lotss_aladin')
    os.system('python survey_status_mysql.py')
    
    if not skip_construct:
        # sync mosaics directory
        separator('Mosaic sync')
        os.chdir(workdir+'/mosaics')
        s="rsync --progress --timeout=10 -avz --exclude '*.out' --include 'P*' --include 'mosaic-blanked.fits' --include 'mosaic.cat.fits' --include 'mosaic.resid.fits' --include 'mosaic.rms.fits' --include 'low-mosaic-blanked.fits' --exclude '*' '[email protected]:/disks/paradata/shimwell/LoTSS-DR2/mosaics/*' ."
        do_rsync(s)

        # now go through all archived and completed fields and make sure they're in the DR2 directory
Beispiel #2
0
def link(name, id, lroot, anchor, wdir):
    if os.path.isfile(wdir + id + '/' + name):
        return '<a href="%s%s">%s</a>' % (lroot, name, anchor)
    else:
        return '&mdash;'


if __name__ == '__main__':
    workdir = '/data/lofar/DR2'
    skip_construct = False
    while True:
        print(datetime.now())
        print()

        # make status plot
        separator('Making plot')
        os.system(
            'plot_db_projection.py /home/mjh/lofar-surveys/static/Tier1-dbstatus.png'
        )

        # make JSON file for HIPS
        separator('Make JSON file')
        os.chdir('/home/mjh/lofar-surveys/static/lotss_aladin')
        os.system('python survey_status_mysql.py')

        if not skip_construct:
            # sync mosaics directory
            separator('Mosaic sync')
            os.chdir(workdir + '/mosaics')
            for d in ['RA13h_field', 'RA0h_field']:
                s = "rsync --progress --timeout=10 -avz --exclude 'astroblank-*' --exclude '*.out' --exclude '*.py' --exclude 'background' --exclude '*~' --exclude 'old' --exclude '*.sh' --exclude 'low-mosaic-weights.fits' --exclude 'mosaic.fits' --exclude 'wavelet' --exclude 'model' --exclude 'residual' --exclude 'mosaic.pybdsmmask.fits' --exclude 'mosaic-weights.fits' --exclude 'reproject-*.fits' --exclude 'weight-*.fits' --exclude 'low-reproject-*.fits' --exclude 'low-weight-*.fits' --exclude 'low-mosaic.fits' %[email protected]:/disks/paradata/shimwell/LoTSS-DR2/mosaics/%s/ ." % (
def link(name,id,lroot,anchor,wdir):
    if os.path.isfile(wdir+id+'/'+name):
        return '<a href="%s%s">%s</a>' % (lroot,name,anchor)
    else:
        return '&mdash;'
    

workdir='/data/lofar/DR2'
skip_construct=False
while True:
    print(datetime.datetime.now())
    print

    # make status plot
    separator('Making plot')
    os.system('plot_db_projection.py /home/mjh/lofar-surveys/static/Tier1-dbstatus.png')

    if not skip_construct:
        # sync mosaics directory
        separator('Mosaic sync')
        os.chdir(workdir+'/mosaics')
        os.system("rsync -avz --exclude '*.out' --include 'P*' --include 'mosaic-blanked.fits' --include 'mosaic.cat.fits' --include 'mosaic.resid.fits' --include 'mosaic.rms.fits' --include 'low-mosaic-blanked.fits' --exclude '*' '[email protected]:/disks/paradata/shimwell/LoTSS-DR2/mosaics/*' .")

        # now go through all archived and completed fields and make sure they're in the DR2 directory


    with SurveysDB() as sdb:
        sdb.cur.execute('select * from fields where status="Archived" or status="Complete" order by ra')
        result=sdb.cur.fetchall()