############# if __name__ == '__main__': parser = OptionParser() parser.add_option("-c", "--config", dest="inputfile", default="", help="Input parameter file [default: %default]") (options, args) = parser.parse_args() if (options.inputfile == ''): inputPars = parset.ParameterSet() elif (not os.path.exists(options.inputfile)): logging.warning( "Config file %s does not exist! Using default parameter values." % options.inputfile) inputPars = parset.ParameterSet() else: inputPars = parset.ParameterSet(options.inputfile).Eval sourceCatFile = inputPars.get_value('sourceCatalogue', '') if (sourceCatFile == ''): logging.error( 'Eval.sourceCatalogue not provided. Doing no evaluation.') exit(0) if (not os.access(sourceCatFile, os.F_OK)): logging.error(
if __name__ == '__main__': parser = OptionParser() parser.add_option("-i", "--inputs", dest="inputfile", default="createSubLists.in", help="Input parameter file [default: %default]") (options, args) = parser.parse_args() if (not os.path.exists(options.inputfile)): print "Input file %s does not exist!" % options.inputfile exit(1) inparams = parset.ParameterSet(options.inputfile).createSubs if ('catfilename' not in inparams): print "%s has not specified the catalogue filename via the catfilename parameter.\nExiting\n" % options.inputfile exit(1) doAnnFile = inparams.get_value('flagAnnotation', True) doPtsOnly = inparams.get_value('flagPointSources', False) thresh = inparams.get_value('thresholds', [0.]) print "thresholds=", thresh radii = inparams.get_value('radii', []) print "radii=", radii catfilename = inparams.get_value('catfilename') racentre = inparams.get_value('racentre', 187.5) deccentre = inparams.get_value('deccentre', -45.) destDir = inparams.get_value('destDir', '.')
if __name__ == '__main__': # Read the Parameter set - this is given with the -c command-line flag parser = OptionParser() parser.add_option("-c", "--config", dest="inputfile", default="", help="Input parameter file [default: %default]") (options, args) = parser.parse_args() if (options.inputfile == ''): inputPars = parset.ParameterSet() elif (not os.path.exists(options.inputfile)): logging.warning( "Config file %s does not exist! Using default parameter values." % options.inputfile) inputPars = parset.ParameterSet() else: inputPars = parset.ParameterSet(options.inputfile).makeThumbnail # Read the parameters from the Parameter Set. These are the # user-configurable parameters that determine the data we want to # plot and various options. fitsim = inputPars.get_value('image', '') weightsim = inputPars.get_value('weights', '') zmin = inputPars.get_value('zmin', -10.) zmax = inputPars.get_value('zmax', 40.)
############ if __name__ == '__main__': parser = OptionParser() parser.add_option("-i", "--inputs", dest="inputfile", default="", help="Input parameter file [default: %default]") (options, args) = parser.parse_args() if (options.inputfile == ''): print "No parset given: using default values for all parameters." inputPars = parset.ParameterSet() elif (not os.path.exists(options.inputfile)): print "Input file %s does not exist!\nUsing default parameter values." % options.inputfile inputPars = parset.ParameterSet() else: print "Using parset %s to obtain parameters." % options.inputfile inputPars = parset.ParameterSet(options.inputfile).createSKADS catSource = inputPars.get_value('catSource', 'SKADS') if (catSource != 'SKADS'): # Leave open the possibility for alternative sources. print "Can only accept 'SKADS' as a value for 'catSource'.\nExiting.\n" exit(1) makeImage = inputPars.get_value("makeImage", True) queryDatabase = inputPars.get_value("queryDatabase", True)
############ if __name__ == '__main__': parser = OptionParser() parser.add_option("-i", "--inputs", dest="inputfile", default="", help="Input parameter file [default: %default]") (options, args) = parser.parse_args() if (options.inputfile == ''): print "No parset given: using default values for all parameters." inputPars = parset.ParameterSet() elif (not os.path.exists(options.inputfile)): print "Input file %s does not exist!\nUsing default parameter values." % options.inputfile inputPars = parset.ParameterSet() else: print "Using parset %s to obtain parameters." % options.inputfile inputPars = parset.ParameterSet(options.inputfile).convolveModel doSublists = inputPars.get_value("doSublists", True) makeImage = inputPars.get_value("makeImage", True) doAnalysis = inputPars.get_value("doAnalysis", True) addNoise = inputPars.get_value("addNoise", True) testMode = inputPars.get_value("testMode", False) doConvolution = inputPars.get_value("doConvolution", True) numNodes = inputPars.get_value("numNodes", 1) useE2E = inputPars.get_value("useE2E", False)