Esempio n. 1
0
  raise

##############################################################################
# set up the analysis directory
analysisDirectory = str(opts.gps_start_time) + "-" + str(opts.gps_end_time)
inspiralutils.mkdir(analysisDirectory)

# copy the ini file into the directory
shutil.copy( opts.config_file, analysisDirectory )
opts.config_file = opts.config_file.split("/")[-1]

os.chdir(analysisDirectory)
inspiralutils.mkdir("logs")

# parse the ini file:
cp = dcConfigParser()
cp.read(opts.config_file)

# set gps start and end times in the cp object.
cp.set("input", "gps-start-time", str(opts.gps_start_time) )
cp.set("input", "gps-end-time", str(opts.gps_end_time) )
cp.set("input", "output-path", str(opts.node_access_path) )
cp.set("input", "username", str(opts.username) )

# Check for --disable-dag-categories
opts.do_dag_categories = not cp.has_option(
              "hipe-arguments","disable-dag-categories")

# Tell matplotlib to put its cache files in the the local dir
cp.set("pipeline", "matplotlibdir", opts.node_local_dir )
options, filenames = parse_command_line()

###############################################################################
#
# CREATE DAG
#
###############################################################################

# READ IN CONFIGPARSER
try:
    os.mkdir("logs")
except:
    pass

# read config file
cp = dcConfigParser()
cp.read(options.config_file)

# CREATE TOP LEVEL DAG AND JOBS
dag = bank_DAG(options.user_tag)
banksimJob = BankSimJob(cp)
plotsimJob = PlotSimJob(cp)

# for each injection run and every subbank, perform a banksim
for inj_run in cp.options("injections"):
    # set up inspinj jobs
    # each option in the [injections] section is a separate injection run
    # the inspinj section sets options that are common to all injection runs
    injperjob = int(cp.get("sbank_pipe", "injections-per-job"))
    njobs = int(cp.get("sbank_pipe", "jobs"))
Esempio n. 3
0
  ext_table = lsctables.ExtTriggersTable.get_table(xmldoc)
  grb_time  = ext_table[0].start_time
  grb_name  = os.path.basename(opts.grb_file)[3:-4]
  grb_ra    = ext_table[0].event_ra
  grb_dec   = ext_table[0].event_dec
else:
  grb_name = opts.name[0]
  grb_time = int(opts.time)
  grb_ra   = float(opts.ra)
  grb_dec  = float(opts.dec)

exttrig_config_file, grb_ifolist, onSourceSegment, offSourceSegment = exttrig_dataquery.exttrig_dataquery(grb_name, grb_time, grb_ra, grb_dec, opts.offset, opts.config_file, opts.extend, opts.useold, opts.make_plots, opts.make_xml)

##############################################################################
# create the config parser object and exttrig_dataquery ini file
cp = dcConfigParser()
cp.read(exttrig_config_file)

ext_trigs = grbsummary.load_external_triggers('grb%s.xml'%opts.name[0])

if ext_trigs is None:
  print("No external triggers found.  Nothing to do.", file=sys.stderr)
  sys.exit()

if len(opts.name) > 0:
  temp_list = filter(lambda row: row.event_number_grb in opts.name, ext_trigs)
  ext_trigs = table.new_from_template(ext_trigs)
  ext_trigs.extend(temp_list)

  if len(ext_trigs) != len(opts.name):
    missing = set(opts.name) - set([row.event_number_grb for row in ext_trigs])