rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
def overwrite_config(self,config):
def overwrite_config(self,config,cp):
def overwrite_config(self,config): for section in config.sections(): if not cp.has_section(section): cp.add_section(section) for option in config.options(section): cp.set(section,option,config.get(section,option))
7b60b47b4fbaad3d8fa52b8e122b7a950318aa85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/7b60b47b4fbaad3d8fa52b8e122b7a950318aa85/stfu_pipe.py
background_livetime.setdefault(key, {})
background_livetime.setdefault(key, {})
def background_livetime_nonring_by_slide(connection, seglists, veto_segments=None, verbose = False): # get the segment lists and live time # FIXME veto segments not handled yet zero_lag_time_slides, background_time_slides = SnglBurstUtils.get_time_slides(connection) instruments = frozenset(seglists.keys()) background_l...
984bfa56027244d27961ec99decc1b622744e8bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/984bfa56027244d27961ec99decc1b622744e8bd/farutils.py
offset_vectors = db_thinca_rings.get_background_offset_vectors(connection)
offset_vectors = db_thinca_rings.get_background_offset_vectors(connection)
def background_livetime_ring_by_slide(connection, live_time_program, seglists, veto_segments, verbose = False): background_livetime = {} instruments = frozenset(seglists.keys()) offset_vectors = db_thinca_rings.get_background_offset_vectors(connection) # first work out time slide live time for on_instruments, livetimes...
984bfa56027244d27961ec99decc1b622744e8bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/984bfa56027244d27961ec99decc1b622744e8bd/farutils.py
else:
else:
def playground_nonplayground_livetime(seglists, playground_segs=None, verbose=False): playground_livetime = {} nonplayground_livetime = {} instruments = frozenset(seglists.keys()) for on_inst, off_inst in detector_combos(list(instruments)): on_inst = frozenset(on_inst) off_inst = frozenset(off_inst) key = lsctables.ifo...
984bfa56027244d27961ec99decc1b622744e8bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/984bfa56027244d27961ec99decc1b622744e8bd/farutils.py
def get_veto_segments(connection, program_name, veto_segments_name=None): veto_segments = segments.segmentlistdict() #FIXME only handles thinca case if not veto_segments_name: return veto_segments if program_name == "thinca": veto_segments = db_thinca_rings.get_veto_segments(connection, veto_segments_name) return veto_...
984bfa56027244d27961ec99decc1b622744e8bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/984bfa56027244d27961ec99decc1b622744e8bd/farutils.py
def get_segments(connection, xmldoc, program_name):
def get_segments(connection, xmldoc, program_name):
def get_segments(connection, xmldoc, program_name): seglists = segments.segmentlistdict() if program_name == "thinca": seglists = db_thinca_rings.get_thinca_zero_lag_segments(connection, program_name) if program_name == "gstlal_inspiral": seglists = llwapp.segmentlistdict_fromsearchsummary(xmldoc, program_name).coalesc...
984bfa56027244d27961ec99decc1b622744e8bd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/984bfa56027244d27961ec99decc1b622744e8bd/farutils.py
if program_name == "thinca":
if program_name == "thinca":
def get_segments(connection, xmldoc, program_name): seglists = segments.segmentlistdict() if program_name == "thinca": seglists = db_thinca_rings.get_thinca_zero_lag_segments(connection, program_name) if program_name == "gstlal_inspiral" or program_name == "lalapps_ring": seglists = llwapp.segmentlistdict_fromsearchsum...
b1497fc0da111e4d5c79a92b091f6259f9f9d0f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/b1497fc0da111e4d5c79a92b091f6259f9f9d0f5/farutils.py
if program_name == "thinca":
if program_name == "thinca":
def get_background_livetime_by_slide(connection, program_name, seglists, veto_segments=None, verbose = False): if program_name == "thinca": return background_livetime_ring_by_slide(connection, program_name, seglists, veto_segments, verbose) if program_name == "gstlal_inspiral": return background_livetime_nonring_by_s...
b1497fc0da111e4d5c79a92b091f6259f9f9d0f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/b1497fc0da111e4d5c79a92b091f6259f9f9d0f5/farutils.py
if dY>=0 and dX>=0:
if dY>=0 and dX>0:
def scatterPointer(A=None,B=None): """ Expects two ordered pairs as tuples (x1,y1) and (x2,y2)... Then this defines an angle. From this angle we orient a triangle point and return this as a tuple of requested size. This can be plotted by the scatter plot to point in a particular orientation. The direction right(0,0)->...
71dea064b0b5c449f3e842ab7b29e96c4c6c42a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/71dea064b0b5c449f3e842ab7b29e96c4c6c42a0/followupPDSurface.py
elif dY>=0 and dX<0:
elif dY>0 and dX<0:
def scatterPointer(A=None,B=None): """ Expects two ordered pairs as tuples (x1,y1) and (x2,y2)... Then this defines an angle. From this angle we orient a triangle point and return this as a tuple of requested size. This can be plotted by the scatter plot to point in a particular orientation. The direction right(0,0)->...
71dea064b0b5c449f3e842ab7b29e96c4c6c42a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/71dea064b0b5c449f3e842ab7b29e96c4c6c42a0/followupPDSurface.py
qscanList = stfu_pipe.getParamsFromCache(eval("opts.qscan_cache_" + type_string),type)
qscanList = getParamsFromCache(eval("opts.qscan_cache_" + type_string),type)
def getQscanTable(opts,type): summary = readSummaryFiles() if "FG" in type: type_string = "foreground" elif "BG" in type: type_string = "background" if eval("opts.qscan_cache_" + type_string): qscanList = stfu_pipe.getParamsFromCache(eval("opts.qscan_cache_" + type_string),type) else: try: inputPath = eval("opts." +...
6c15368b6ad90ea664a08bf234347a0623f88dd1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/6c15368b6ad90ea664a08bf234347a0623f88dd1/analyseQscan.py
candidates_path = stfu_pipe.getParamsFromCache(opts.qscan_cache_foreground,type,ifo,time_string)
candidates_path = getParamsFromCache(opts.qscan_cache_foreground,type,ifo,time_string)
def plotHistogram(chan,opts,distribution,histoList,binList,percentiles=None,candidate=None,candidateRank=None): parameter = distribution.split('-')[0] step = binList[1] - binList[0] counter = sum(histoList) xlimInf = min(binList) if candidate and not parameter == 'dt': xlimSup = max(max(binList),candidate + 2.0) els...
6c15368b6ad90ea664a08bf234347a0623f88dd1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/6c15368b6ad90ea664a08bf234347a0623f88dd1/analyseQscan.py
(home_dirs()+"/romain/followupbackgrounds/omega/VSR1b/background/background_937800015_947260815.cache",935798415,999999999,"V1")
(home_dirs()+"/romain/followupbackgrounds/omega/VSR2b/background/background_937800015_947260815.cache",935798415,999999999,"V1")
def figure_out_cache(time,ifo): cacheList=( (home_dirs()+"/romain/followupbackgrounds/omega/S5/background/background_815155213_875232014.cache",815155213,875232014,"H1H2L1"), (home_dirs()+"/romain/followupbackgrounds/omega/S6a/background/background_931035296_935798415.cache",931035296,935798415,"H1L1"), (home_dirs()+"...
36b5f346a1285454dead31b4a96c8fd1b915c75e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/36b5f346a1285454dead31b4a96c8fd1b915c75e/stfu_pipe.py
if not "PEM" in myFile.upper() or not "SEI" in myFile.upper():
if not "PEM" in myFile.upper() and not "SEI" in myFile.upper():
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.ex...
cbc084e72f1d0360518f22a7f3c9a446ee6b9597 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/cbc084e72f1d0360518f22a7f3c9a446ee6b9597/makeCheckListWiki.py
if not "PEM" in chan[0] or not "SEI" in chan[0]:
if not "PEM" in chan[0] and not "SEI" in chan[0]:
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.ex...
cbc084e72f1d0360518f22a7f3c9a446ee6b9597 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/cbc084e72f1d0360518f22a7f3c9a446ee6b9597/makeCheckListWiki.py
if not "PEM" in myFile.upper() or not "SEI" in myFile.upper():
if not "PEM" in myFile.upper() and not "SEI" in myFile.upper():
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.ex...
cbc084e72f1d0360518f22a7f3c9a446ee6b9597 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/cbc084e72f1d0360518f22a7f3c9a446ee6b9597/makeCheckListWiki.py
if not "PEM" in chan[0] or not "SEI" in chan[0]:
if not "PEM" in chan[0] and not "SEI" in chan[0]:
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.ex...
cbc084e72f1d0360518f22a7f3c9a446ee6b9597 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/cbc084e72f1d0360518f22a7f3c9a446ee6b9597/makeCheckListWiki.py
if param == 'channel-name': self.inputIfo = value[0:2]
def __init__(self, dag, job, cp, opts, sngl, frame_cache, chia, tag, p_nodes=[]):
d325638d5883c55a86c6d818516ac39834e51897 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/d325638d5883c55a86c6d818516ac39834e51897/stfu_pipe.py
y.segment_def_cdb = x.creator_db AND \ NOT (y.start_time > %s OR %s > y.end_time) ) \
y.segment_def_cdb = x.creator_db) AND \ NOT (segment.start_time > %s OR %s > segment.end_time) \ ORDER BY segment.start_time,segment_definer.segment_def_id,segment_definer.version \
def getSciSegs(ifo=None, gpsStart=None, gpsStop=None, cut=bool(False), serverURL=None, segName="DMT-SCIENCE", seglenmin=None, segpading=0
004064fa84713449124d61120aa5c8e5485f6a32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/004064fa84713449124d61120aa5c8e5485f6a32/fu_utils.py
def figure_out_site(ifo): siteDico = {"H1":"LHO","H2":"LHO","L1":"LLO","V1":"Virgo"} if ifo in siteDico: return siteDico[ifo] else: print >> sys.stderr, "ifo " + ifo + "is not defined in siteDico dictionary" sys.exit(1)
def figure_out_site(ifo): siteDico = {"H1":"LHO","H2":"LHO","L1":"LLO","V1":"Virgo"} if ifo in siteDico: return siteDico[ifo] else: print >> sys.stderr, "ifo " + ifo + "is not defined in siteDico dictionary" sys.exit(1)
e2dc9e6f28a444ec4f2da4703f91c6fbcf13c716 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/e2dc9e6f28a444ec4f2da4703f91c6fbcf13c716/stfu_pipe.py
preString = "omega/" + science_run(time).upper() + "/background/" + figure_out_site(ifo)
preString = "omega/" + science_run(time).upper() + "/background"
def __init__(self, dag, job, cp, opts, time, ifo, frame_cache, p_nodes=[], type="ht", variety="fg"): """ """ pipeline.CondorDAGNode.__init__(self,job)
e2dc9e6f28a444ec4f2da4703f91c6fbcf13c716 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/e2dc9e6f28a444ec4f2da4703f91c6fbcf13c716/stfu_pipe.py
preString = "omega/" + science_run(time).upper() + "/background/" + figure_out_site(ifo)
preString = "omega/" + science_run(time).upper() + "/background"
def __init__(self, dag, job, cp, opts, time, ifo, p_nodes=[], type="ht", variety="fg"):
e2dc9e6f28a444ec4f2da4703f91c6fbcf13c716 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/e2dc9e6f28a444ec4f2da4703f91c6fbcf13c716/stfu_pipe.py
self.output_cache = lal.CacheEntry(ifo, job.name.replace("remoteScan_"+job.tag_base+".sh","wpipeline").upper(), segments.segment(float(time), float(time)), "file://localhost/"+self.output_path+"/"+str(time))
self.output_cache = lal.CacheEntry(ifo, job.name.replace("remoteScan_"+job.dir+"_"+job.tag_base+".sh","wpipeline").upper(), segments.segment(float(time), float(time)), "file://localhost/"+self.output_path+"/"+str(time))
def __init__(self, dag, job, cp, opts, time, ifo, p_nodes=[], type="ht", variety="fg"):
6884188606907c9024f1a09cc6edf00edd0e1b24 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/6884188606907c9024f1a09cc6edf00edd0e1b24/stfu_pipe.py
segment_definer AS x WHERE x.name = segment_definer.name )\
segment_definer AS x, segment AS y \ WHERE x.name = segment_definer.name AND \ x.segment_def_id = y.segment_def_id AND \ y.segment_def_cdb = x.creator_db AND \ NOT (y.start_time > %s OR %s > y.end_time) ) \
def getSciSegs(ifo=None, gpsStart=None, gpsStop=None, cut=bool(False), serverURL=None, segName="DMT-SCIENCE", seglenmin=None, segpading=0
2252f2f371563ffdf057796feb15c154dc80b916 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/2252f2f371563ffdf057796feb15c154dc80b916/fu_utils.py
sqlQuery=query01%(segName,ifo,gpsStop,gpsStart)
sqlQuery=query01%(segName,ifo,gpsStop,gpsStart,gpsStop,gpsStart)
def getSciSegs(ifo=None, gpsStart=None, gpsStop=None, cut=bool(False), serverURL=None, segName="DMT-SCIENCE", seglenmin=None, segpading=0
2252f2f371563ffdf057796feb15c154dc80b916 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/2252f2f371563ffdf057796feb15c154dc80b916/fu_utils.py
def __init__(self,fStructure=None,myCoinc=None): if fStructure==None or myCoinc==None: print "Given None Types FS:%s Coinc:%s"%(type(fStructure),type(myCoinc)) return None else: self.fsys=fStructure self.coinc=myCoinc
3e6e8bbd837c63c0eef55b1609ca590b8fd82088 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3e6e8bbd837c63c0eef55b1609ca590b8fd82088/makeCheckListWiki.py
if not sngl.ifo in frametype: frametype = sngl.ifo + "_" + frametype
frametype=__patchFrameTypeDef__(frametype,sngl.ifo,sngl.time)
def get_RDS_R_L1(self): """ """ tmpList=list() for sngl in self.coinc.sngls: #Determine file type frametype,channelName=stfu_pipe.figure_out_type(sngl.time,sngl.ifo,'rds') if not sngl.ifo in frametype: frametype = sngl.ifo + "_" + frametype myMaskIndex="*/%s/*/%s/index.html"%(frametype,sngl.time) myMaskPNG="*/%s/*/%s/*...
3e6e8bbd837c63c0eef55b1609ca590b8fd82088 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3e6e8bbd837c63c0eef55b1609ca590b8fd82088/makeCheckListWiki.py
if not sngl.ifo in frametype: frametype = sngl.ifo + "_" + frametype
frametype=__patchFrameTypeDef__(frametype,sngl.ifo,sngl.time)
def get_RDS_R_L1_SEIS(self): """ """ tmpList=list() for sngl in self.coinc.sngls: #Determine file type frametype,channelName=stfu_pipe.figure_out_type(sngl.time,sngl.ifo,'rds') if not sngl.ifo in frametype: frametype = sngl.ifo + "_" + frametype frametype = frametype + "_SEIS" myMaskIndex="*/%s*/%s/*.html"%(frametype,s...
3e6e8bbd837c63c0eef55b1609ca590b8fd82088 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3e6e8bbd837c63c0eef55b1609ca590b8fd82088/makeCheckListWiki.py
if not sngl.ifo in frametype: frametype = sngl.ifo + "_" + frametype
frametype=__patchFrameTypeDef__(frametype,sngl.ifo,sngl.time)
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.ex...
3e6e8bbd837c63c0eef55b1609ca590b8fd82088 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3e6e8bbd837c63c0eef55b1609ca590b8fd82088/makeCheckListWiki.py
if not sngl.ifo in frametype: frametype = sngl.ifo + "_" + frametype
frametype=__patchFrameTypeDef__(frametype,sngl.ifo,sngl.time)
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.ex...
3e6e8bbd837c63c0eef55b1609ca590b8fd82088 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3e6e8bbd837c63c0eef55b1609ca590b8fd82088/makeCheckListWiki.py
sys.stdout.write("Omega scan summary file not or empty for %s. ...continuing...\n"%sngl.ifo)
sys.stdout.write("Omega scan summary file not found or seen empty for %s. ...continuing...\n"%sngl.ifo)
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.ex...
3e6e8bbd837c63c0eef55b1609ca590b8fd82088 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3e6e8bbd837c63c0eef55b1609ca590b8fd82088/makeCheckListWiki.py
if not sngl.ifo in frametype: frametype = sngl.ifo + "_" + frametype
frametype=__patchFrameTypeDef__(frametype,sngl.ifo,sngl.time)
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.ex...
3e6e8bbd837c63c0eef55b1609ca590b8fd82088 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3e6e8bbd837c63c0eef55b1609ca590b8fd82088/makeCheckListWiki.py
sys.stdout.write("Omega scan summary file not or empty for %s. ...continuing...\n"%sngl.ifo)
sys.stdout.write("Omega scan summary file not found or seen empty for %s. ...continuing...\n"%sngl.ifo)
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.ex...
3e6e8bbd837c63c0eef55b1609ca590b8fd82088 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3e6e8bbd837c63c0eef55b1609ca590b8fd82088/makeCheckListWiki.py
if not sngl.ifo in frametype: frametype = sngl.ifo + "_" + frametype
frametype=__patchFrameTypeDef__(frametype,sngl.ifo,sngl.time)
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.ex...
3e6e8bbd837c63c0eef55b1609ca590b8fd82088 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3e6e8bbd837c63c0eef55b1609ca590b8fd82088/makeCheckListWiki.py
sys.stdout.write("Omega scan summary file not or empty for %s. ...continuing...\n"%sngl.ifo)
sys.stdout.write("Omega scan summary file not found or seen empty for %s. ...continuing...\n"%sngl.ifo)
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.ex...
3e6e8bbd837c63c0eef55b1609ca590b8fd82088 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3e6e8bbd837c63c0eef55b1609ca590b8fd82088/makeCheckListWiki.py
pud=os.path.abspath(publication_directory) minFileCount=1 for key,fileList in allSources.items(): if len(fileList) > minFileCount: commonPath=os.path.commonprefix(fileList) for singleFile in fileList: if not singleFile.__contains__(pud): myDestFile=singleFile.replace(commonPath,myDestPath+"/") if not os.path.exists(os....
def __init__(self,type=None,ifo=None,time=None,snr=None,chisqr=None,mass1=None,mass2=None,mchirp=None): """ """ self.type=str(type) self.ifo=str(ifo) self.time=float(time) self.snr=float(snr) self.chisqr=float(chisqr) self.mass1=float(mass1) self.mass2=float(mass2) self.mchirp=float(mchirp)
3e6e8bbd837c63c0eef55b1609ca590b8fd82088 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3e6e8bbd837c63c0eef55b1609ca590b8fd82088/makeCheckListWiki.py
self.output_cache = lal.CacheEntry(ifonames, job.name.upper(), segments.segment(p_nodes[0].start_time,p_nodes[0].end_time), "file://localhost/"+job.output_path+"/"+self.id)
self.output_cache = lal.CacheEntry(ifonames, job.name.upper(), segments.segment(p_nodes[0].start_time,p_nodes[0].end_time), "file://localhost/"+job.outputPath+"/"+self.id)
def __init__(self,job,coinc,cp,opts,dag,ifo,ifonames,p_nodes): pipeline.CondorDAGNode.__init__(self,job)
3af1377420f931dbe3b70739b6b876a49bb02304 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3af1377420f931dbe3b70739b6b876a49bb02304/stfu_pipe.py
self.add_var_opt("findVetoes",cp.get('findVetoes','blind'))
self.add_var_opt("blind",cp.get('findVetoes','blind'))
def __init__(self, dag, job, cp, opts, coincEvent=None): """ """ self.__conditionalLoadDefaults__(findVetosNode.defaults,cp) pipeline.CondorDAGNode.__init__(self,job) self.add_var_opt("trigger-time",coincEvent.time) #Output filename oFilename="%s-findVetos_%s_%s.wiki"%(coincEvent.instruments, coincEvent.ifos, coincEven...
8870dffa3b960cf1af643c67956198c34fd107cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/8870dffa3b960cf1af643c67956198c34fd107cd/stfu_pipe.py
a list of files or an empty list if nothing found
a list of files or an empty list if nothing found. It uses the pathing information from the files passed via cacheListing to aid in our filesystem search.
def __readCache__(self,cacheListing=list()): """ Simple mehtod to read in a cache or list of cache files and return a list of files or an empty list if nothing found """ #Open the cache entry and search for those entrys fileListing=list() for entry in cacheListing: #Cache files listed themselves comment out following l...
05455322ab6b4df00c83701e9e61844538f87dd5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/05455322ab6b4df00c83701e9e61844538f87dd5/makeCheckListWiki.py
fileListing=list()
finalList=list()
def __readCache__(self,cacheListing=list()): """ Simple mehtod to read in a cache or list of cache files and return a list of files or an empty list if nothing found """ #Open the cache entry and search for those entrys fileListing=list() for entry in cacheListing: #Cache files listed themselves comment out following l...
05455322ab6b4df00c83701e9e61844538f87dd5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/05455322ab6b4df00c83701e9e61844538f87dd5/makeCheckListWiki.py
finalList=list() for thisFile in fileListing: finalList.extend(fnmatch.filter(self.fsys,"*%s"%thisFile)) if thisFile.endswith(".png"): finalList.extend(fnmatch.filter(self.fsys,"*%s"%thisFile.replace(".png","?thumb?png"))) if len(finalList) < 1: return list() else: return finalList
pathingInfo=os.path.dirname(entry) for thisFile in fileListing: finalList.extend(fnmatch.filter(self.fsys,"*%s*%s"%(pathingInfo,thisFile))) if thisFile.endswith(".png"): finalList.extend(fnmatch.filter(self.fsys,"*%s"%thisFile.replace(".png","?thumb?png"))) return finalList
def __readCache__(self,cacheListing=list()): """ Simple mehtod to read in a cache or list of cache files and return a list of files or an empty list if nothing found """ #Open the cache entry and search for those entrys fileListing=list() for entry in cacheListing: #Cache files listed themselves comment out following l...
05455322ab6b4df00c83701e9e61844538f87dd5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/05455322ab6b4df00c83701e9e61844538f87dd5/makeCheckListWiki.py
myCacheMask="*/%s-analyseQscan_%s_%s*_seis_rds*.cache"%(sngl.ifo,sngl.ifo,timeString)
myCacheMask="*%s*/%s-analyseQscan_%s_%s*_seis_rds*.cache"%\ (self.coinc.type,sngl.ifo,sngl.ifo,timeString)
def get_analyzeQscan_SEIS(self): """ This seeks out the html and png files associated with SEIS result of an analyzeQscan job. """ cacheList=list() cacheFiles=list() for sngl in self.coinc.sngls: timeString=str(float(sngl.time)).replace(".","_") myCacheMask="*/%s-analyseQscan_%s_%s*_seis_rds*.cache"%(sngl.ifo,sngl.ifo,...
05455322ab6b4df00c83701e9e61844538f87dd5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/05455322ab6b4df00c83701e9e61844538f87dd5/makeCheckListWiki.py
myCacheMask="*/%s-analyseQscan_%s_%s_rds*.cache"%(sngl.ifo,sngl.ifo,timeString)
myCacheMask="*%s*/%s-analyseQscan_%s_%s_rds*.cache"%\ (self.coint.type,sngl.ifo,sngl.ifo,timeString)
def get_analyzeQscan_RDS(self): """ """ #analyseQscan.py_FG_RDS_full_data/H1-analyseQscan_H1_931176926_116_rds-unspecified-gpstime.cache cacheList=list() cacheFiles=list() for sngl in self.coinc.sngls: timeString=str(float(sngl.time)).replace(".","_") myCacheMask="*/%s-analyseQscan_%s_%s_rds*.cache"%(sngl.ifo,sngl.ifo,...
05455322ab6b4df00c83701e9e61844538f87dd5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/05455322ab6b4df00c83701e9e61844538f87dd5/makeCheckListWiki.py
myCacheMask="*/%s-analyseQscan_%s_%s*_ht*.cache"%(sngl.ifo,sngl.ifo,timeString)
myCacheMask="*%s*/%s-analyseQscan_%s_%s*_ht*.cache"\ %(self.coinc.type,sngl.ifo,sngl.ifo,timeString)
def get_analyzeQscan_HT(self): """ """ #analyseQscan.py_FG_HT_full_data/H1-analyseQscan_H1_931176926_116_ht-unspecified-gpstime.cache cacheList=list() cacheFiles=list() for sngl in self.coinc.sngls: timeString=str(float(sngl.time)).replace(".","_") myCacheMask="*/%s-analyseQscan_%s_%s*_ht*.cache"%(sngl.ifo,sngl.ifo,tim...
05455322ab6b4df00c83701e9e61844538f87dd5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/05455322ab6b4df00c83701e9e61844538f87dd5/makeCheckListWiki.py
cellString=cellString+" %s Z-Percentage:%1.2f <<BR>> "%(myName,float(myRank))
cellString=cellString+" %s Z-Percentage:%1.2f <<BR>> "%(myName,float(myRank))
def insertAnalyzeQscanTable(self, images=None, thumbs=None, indexes=None, ranksOmega=None, imagesAQ=None, thumbsAQ=None, indexesAQ=None, ranksAQ=None): """ Insert a multiple IFO table with 5 cols with the AQ underneath this depends on the numer of IFO keys in indexes dictionary. The option channelRanks is not required ...
05455322ab6b4df00c83701e9e61844538f87dd5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/05455322ab6b4df00c83701e9e61844538f87dd5/makeCheckListWiki.py
if injection:
if injection is not None and injectionconfidence is not None and injection_area is not None:
def cbcBayesPostProc(outdir,data,oneDMenu,twoDGreedyMenu,GreedyRes,confidence_levels,twoDplots,injfile=None,eventnum=None,skyres=None,bayesfactornoise=None,bayesfactorcoherent=None): """ This is a demonstration script for using the functionality/data structures contained in pylal.bayespputils . It will produce a webpag...
3208edd14b770d206fb4669352923910659e297b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3208edd14b770d206fb4669352923910659e297b/cbcBayesPostProc.py
np.savetxt('ranked_sky_pixels',np.column_stack([np.asarray(toppoints)[:,0:1],np.asarray(toppoints)[:,1],np.asarray(toppoints)[:,3]]))
np.savetxt(os.path.join(outdir,'ranked_sky_pixels.dat'),np.column_stack([np.asarray(toppoints)[:,0:1],np.asarray(toppoints)[:,1],np.asarray(toppoints)[:,3]]))
def plotSkyMap(skypos,skyres,sky_injpoint,confidence_levels,outdir): from mpl_toolkits.basemap import Basemap from pylal import skylocutils np.seterr(under='ignore') skypoints=np.array(skylocutils.gridsky(float(skyres))) skycarts=map(lambda s: pol2cart(s[1],s[0]),skypoints) skyinjectionconfidence=None shist=skyhist...
e76da4d61e554d2a4f584e0b3fe0c166c657dc43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/e76da4d61e554d2a4f584e0b3fe0c166c657dc43/bayespputils.py
self.add_var_arg(p_nodes[1].name_output_file)
self.add_var_arg(p_nodes[1].outputFileName)
def __init__(self, dag, job, cp, opts, ifo, time, p_nodes=[], type=""):
fa29fb8697f622f96f2f3ca23d02e05a7a9c116b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/fa29fb8697f622f96f2f3ca23d02e05a7a9c116b/stfu_pipe.py
self.add_var_opt('server','ldr-bologna.phys.uwm.edu') if not(cp.has_option('fu-remote-jobs','remote-jobs') and job.name in cp.get('fu-remote-jobs','remote-jobs') and cp.has_option('fu-remote-jobs','remote-ifos') and ifo in cp.get('fu-remote-jobs','remote-ifos')) or if opts.do_remoteScans:
self.add_var_arg('--server ldr-bologna.phys.uwm.edu') if not(cp.has_option('fu-remote-jobs','remote-jobs') and job.name in cp.get('fu-remote-jobs','remote-jobs') and cp.has_option('fu-remote-jobs','remote-ifos') and ifo in cp.get('fu-remote-jobs','remote-ifos')) or opts.do_remoteScans:
def __init__(self, dag, job, cp, opts, ifo, sngl=None, qscan=False, trigger_time=None, data_type="hoft", p_nodes=[]):
fa29fb8697f622f96f2f3ca23d02e05a7a9c116b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/fa29fb8697f622f96f2f3ca23d02e05a7a9c116b/stfu_pipe.py
return map(lambda (a,b,c): detector_threshold(min_threshold,ifos,a,b,c,sensitivities), zip(RA,dec,gps_time))
return map(lambda (a,b,c): detector_thresholds(min_threshold,ifos,a,b,c,sensitivities), zip(RA,dec,gps_time))
def detector_thresholds(min_threshold, ifos, RA, dec, gps_time, sensitivities=None): """ Return a dictionary of sensitivity thresholds for each detector, based on a minimum threshold of min_threshold in the least sensitive one, for a source at position (RA,dec) specified in radians at time gps_time. Specifying a dictio...
1bfaeeea66ae8fa0e393a9c70bc7a97afcf1c0e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/1bfaeeea66ae8fa0e393a9c70bc7a97afcf1c0e7/grbsummary.py
for n, (coinc_event_id, time_slide_id) in enumerate(database.connection.cursor().execute("SELECT coinc_event_id, time_slide_id FROM coinc_event WHERE coinc_def_id == ?", (database.bb_definer_id,))): if verbose and not n % 200: print >>sys.stderr, "\t%.1f%%\r" % (100.0 * n / n_coincs), events = map(database.sngl_burst...
def get_likelihood_ratio(coinc_event_id, time_slide_id, row_from_cols = database.sngl_burst_table.row_from_cols, cursor = cursor, time_slides = time_slides, params_func = params_func, params_func_extra_args = params_func_extra_args): events = map(row_from_cols, cursor.execute("""SELECT * FROM coinc_burst_map WHERE coi...
def ligolw_burca2(database, likelihood_ratio, params_func, verbose = False, params_func_extra_args = ()): """ Assigns likelihood ratio values to excess power coincidences. database is pylal.SnglBurstUtils.CoincDatabase instance, and likelihood_ratio is a LikelihoodRatio class instance. """ # # Find document parts. # t...
62d8eeaebf6744d5295cd163dbf858f0f5487766 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/62d8eeaebf6744d5295cd163dbf858f0f5487766/ligolw_burca2.py
likelihood = ?
likelihood = likelihood_ratio(coinc_event_id, time_slide_id)
def ligolw_burca2(database, likelihood_ratio, params_func, verbose = False, params_func_extra_args = ()): """ Assigns likelihood ratio values to excess power coincidences. database is pylal.SnglBurstUtils.CoincDatabase instance, and likelihood_ratio is a LikelihoodRatio class instance. """ # # Find document parts. # t...
62d8eeaebf6744d5295cd163dbf858f0f5487766 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/62d8eeaebf6744d5295cd163dbf858f0f5487766/ligolw_burca2.py
coinc_event_id == ? """, (likelihood_ratio(params_func, events, time_slides[time_slide_id], *params_func_extra_args), coinc_event_id))
coinc_def_id == ? """, (database.bb_definer_id,))
def ligolw_burca2(database, likelihood_ratio, params_func, verbose = False, params_func_extra_args = ()): """ Assigns likelihood ratio values to excess power coincidences. database is pylal.SnglBurstUtils.CoincDatabase instance, and likelihood_ratio is a LikelihoodRatio class instance. """ # # Find document parts. # t...
62d8eeaebf6744d5295cd163dbf858f0f5487766 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/62d8eeaebf6744d5295cd163dbf858f0f5487766/ligolw_burca2.py
os.path.join("bin", "checkPerformedInjections.py")
os.path.join("bin", "pylal_cbc_select_hardware_injections")
def run(self): # remove the automatically generated user env scripts for script in ["pylal-user-env.sh", "pylal-user-env.csh"]: log.info("removing " + script ) try: os.unlink(os.path.join("etc", script)) except: pass
9f5d119d53226ed2278a91da263181b17e21d976 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/9f5d119d53226ed2278a91da263181b17e21d976/setup.py
for offset_vector in self.offset_vectors:
for offset_vector in cafepacker.offset_vectors:
def split_bins(cafepacker, extentlimit): """ Split bins of stored in CafePacker until each bin has an extent no longer than extentlimit. """ # # loop overall the bins in cafepacker.bins. we pop items out of # cafepacker.bins and append new ones to the end so need a while loop # checking the extent of each bin in cafep...
79dbe2c09c8db6036ab9d1ddc31881952e94b949 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/79dbe2c09c8db6036ab9d1ddc31881952e94b949/ligolw_cafe.py
def cbcBayesSkyRes(outdir,data,oneDMenu,twoDGreedyMenu,GreedyRes,confidence_levels,twoDplots,injfile=None,eventnum=None,skyres=None): if eventnum is not None and injfile is None: print "You specified an event number but no injection file. Ignoring!" if data is None: print 'You must specify an input data file' exit(1)...
34fbcdab39b5dd64eb9436e33810d3417fa9ff0a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/34fbcdab39b5dd64eb9436e33810d3417fa9ff0a/cbcBayesSkyRes.py
if not os.path.isdir(os.path.join(margdir,'/')): os.mkdir(margdir)
if not os.path.isdir(margdir): os.makedirs(margdir)
def cbcBayesSkyRes(outdir,data,oneDMenu,twoDGreedyMenu,GreedyRes,confidence_levels,twoDplots,injfile=None,eventnum=None,skyres=None): if eventnum is not None and injfile is None: print "You specified an event number but no injection file. Ignoring!" if data is None: print 'You must specify an input data file' exit(1)...
34fbcdab39b5dd64eb9436e33810d3417fa9ff0a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/34fbcdab39b5dd64eb9436e33810d3417fa9ff0a/cbcBayesSkyRes.py
extent = off_segs.extent()
extent = (off_segs | on_segs).extent()
def get_exttrig_trials(on_segs, off_segs, veto_files): """ Return a tuple of (off-source time bins, off-source veto mask, index of trial that is on source). The off-source veto mask is a one-dimensional boolean array where True means vetoed. @param on_segs: On-source segments @param off_segs: Off-source segments @param...
2461e7a4e48b038160a6691bf712fe38f6dc03d6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/2461e7a4e48b038160a6691bf712fe38f6dc03d6/grbsummary.py
htmlfile.write('<img src="'+paramnames[i]+'.png"><img src="'+paramnames[i]+'_samps.png><br>')
htmlfile.write('<img src="'+paramnames[i]+'.png"><img src="'+paramnames[i]+'_samps.png"><br>')
def plot2Dkernel(xdat,ydat,Nx,Ny): xax=linspace(min(xdat),max(xdat),Nx) yax=linspace(min(ydat),max(ydat),Ny) x,y=numpy.meshgrid(xax,yax) samp=array([xdat,ydat]) kde=stats.kde.gaussian_kde(samp) grid_coords = numpy.append(x.reshape(-1,1),y.reshape(-1,1),axis=1) z = kde(grid_coords.T) z = z.reshape(Nx,Ny) asp=xax.ptp()/y...
9ef32b9300fa0645ad2280fc1423c70a6b937523 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/9ef32b9300fa0645ad2280fc1423c70a6b937523/OddsPostProc.py
def append_process(xmldoc, comment = None, force = None, e_thinca_parameter = None, effective_snr_factor = None, vetoes_name = None, trigger_program = None, effective_snr = None, verbose = None):
def append_process(xmldoc, comment = None, force = None, e_thinca_parameter = None, effective_snr_factor = None, vetoes_name = None, trigger_program = None, effective_snr = None, coinc_end_time_segment = None, verbose = None):
def append_process(xmldoc, comment = None, force = None, e_thinca_parameter = None, effective_snr_factor = None, vetoes_name = None, trigger_program = None, effective_snr = None, verbose = None): process = llwapp.append_process(xmldoc, program = process_program_name, version = __version__, cvs_repository = u"lscsoft", ...
54f03c10dbd79739ae03f63f4afa9924421581c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/54f03c10dbd79739ae03f63f4afa9924421581c7/ligolw_thinca.py
coinc_inspiral.set_end(events[0].get_end() + self.time_slide_index[time_slide_id][events[0].ifo])
coinc_inspiral.set_end(coinc_inspiral_end_time(events, self.time_slide_index[time_slide_id]))
def append_coinc(self, process_id, time_slide_id, coinc_def_id, events, effective_snr_factor): # # populate the coinc_event and coinc_event_map tables #
54f03c10dbd79739ae03f63f4afa9924421581c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/54f03c10dbd79739ae03f63f4afa9924421581c7/ligolw_thinca.py
ntuple_comparefunc = lambda events, offset_vector: False,
ntuple_comparefunc = default_ntuple_comparefunc,
def ligolw_thinca( xmldoc, process_id, EventListType, CoincTables, coinc_definer_row, event_comparefunc, thresholds, ntuple_comparefunc = lambda events, offset_vector: False, effective_snr_factor = 250.0, veto_segments = None, trigger_program = u"inspiral", verbose = False
54f03c10dbd79739ae03f63f4afa9924421581c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/54f03c10dbd79739ae03f63f4afa9924421581c7/ligolw_thinca.py
self.name_output_file = job.tag_base + "-" + str(time) + ".tgz"
self.name_output_file = job.tag_base + "-" + repr(time) + ".tgz"
def __init__(self, dag, job, cp, opts, time, ifo, p_nodes=[], type="ht", variety="fg"):
619da594ba239d96b26f2677c6938af05d30c7d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/619da594ba239d96b26f2677c6938af05d30c7d5/stfu_pipe.py
return np.fmin(c, 2 * LAL_PI - c)
return np.where(c < LAL_PI, c, 2 * LAL_PI - c)
def _abs_diff(c): """ For some angular difference c = |a - b| in radians, find the magnitude of the difference, taking into account the wrap-around at 2*pi. """ c = abs(c) % (2 * LAL_PI) return np.fmin(c, 2 * LAL_PI - c)
6ecd8828f9330e75ab1e1f8568822e111e12a3a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/6ecd8828f9330e75ab1e1f8568822e111e12a3a7/sphericalutils.py
pol PDF: kappa / (2 * np.sinh(kappa)) * np.exp(kappa * np.cos(theta)) * np.sin(theta)) az PDF: uniform(0, 2*pi)
References: * http://en.wikipedia.org/wiki/Von_Mises–Fisher_distribution * http://arxiv.org/pdf/0902.0737v1 (states the Rayleigh limit)
def fisher_rvs(mu, sigma, size=1): """ Return a random (polar, azimuthal) angle drawn from the Fisher distribution. Assume that the concentration parameter (kappa) is large so that we can use a Rayleigh distribution about the north pole and rotate it to be centered at the (polar, azimuthal) coordinate mu. Assume kappa...
6ecd8828f9330e75ab1e1f8568822e111e12a3a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/6ecd8828f9330e75ab1e1f8568822e111e12a3a7/sphericalutils.py
os.path.join("bin","cbcBayesPostProc.py")
os.path.join("bin","cbcBayesPostProc.py")
def run(self): # remove the automatically generated user env scripts for script in ["pylal-user-env.sh", "pylal-user-env.csh"]: log.info("removing " + script ) try: os.unlink(os.path.join("etc", script)) except: pass
161e91c6f08914a9601fe9ae0202c014ea2e3ead /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/161e91c6f08914a9601fe9ae0202c014ea2e3ead/setup.py
if len(indexList) > 1:
if len(indexList) >= 1:
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # # Check to see if wiki file with name already exists # maxCount=0 while os.pat...
be59aad69241ec292bf7ade293713b7edd707ebd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/be59aad69241ec292bf7ade293713b7edd707ebd/makeCheckListWiki.py
cohSnrTimeTable.data[i+1][0]=wikiPage.linkedRemoteImaage(image,thumbList[i])
cohSnrTimeTable.data[i+1][0]=wikiPage.linkedRemoteImage(image,thumbList[i])
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # # Check to see if wiki file with name already exists # maxCount=0 while os.pat...
be59aad69241ec292bf7ade293713b7edd707ebd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/be59aad69241ec292bf7ade293713b7edd707ebd/makeCheckListWiki.py
os.path.join("bin", "search_upper_limit_by_s1_s2"),
os.path.join("bin", "search_upper_limit_by_s1z_s2z"), os.path.join("bin", "search_volume_by_s1z_s2z"),
def run(self): # remove the automatically generated user env scripts for script in ["pylal-user-env.sh", "pylal-user-env.csh"]: log.info("removing " + script ) try: os.unlink(os.path.join("etc", script)) except: pass
929d2991f7c185d881d52c5516071a3150c8f1d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/929d2991f7c185d881d52c5516071a3150c8f1d8/setup.py
(home_dirs()+"/romain/followupbackgrounds/omega/VSR2a/background/background_931035296_935798415.cache",931035296,935798415,"V1")
(home_dirs()+"/romain/followupbackgrounds/omega/VSR2a/background/background_931035296_935798415.cache",931035296,935798415,"V1"),
def figure_out_cache(time,ifo): cacheList=( (home_dirs()+"/romain/followupbackgrounds/omega/S5/background/background_815155213_875232014.cache",815155213,875232014,"H1H2L1"), (home_dirs()+"/romain/followupbackgrounds/omega/S6a/background/background_931035296_935798415.cache",931035296,935798415,"H1L1"), (home_dirs()+"...
1fbd9a63bfbc29e3d352ec4bfd173f723db94d72 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/1fbd9a63bfbc29e3d352ec4bfd173f723db94d72/stfu_pipe.py
self.unused_coincs = reduce(lambda a, b: a | b, (set(component.get_coincs(eventlists, event_comparefunc, thresholds, verbose = verbose)) for component in self.components)) self.unused_coincs |= reduce(lambda a, b: a & b, (component.unused_coincs for component in self.components))
for component in self.components: self.unused_coincs |= set(component.get_coincs(eventlists, event_comparefunc, thresholds, verbose = verbose)) for componenta, componentb in iterutils.choices(self.components, 2): self.unused_coincs |= componenta.unused_coincs & componentb.unused_coincs
def get_coincs(self, eventlists, event_comparefunc, thresholds, verbose = False): # # has this node already been visited? if so, return the # answer we already know #
a2cf8a396432a5bfc7cd650f2eab3c85fa0cca98 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/a2cf8a396432a5bfc7cd650f2eab3c85fa0cca98/snglcoinc.py
def __init__(self,cp,ifo):
def __init__(self,cp,ifo,timeref):
def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
8e536e7414dc65d55709c494beca16e846a79e32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/8e536e7414dc65d55709c494beca16e846a79e32/wscan_background.py
qscanConfig = string.strip(cp.get("fu-"+depQscan, depIfoIniConfig))
qscanConfig = self.fix_config_for_science_run( cp.get("fu-"+depQscan, depIfoIniConfig).strip(), timeref )
def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
8e536e7414dc65d55709c494beca16e846a79e32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/8e536e7414dc65d55709c494beca16e846a79e32/wscan_background.py
if opts.prepare_scan_ccin2p3: for ifo in cp.get("fu-remote-jobs","remote-ifos").strip().split(","): CCRemoteScans = prepareLyonRemoteScans(cp,ifo)
def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
8e536e7414dc65d55709c494beca16e846a79e32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/8e536e7414dc65d55709c494beca16e846a79e32/wscan_background.py
if ifo in cp.get("fu-remote-jobs","remote-ifos").strip().split(",") and timeListFile:
if ifo in cp.get("fu-remote-jobs","remote-ifos").strip().split(",") and timeListFile and CCRemoteScans:
def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
8e536e7414dc65d55709c494beca16e846a79e32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/8e536e7414dc65d55709c494beca16e846a79e32/wscan_background.py
if opts.prepare_scan_ccin2p3:
if opts.prepare_scan_ccin2p3 and CCRemoteScans:
def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
8e536e7414dc65d55709c494beca16e846a79e32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/8e536e7414dc65d55709c494beca16e846a79e32/wscan_background.py
frametype=__patchFrameTypeDef__(frametype,sngl.ifo,sngl.time)
def prepareChecklist(wikiFilename=None,wikiCoinc=None,wikiTree=None,file2URL=None): """ Method to prepare a checklist where data products are isolated in directory. """ endOfS5=int(875232014) wikiFileFinder=findFileType(wikiTree,wikiCoinc) # Check to see if wiki file with name already exists maxCount=0 while os.path.ex...
3adb85d7e3381c4c9163c2df8b77e17c5dc3ad81 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3adb85d7e3381c4c9163c2df8b77e17c5dc3ad81/makeCheckListWiki.py
if int(gpstime)<=endOfS5:
if int(gpstime)<=endOfS5 or ifo=="V1":
def __patchFrameTypeDef__(frametype=None,ifo=None,gpstime=None): """ Temporary patch function, to adjust specfied frame type used in searching the filesystem for files to display in followup. """ if frametype == None: raise Exception, "input to __patchFrameTypeDef__ included a \ frametype argument specified as None\n" ...
7b65b8fa263d5542a1d239309431bbd154809c05 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/7b65b8fa263d5542a1d239309431bbd154809c05/makeCheckListWiki.py
tm = date.XLALGPSToUTC(date.LIGOTimeGPS(grb.time))
tm = date.XLALGPSToUTC(LIGOTimeGPS(grb.time))
coldef = create_col(coldict['nolong'])
29a677087ea615d7fda1e08a41de088b4dcf4428 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/29a677087ea615d7fda1e08a41de088b4dcf4428/pylal_exttrig_llutils.py
if code>0:
if code>0 and len(err)>0:
def system_call(item, command, divert_output_to_log = True): """ Makes a system call. @params item: a text specifying the content of the text (e.g. number of the GRB the message is associated with) (see also 'info') @params command: the command to be executed on the bash @params divert_output_to_log: If this flag is se...
259191b48671f2f428ec82e3a4167bc190cae9f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/259191b48671f2f428ec82e3a4167bc190cae9f4/pylal_exttrig_llutils.py
output, error = internal_call(cmdtmp)
code, output, error = external_call(cmdtmp)
def make_cvs_copy(self, files, dest_dir): """ Copies all the files given in the list 'files' to dest_dir and creates a file 'cvs_versions.txt' in dest_dir containing the actual CVS version of the files @param files: list of files to be copied from self.input_dir @param dest_dir: destination directory """
259191b48671f2f428ec82e3a4167bc190cae9f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/259191b48671f2f428ec82e3a4167bc190cae9f4/pylal_exttrig_llutils.py
if cp.has_option('followup-plotmcmc','burnin'): burnin = string.strip(cp.get('followup-plotmcmc','burnin'))
if cp.has_option('fu-plotmcmc','burnin'): burnin = string.strip(cp.get('fu-plotmcmc','burnin'))
def __init__(self,job,coinc,cp,opts,dag,ifo,ifonames,p_nodes): pipeline.CondorDAGNode.__init__(self,job)
3d7082952854fb08009a737d501a6cbff1939db2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3d7082952854fb08009a737d501a6cbff1939db2/stfu_pipe.py
plot_routine = string.strip(cp.get('followup-plotmcmc','plot_routine')) executable = string.strip(cp.get('followup-plotmcmc','executable'))
plot_routine = string.strip(cp.get('fu-plotmcmc','plot_routine')) executable = string.strip(cp.get('fu-plotmcmc','executable'))
def __init__(self,job,coinc,cp,opts,dag,ifo,ifonames,p_nodes): pipeline.CondorDAGNode.__init__(self,job)
3d7082952854fb08009a737d501a6cbff1939db2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/3d7082952854fb08009a737d501a6cbff1939db2/stfu_pipe.py
def fisher_rvs(mu, sigma, size=None):
def fisher_rvs(mu, sigma, size=1):
def fisher_rvs(mu, sigma, size=None): """ Return a random (polar, azimuthal) angle drawn from the Fisher distribution. Assume that the concentration parameter (kappa) is large so that we can use a Rayleigh distribution about the north pole and rotate it to be centered at the (polar, azimuthal) coordinate mu. Assume ka...
5b979028fd06f4482bc9e36695d698fbff0a0083 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/5b979028fd06f4482bc9e36695d698fbff0a0083/sphericalutils.py
try: cPickle.dump(self.__backgroundDict__,file(pickleLocale,'w')) except: sys.stdout.write("Problem saving pickle of DQ information.") sys.stdout.write("Trying to place pickle in your home directory.")
if not backgroundPickle:
def createDQbackground(self,ifoEpochList=list(),pickleLocale=None): """ Two inputs a list of tuples (ifo,epochname) for each instrument. Also a place to save the potential pickle to for quick access later. """ if type(ifoEpochList) != type(list()): raise Exception, \ "Invalid input argument ifoEpochList,%s type(%s)"...
9aeff3f08a8ec88be8b54655d50ba82648672581 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/9aeff3f08a8ec88be8b54655d50ba82648672581/fu_utils.py
cPickle.dump(self.__backgroundDict__, file(home_dir()+"/"+os.path.basename(pickleLocale),'w'))
cPickle.dump(self.__backgroundDict__,file(pickleLocale,'w'))
def createDQbackground(self,ifoEpochList=list(),pickleLocale=None): """ Two inputs a list of tuples (ifo,epochname) for each instrument. Also a place to save the potential pickle to for quick access later. """ if type(ifoEpochList) != type(list()): raise Exception, \ "Invalid input argument ifoEpochList,%s type(%s)"...
9aeff3f08a8ec88be8b54655d50ba82648672581 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/9aeff3f08a8ec88be8b54655d50ba82648672581/fu_utils.py
sys.stdout.write("Really ignoring pickle generation now!\n")
sys.stdout.write("Problem saving pickle of DQ information.") sys.stdout.write("Trying to place pickle in your home directory.") try: cPickle.dump(self.__backgroundDict__, file(home_dir()+"/"+os.path.basename(pickleLocale),'w')) except: sys.stdout.write("Really ignoring pickle generation now!\n")
def createDQbackground(self,ifoEpochList=list(),pickleLocale=None): """ Two inputs a list of tuples (ifo,epochname) for each instrument. Also a place to save the potential pickle to for quick access later. """ if type(ifoEpochList) != type(list()): raise Exception, \ "Invalid input argument ifoEpochList,%s type(%s)"...
9aeff3f08a8ec88be8b54655d50ba82648672581 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/9aeff3f08a8ec88be8b54655d50ba82648672581/fu_utils.py
if paramnames(parnum)=='mchirp': return inj.mchirp if paramname(parnum)=='eta': return inj.eta if paramname(parnum)=='time': return inj.get_end() if paramname(parnum)=='phi0': return inj.phi0 if paramname(parnum)=='dist': return inj.distance if paramname(parnum)=='RA': return inj.longitude if paramname(parnum)=='dec': ...
if paramnames[parnum]=='mchirp': return inj.mchirp if paramnames[parnum]=='eta': return inj.eta if paramnames[parnum]=='time': return inj.get_end() if paramnames[parnum]=='phi0': return inj.phi0 if paramnames[parnum]=='dist': return inj.distance if paramnames[parnum]=='RA': return inj.longitude if paramnames[parnum]=='...
def getinjpar(inj,parnum): if paramnames(parnum)=='mchirp': return inj.mchirp if paramname(parnum)=='eta': return inj.eta if paramname(parnum)=='time': return inj.get_end() if paramname(parnum)=='phi0': return inj.phi0 if paramname(parnum)=='dist': return inj.distance if paramname(parnum)=='RA': return inj.longitude if...
01a9a7671c54f7426820f68a657d1c47cb6ffe38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/01a9a7671c54f7426820f68a657d1c47cb6ffe38/cbcBayesSkyRes.py
if injection and getinjpar(injection,paramnames.index('mchirp'))<max(pos[:,paranmanes.index('mchirp')]) and getinjpar(injection,paramnames.index('mchirp'))>min(pos[:,paramnames.index('mchirp')]) and getinjpar(injection,paramnames.index('eta'))>min(pos[:,paramnames.index('eta')]) and getinjpar(injection,paramnames.index...
if injection and getinjpar(injection,paramnames.index('mchirp'))<max(pos[:,paramnames.index('mchirp')]) and getinjpar(injection,paramnames.index('mchirp'))>min(pos[:,paramnames.index('mchirp')]) and getinjpar(injection,paramnames.index('eta'))>min(pos[:,paramnames.index('eta')]) and getinjpar(injection,paramnames.index...
def plot2Dkernel(xdat,ydat,Nx,Ny): xax=linspace(min(xdat),max(xdat),Nx) yax=linspace(min(ydat),max(ydat),Ny) x,y=numpy.meshgrid(xax,yax) samp=array([xdat,ydat]) kde=stats.kde.gaussian_kde(samp) grid_coords = numpy.append(x.reshape(-1,1),y.reshape(-1,1),axis=1) z = kde(grid_coords.T) z = z.reshape(Nx,Ny) asp=xax.ptp()/y...
01a9a7671c54f7426820f68a657d1c47cb6ffe38 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/01a9a7671c54f7426820f68a657d1c47cb6ffe38/cbcBayesSkyRes.py
xmldoc,digest = ligolw_utils.load_fileobj(file)
xmldoc,digest = utils.load_fileobj(file)
def fromsegmentxml(file): """ Read a segmentlist from the file object file containing an xml segment table. """ xmldoc,digest = ligolw_utils.load_fileobj(file) seg_table = table.get_table(xmldoc,lsctables.SegmentTable.tableName) segs = segmentlist() for seg in seg_table: segs.append(segment(seg.start_time,seg.end_tim...
2f54f0d647571c386874bd5521bff6681193ae43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/2f54f0d647571c386874bd5521bff6681193ae43/dqSegmentUtils.py
def fromsegmentcsvCSV(csvfile):
def fromsegmentcsv(csvfile):
def fromsegmentcsvCSV(csvfile): """ Read a segmentlist from the file object file containing a comma separated list of segments. """ def CSVLineToSeg(line): tstart, tend = map(int, line.split(',')) return segment(tstart, tend) segs = segmentlist([CSVLineToSeg(line) for line in csvfile]) return segs.coalesce()
2f54f0d647571c386874bd5521bff6681193ae43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/2f54f0d647571c386874bd5521bff6681193ae43/dqSegmentUtils.py
exe = make_external_call('which ligolw_segment_query')[0] segment_cmd = ' '.join([exe,'--query-segments',\ '--database','--include-segments',flag,\ '--gps-start-time',str(start),\ '--gps-end-time',str(end)]) segxmlout,segerr = make_external_call(segment_cmd) segs = segmentlist() if not segerr: tmpfile = tempfile.Tem...
start = int(start) end = int(end) database_location = os.environ['S6_SEGMENT_SERVER'] connection = segmentdb_utils.setup_database(database_location) engine = query_engine.LdbdQueryEngine(connection) spec = flag.split(':') if len(spec) < 2 or len(spec) > 3: print >>sys.stderr, "Included segemen...
def grab_segments(start,end,flag): """ Returns a segmentlist containing the segments during which the given flag was active in the given period. """ exe = make_external_call('which ligolw_segment_query')[0] #== construct segment query segment_cmd = ' '.join([exe,'--query-segments',\ '--database','--include-segments',fl...
2f54f0d647571c386874bd5521bff6681193ae43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/2f54f0d647571c386874bd5521bff6681193ae43/dqSegmentUtils.py
print >>sys.stderr, "Warning: Call to ligolw_segment_query failed with "+\ "command:" print >>sys.stderr, "\n"+segment_cmd+"\n"
version = '*' segdefs = segmentdb_utils.expand_version_number(engine,(ifo,name,version,\ start,end,0,0)) segs = segmentdb_utils.query_segments(engine, 'segment', segdefs) segs = reduce(operator.or_, segs).coalesce()
def grab_segments(start,end,flag): """ Returns a segmentlist containing the segments during which the given flag was active in the given period. """ exe = make_external_call('which ligolw_segment_query')[0] #== construct segment query segment_cmd = ' '.join([exe,'--query-segments',\ '--database','--include-segments',fl...
2f54f0d647571c386874bd5521bff6681193ae43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/2f54f0d647571c386874bd5521bff6681193ae43/dqSegmentUtils.py
"a60dt60dD": "real_4", "a90dt90dD": "real_4",
"a60rank": "real_4", "a90rank": "real_4",
def get_coincs_from_coire(self,files,stat='snr'): """ uses CoincInspiralUtils to get data from old-style (coire'd) coincs """ coincTrigs = CoincInspiralUtils.coincInspiralTable() inspTrigs = SnglInspiralUtils.ReadSnglInspiralFromFiles(files, \ mangle_event_id = True,verbose=None) statistic = CoincInspiralUtils.coincSta...
09831b4d5cbdae8ec701b58d0de45f0f44c5da61 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/09831b4d5cbdae8ec701b58d0de45f0f44c5da61/skylocutils.py
def populate_SkyLocTable(skyloctable,coinc,adt60,adt90,adt60dD60,adt90dD90,\
def populate_SkyLocTable(skyloctable,coinc,adt60,adt90,arank60,arank90,\
def populate_SkyLocTable(skyloctable,coinc,adt60,adt90,adt60dD60,adt90dD90,\ pt,grid_fname,skymap_fname=None): """ populate a row in a skyloctable """ row = skyloctable.RowType() row.end_time = coinc.time row.set_ifos(coinc.ifo_list) rhosquared = 0.0 for ifo in coinc.ifo_list: rhosquared += coinc.snr[ifo]*coinc.snr[if...
09831b4d5cbdae8ec701b58d0de45f0f44c5da61 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/09831b4d5cbdae8ec701b58d0de45f0f44c5da61/skylocutils.py
row.a60dt60dD = adt60dD60 row.a90dt90dD = adt90dD90
row.a60rank = arank60 row.a90rank = arank90
def populate_SkyLocTable(skyloctable,coinc,adt60,adt90,adt60dD60,adt90dD90,\ pt,grid_fname,skymap_fname=None): """ populate a row in a skyloctable """ row = skyloctable.RowType() row.end_time = coinc.time row.set_ifos(coinc.ifo_list) rhosquared = 0.0 for ifo in coinc.ifo_list: rhosquared += coinc.snr[ifo]*coinc.snr[if...
09831b4d5cbdae8ec701b58d0de45f0f44c5da61 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/09831b4d5cbdae8ec701b58d0de45f0f44c5da61/skylocutils.py
while True:
while areasize<len(np.asarray(toppoints)[:,3]):
def greedyBin2(posterior_array,par_bins,confidence_levels,par_names=None,injection=None): if par_names: par1_name,par2_name=par_names else: par1_name="Parameter 1" par2_name="Parameter 2" par1pos=posterior_array[:,0] par2pos=posterior_array[:,1] par1_bin,par2_bin=par_bins if injection: par1_injvalue,par2_injvalue=i...
0ced8a6af6b6b992353c33d698b6a1ee099faf2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/0ced8a6af6b6b992353c33d698b6a1ee099faf2d/bayespputils.py
if ca and os.path.isfile(ca[0].path()):
if ca and os.path.isfile(ca[0].path()):
def add_dq(self, page): page.add_section("DQ", "Data Quality for %s" % (self.coinctime,)) page.sections["DQ"].div("This section gives vetoes and flags that were on")
0a8e93d3e823f119f9ae1e0276f323e4ac0a92d3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/0a8e93d3e823f119f9ae1e0276f323e4ac0a92d3/followup_page.py
self.coincs = [tuple(event.event_id for event in sorted(double, lambda a, b: cmp(a.ifo, b.ifo))) for double in CoincidentNTuples(eventlists, event_comparefunc, offset_instruments, thresholds, verbose = verbose)] self.coincs.sort()
self.coincs = sorted(tuple(event.event_id for event in sorted(double, lambda a, b: cmp(a.ifo, b.ifo))) for double in CoincidentNTuples(eventlists, event_comparefunc, offset_instruments, thresholds, verbose = verbose))
def get_coincs(self, eventlists, event_comparefunc, thresholds, verbose = False): # # has this node already been visited? if so, return the # answer we already know #
ae182a2d5babbef0daa266d0e01ae4ad44c5aec1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/ae182a2d5babbef0daa266d0e01ae4ad44c5aec1/snglcoinc.py
self.unused_coincs = reduce(lambda a, b: a & b, (component.unused_coincs for component in self.components)) | reduce(lambda a, b: a | b, (set(component.coincs) for component in self.components))
self.unused_coincs = reduce(lambda a, b: a | b, (set(component.get_coincs(eventlists, event_comparefunc, thresholds, verbose = verbose)) for component in self.components)) self.unused_coincs |= reduce(lambda a, b: a & b, (component.unused_coincs for component in self.components))
def get_coincs(self, eventlists, event_comparefunc, thresholds, verbose = False): # # has this node already been visited? if so, return the # answer we already know #
ae182a2d5babbef0daa266d0e01ae4ad44c5aec1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/ae182a2d5babbef0daa266d0e01ae4ad44c5aec1/snglcoinc.py