if abs(seg) > 2000: longLen += abs(seg) longNum += 1 print "For ifo %s there is %d seconds of data in %d segments, %d seconds (%d unique segments) in segments longer than 500s and %d seconds (%d unique segments) longer than 2000s." % ( ifo, fullLen, fullNum, shortLen, shortNum, longLen, longNum) scienceSegs, segsList = _workflow.setup_segment_generation(workflow, segDir) segment_report(scienceSegs) print print print "RUNNING DATAFIND" datafinds, scienceSegs = _workflow.setup_datafind_workflow( workflow, scienceSegs, dfDir, segsList) # This is needed to know what times will be analysed by daily ahope # Template bank stuff banks = _workflow.setup_tmpltbank_workflow(workflow, scienceSegs, datafinds, dfDir) # Do matched-filtering insps = _workflow.setup_matchedfltr_workflow(workflow, scienceSegs, datafinds, banks, dfDir) # Now construct the summary XML file outdoc = ligolw.Document() outdoc.appendChild(ligolw.LIGO_LW()) # FIXME: PROGRAM NAME and dictionary of opts should be variables defined up above proc_id = ligolw_process.register_to_xmldoc(outdoc, 'dayhopetest',
shortNum+=1 if abs(seg) > 2000: longLen+=abs(seg) longNum+=1 print "For ifo %s there is %d seconds of data in %d segments, %d seconds (%d unique segments) in segments longer than 500s and %d seconds (%d unique segments) longer than 2000s." %(ifo, fullLen, fullNum, shortLen, shortNum, longLen, longNum) scienceSegs, segsList = _workflow.setup_segment_generation(workflow, segDir) segment_report(scienceSegs) print print print "RUNNING DATAFIND" datafinds, scienceSegs = _workflow.setup_datafind_workflow(workflow, scienceSegs, dfDir, segsList) # This is needed to know what times will be analysed by daily ahope # Template bank stuff banks = _workflow.setup_tmpltbank_workflow(workflow, scienceSegs, datafinds, dfDir) # Do matched-filtering insps = _workflow.setup_matchedfltr_workflow(workflow, scienceSegs, datafinds, banks, dfDir) # Now construct the summary XML file outdoc = ligolw.Document() outdoc.appendChild(ligolw.LIGO_LW()) # FIXME: PROGRAM NAME and dictionary of opts should be variables defined up above proc_id = ligolw_process.register_to_xmldoc(outdoc, 'dayhopetest',
segment_report(scienceSegs) print "STARTING DF" print # Start with SYR comparison # FIXME: Used to use deecopy here, but now that seems to fail so repeating # segment query calls with logging off. This may be slow! logger.disabled = True scienceSegsS, _ = _workflow.setup_segment_generation(workflow, segDir) logger.disabled = False print "RUNNING DATAFIND FOR SYR" datafinds, scienceSegsS = _workflow.setup_datafind_workflow(workflow, scienceSegsS, dfDirSYR, segsList, tag="SYR") segment_report(scienceSegsS) print print print "RUNNING DATAFIND FOR CIT" logger.disabled = True scienceSegsC, _ = _workflow.setup_segment_generation(workflow, segDir) logger.disabled = False datafinds, scienceSegsC = _workflow.setup_datafind_workflow(workflow, scienceSegsC, dfDirCIT, segsList,
longLen, longNum, ) scienceSegs, segsList = _workflow.setup_segment_generation(workflow, segDir) segment_report(scienceSegs) print print # Start with SYR comparison scienceSegsS = copy.deepcopy(scienceSegs) print "RUNNING DATAFIND FOR SYR" datafinds, scienceSegsS = _workflow.setup_datafind_workflow(workflow, scienceSegsS, dfDirSYR, segsList, tag="SYR") segment_report(scienceSegsS) print print print "RUNNING DATAFIND FOR CIT" scienceSegsC = copy.deepcopy(scienceSegs) datafinds, scienceSegsC = _workflow.setup_datafind_workflow(workflow, scienceSegsC, dfDirCIT, segsList, tag="CIT") segment_report(scienceSegsC) print "Frames present a SYR and not at CIT:" for ifo in scienceSegsS.keys(): print "For ifo", ifo if ifo in scienceSegsC.keys():
# Retrieve segments ahope-style currDir = os.getcwd() segDir = os.path.join(currDir, "segments") sciSegs, segsFileList = _workflow.setup_segment_generation(wflow, segDir) # Make coherent network segments onSrc, sciSegs = _workflow.get_triggered_coherent_segment(wflow, segDir, sciSegs) # FIXME: The following two lines are/were crude hacks. ifo = sciSegs.keys()[0] wflow.analysis_time = sciSegs[ifo][0] # Datafind dfDir = os.path.join(currDir, "datafind") datafind_files, sciSegs = _workflow.setup_datafind_workflow(wflow, sciSegs, dfDir, segsFileList) all_files.extend(datafind_files) # Template bank and splitting the bank # TODO: Move from pregenerated to generated coherent network bank bank_files = _workflow.setup_tmpltbank_workflow(wflow, sciSegs, datafind_files, dfDir) splitbank_files = _workflow.setup_splittable_workflow(wflow, bank_files, dfDir) all_files.extend(bank_files) all_files.extend(splitbank_files) # Injections """ injDir = os.path.join(currDir, "inj_files") inj_files, inj_tags = ahope.setup_injection_workflow(wflow,