示例#1
0
    (default_gticut, grb_gticut, sun_gticut, sfr_gticut),
}

filter_expr = []
for t in args.filter.split(','):

    filter_expr.append(filters[t])

#mktime_filter = filters[args.filter]
mktime_filter = '&&'.join(filter_expr)

if args.outdir is not None:
    args.outdir = os.path.abspath(args.outdir)

if not args.queue is None:
    dispatch_jobs(os.path.abspath(__file__), args.files, args, args.queue)
    sys.exit(0)

for f in args.files:

    if args.outdir is not None:
        outfile = os.path.basename(f)
        outfile = os.path.join(args.outdir, outfile)
    elif args.output is None:

        m = re.search('(.+)\.fits?', f)
        if not m is None:
            outfile = m.group(1) + '_sel.fits'
        else:
            outfile = os.path.splitext(f)[0] + '_sel.fits'
    else:
示例#2
0
parser.add_argument('--dict_file', default = None,
                    required=True,
                    help = 'Set the file that defines the mapping from Merit '
                    'to FT1 variables.')

parser.add_argument('--outdir', default = None,
                    help = 'Set the output directory.')

parser.add_argument('--queue', default = None,
                    help='Set the batch queue name.')

args = parser.parse_args()

if not args.queue is None:
    dispatch_jobs(os.path.abspath(__file__),args.files,args,args.queue)
    sys.exit(0)

xml_classifier = os.path.abspath(args.xml_classifier)
dict_file = os.path.abspath(args.dict_file)

outdir = None
if args.outdir is not None:
    outdir = os.path.abspath(args.outdir)

input_files = []
for x in args.files: input_files.append(os.path.abspath(x))

cwd = os.getcwd()
user = os.environ['USER']
tmpdir = tempfile.mkdtemp(prefix=user + '.', dir='/scratch')
示例#3
0
#parser.add_argument("-q", "--quiet", action="store_true", dest="quiet", 
#                  help="do not log to console")

parser.add_argument('--W', default = None,
                    help='Set the batch time.')

LTCubeTask.add_arguments(parser)

args = parser.parse_args()

if len(args.files) < 1:
    parser.error("At least one argument required.")

if not args.W is None:
    dispatch_jobs(os.path.abspath(__file__),args.files,args,W=args.W)
    sys.exit(0)
 
for f in args.files:

    f = os.path.abspath(f)
    
    if args.output is None:

#        m = re.search('(.+)_ft1(.*)\.fits?',f)
#        if not m is None:
#            outfile = m.group(1) + '_gtltcube.fits'
#        else:
        outfile = os.path.splitext(f)[0] + '_gtltcube_z%03.f.fits'%(args.zmax)
    else:
        outfile = args.output
示例#4
0
                  type='string',help='Set the name of the phase column.')
                  
(opts, args) = parser.parse_args()

if opts.par_file is None:
    print 'No par file.'
    sys.exit(1)

if opts.ft2_file is None:
    print 'No FT2 file.'
    sys.exit(1)


if not opts.queue is None:
    
    dispatch_jobs(os.path.abspath(__file__),args,opts)
#    for x in args:
#        cmd = 'run_tempo.py %s '%(x)
        
#        for k, v in opts.__dict__.iteritems():
#            if not v is None and k != 'batch': cmd += ' --%s=%s '%(k,v)

#        print 'bsub -q %s -R rhel60 %s'%(opts.queue,cmd)
#        os.system('bsub -q %s -R rhel60 %s'%(opts.queue,cmd))

    sys.exit(0)
    
par_file = os.path.abspath(opts.par_file)
ft2_file = os.path.abspath(opts.ft2_file)
    
input_files = []
示例#5
0
                  type='string',
                  help='Set the name of the phase column.')

(opts, args) = parser.parse_args()

if opts.par_file is None:
    print 'No par file.'
    sys.exit(1)

if opts.ft2_file is None:
    print 'No FT2 file.'
    sys.exit(1)

if not opts.queue is None:

    dispatch_jobs(os.path.abspath(__file__), args, opts)
    #    for x in args:
    #        cmd = 'run_tempo.py %s '%(x)

    #        for k, v in opts.__dict__.iteritems():
    #            if not v is None and k != 'batch': cmd += ' --%s=%s '%(k,v)

    #        print 'bsub -q %s -R rhel60 %s'%(opts.queue,cmd)
    #        os.system('bsub -q %s -R rhel60 %s'%(opts.queue,cmd))

    sys.exit(0)

par_file = os.path.abspath(opts.par_file)
ft2_file = os.path.abspath(opts.ft2_file)

input_files = []