longLen = 0 longNum = 0 for ifo in sSegs.keys(): for seg in sSegs[ifo]: fullLen += abs(seg) fullNum += 1 if abs(seg) > 500: shortLen+=abs(seg) 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
longNum = 0 for ifo in sSegs.keys(): for seg in sSegs[ifo]: fullLen += abs(seg) fullNum += 1 if abs(seg) > 500: shortLen += abs(seg) 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
if not os.path.exists(runDir): os.makedirs(runDir) os.chdir(runDir) # Hack to set start and end times based on maximum allowed duration start = int(wflow.cp.get('workflow', 'trigger-time')) - int(wflow.cp.get( 'workflow-exttrig_segments', 'max-duration')) end = int(wflow.cp.get('workflow', 'trigger-time')) + int(wflow.cp.get( 'workflow-exttrig_segments', 'max-duration')) wflow.cp.set('workflow', 'start-time', str(start)) wflow.cp.set('workflow', 'end-time', str(end)) # 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)