コード例 #1
0
                        help='Apply scale factor from quality database')
    parser.add_argument('--save-header',
                        dest='save_header',
                        action='store_true',
                        help='Save the mosaic header')
    parser.add_argument('mospointingname',
                        type=str,
                        help='Mosaic central pointing name')
    parser.add_argument('--ignorepointings',
                        type=str,
                        default='',
                        help='Pointings to ignore')

    args = parser.parse_args()
    mospointingname = args.mospointingname
    pointingdict = read_pointingfile()
    ignorepointings = args.ignorepointings

    if args.do_vlow:
        fname = 'image_full_vlow_nocut_m.int.restored.fits'
        args.no_highres = True
    else:
        fname = 'image_full_ampphase_di_m.NS_shift.int.facetRestored.fits'

    print('Now searching for results directories')
    cwd = os.getcwd()

    # find what we need to put in the mosaic
    mosaicpointings, mosseps = find_pointings_to_mosaic(
        pointingdict, mospointingname)
    if ignorepointings != '':
コード例 #2
0
    hdu[0].data[np.sqrt(xv**2.0+yv**2.0)>himsize]=np.nan
    hdu.writeto(imname.replace('.fits','-blanked.fits'), clobber=True)

if __name__=='__main__':
    parser = argparse.ArgumentParser(description='Mosaic LoTSS pointings')
    parser.add_argument('--directories', metavar='D', nargs='+',
                        help='directories to search for pipeline output')
    parser.add_argument('--astromap_blank', dest='astromap_blank', default=0.5, help='Acceptable astrometry error in arcsec')
    parser.add_argument('--beamcut', dest='beamcut', default=0.3, help='Beam level to cut at')
    parser.add_argument('--no-check',dest='no_check', action='store_true', help='Do not check for missing images')
    parser.add_argument('--do-lowres',dest='do_lowres', action='store_true', help='Mosaic low-res images as well')
    parser.add_argument('mospointingname', type=str, help='Mosaic central pointing name')
    
    args = parser.parse_args()
    mospointingname = args.mospointingname
    pointingdict = read_pointingfile()

    print 'Now searching for results directories'
    cwd=os.getcwd()

    # find what we need to put in the mosaic
    mosaicpointings,mosseps = find_pointings_to_mosaic(pointingdict,mospointingname)

    maxsep=np.max(mosseps)
    # now find whether we have got these pointings somewhere!
    mosaicdirs=[]
    missingpointing = False
    sdb = SurveysDB()
    for p in mosaicpointings:
        print 'Wanting to put pointing %s in mosaic'%p
        
コード例 #3
0
                        help='Do not check for missing images')
    parser.add_argument('--do-lowres',
                        dest='do_lowres',
                        action='store_true',
                        help='Mosaic low-res images as well')
    parser.add_argument('pointingfile',
                        type=str,
                        help='LoTSS pointing progress file')
    parser.add_argument('mospointingname',
                        type=str,
                        help='Mosaic central pointing name')

    args = parser.parse_args()
    pointingfilename = args.pointingfile
    mospointingname = args.mospointingname
    pointingdict = read_pointingfile(pointingfilename)
    print 'Now searching for results directories'

    cwd = os.getcwd()
    # basic process pinched from plot_dir_pos
    results = []
    for d in args.directories:
        os.chdir(d)
        mss = glob.glob('*.ms')
        if len(mss) > 0:
            name, ra, dec = getpos(mss[1])
            results.append([d, name, ra, dec])
        else:
            ims = glob.glob(
                'image_full_ampphase1m_shift.int.facetRestored.fits')
            if len(ims) > 0: