Example #1
0
def get_flist(run):
    import glob
    fs=shapesim.get_default_fs()
    f=shapesim.get_output_url(run, 0, 0, itrial=0, fs=fs)
    d=os.path.dirname(f)

    if 'ngmix' in run:
        flist=glob.glob(d+'/*.fits')
    else:
        flist=glob.glob(d+'/*.rec')
    return flist
Example #2
0
def check_is2n(run, is2n, flist, full=False):
    fs=get_default_fs()
    c = read_config(run)

    npair,nsplit = get_npair_nsplit(c, is2n)
    ntot=npair*2

    for isplit in xrange(nsplit):
        f=get_output_url(run, 0, is2n, itrial=isplit, fs=fs)

        if f not in flist:
            print 'missing:',f
            continue

        if full:
            t=None
            try:
                t=eu.io.read(f)
            except:
                print 'failed to read:',f

            if t is not None:
                if t.size != ntot:
                    print "expected %d, got %d" % (npair,t.size)