rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
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...
638b625f25ecf60716adb7235da0bc0e8d672439 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/638b625f25ecf60716adb7235da0bc0e8d672439/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...
638b625f25ecf60716adb7235da0bc0e8d672439 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/638b625f25ecf60716adb7235da0bc0e8d672439/skylocutils.py
def __init__(self, *args): pipeline.LigolwAddNode.__init__(self, *args)
def __init__(self, job, remove_input, *args): pipeline.LigolwAddNode.__init__(self, job, *args)
def __init__(self, *args): pipeline.LigolwAddNode.__init__(self, *args) self.input_cache = [] self.output_cache = [] self.cache_dir = os.path.join(os.getcwd(), self.job().cache_dir)
91a38cda9bfd71714f9f48773267303e4bb7fd9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/91a38cda9bfd71714f9f48773267303e4bb7fd9c/power.py
for c in cache: self.add_var_arg("--remove-input-except %s" % c.path())
if self.remove_input: for c in cache: self.add_var_arg("--remove-input-except %s" % c.path())
def add_preserve_cache(self, cache): for c in cache: self.add_var_arg("--remove-input-except %s" % c.path())
91a38cda9bfd71714f9f48773267303e4bb7fd9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/91a38cda9bfd71714f9f48773267303e4bb7fd9c/power.py
def make_lladd_fragment(dag, parents, tag, segment = None, input_cache = None, preserve_cache = None, extra_input_cache = None): node = LigolwAddNode(lladdjob)
def make_lladd_fragment(dag, parents, tag, segment = None, input_cache = None, remove_input = False, preserve_cache = None, extra_input_cache = None): node = LigolwAddNode(lladdjob, remove_input = remove_input)
def make_lladd_fragment(dag, parents, tag, segment = None, input_cache = None, preserve_cache = None, extra_input_cache = None): node = LigolwAddNode(lladdjob) # link to parents for parent in parents: node.add_parent(parent) # build input cache if input_cache is None: # default is to use all output files from parents...
91a38cda9bfd71714f9f48773267303e4bb7fd9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/91a38cda9bfd71714f9f48773267303e4bb7fd9c/power.py
return make_lladd_fragment(dag, nodes, tag)
return make_lladd_fragment(dag, nodes, tag, remove_input = True)
def make_multibinj_fragment(dag, seg, tag): flow = float(powerjob.get_opts()["low-freq-cutoff"]) fhigh = flow + float(powerjob.get_opts()["bandwidth"]) nodes = make_binj_fragment(dag, seg, tag, 0.0, flow, fhigh) return make_lladd_fragment(dag, nodes, tag)
91a38cda9bfd71714f9f48773267303e4bb7fd9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/91a38cda9bfd71714f9f48773267303e4bb7fd9c/power.py
coincTrigs = CoincInspiralUtils.coincInspiralTable(inspTrigs,'snr')
statistic = CoincInspiralUtils.coincStatistic('snr',None,None) coincTrigs = CoincInspiralUtils.coincInspiralTable(inspTrigs,statistic)
def get_coincs_from_coire(self,files): """ uses CoincInspiralUtils to get data from old-style (coire'd) coincs """ coincTrigs = CoincInspiralUtils.coincInspiralTable() inspTrigs = SnglInspiralUtils.ReadSnglInspiralFromFiles(files, \ mangle_event_id = True,verbose=None) #note that it's hardcoded to use snr as the statis...
efa659317ebb3cc99bbe328a0a0bf36b28712062 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/efa659317ebb3cc99bbe328a0a0bf36b28712062/skylocutils.py
ds = pi*sqrt(2.0)*resolution/180.0
ds = pi*resolution/180.0
def gridsky(resolution): """ grid the sky up into roughly square regions resolution is the length of a side the points get placed at the center of the squares and to first order each square has an area of resolution^2 """ latitude = 0.0 longitude = pi ds = pi*sqrt(2.0)*resolution/180.0 points = [(latitude-0.5*pi, longi...
92cbddf405d13484ba64bef9acff8c41d7ebb714 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/92cbddf405d13484ba64bef9acff8c41d7ebb714/skylocutils.py
fgtemp = finegrid
fgtemp = finegrid[:]
def map_grids(coarsegrid,finegrid,coarseres=4.0): """ takes the two grids (lists of lat/lon tuples) and returns a dictionary where the points in the coarse grid are the keys and lists of tuples of points in the fine grid are the values """ fgtemp = finegrid coarsedict = {} ds = coarseres*pi/180 for cpt in coarsegrid: f...
92cbddf405d13484ba64bef9acff8c41d7ebb714 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/92cbddf405d13484ba64bef9acff8c41d7ebb714/skylocutils.py
ds = coarseres*pi/180
ds = coarseres*pi/180.0
def map_grids(coarsegrid,finegrid,coarseres=4.0): """ takes the two grids (lists of lat/lon tuples) and returns a dictionary where the points in the coarse grid are the keys and lists of tuples of points in the fine grid are the values """ fgtemp = finegrid coarsedict = {} ds = coarseres*pi/180 for cpt in coarsegrid: f...
92cbddf405d13484ba64bef9acff8c41d7ebb714 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/92cbddf405d13484ba64bef9acff8c41d7ebb714/skylocutils.py
if (cpt[0]-fpt[0])*(cpt[0]-fpt[0]) <= ds*ds/4 and \ (cpt[1]-fpt[1])*(cpt[1]-fpt[1])*abs(sin(fpt[1]))*abs(sin(fpt[1])) \ <= ds*ds/4:
if (cpt[0]-fpt[0])*(cpt[0]-fpt[0]) <= ds*ds/4.0 and \ (cpt[1]-fpt[1])*(cpt[1]-fpt[1])*sin(cpt[0])*sin(cpt[0]) \ <= ds*ds/4.0:
def map_grids(coarsegrid,finegrid,coarseres=4.0): """ takes the two grids (lists of lat/lon tuples) and returns a dictionary where the points in the coarse grid are the keys and lists of tuples of points in the fine grid are the values """ fgtemp = finegrid coarsedict = {} ds = coarseres*pi/180 for cpt in coarsegrid: f...
92cbddf405d13484ba64bef9acff8c41d7ebb714 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/92cbddf405d13484ba64bef9acff8c41d7ebb714/skylocutils.py
s = numpy.real(s)
s = numpy.real(s)
def IMRpeakAmp(m1,m2,spin1z,spin2z,d): """ IMRpeakAmp finds the peak amplitude of the waveform for a given source parameters and the source distance. usage: IMRpeakAmp(m1,m2,spin1z,spin2z,distance) e.g. spawaveApp.IMRpeakAmp(30,40,0.45,0.5,100) """ chi = spawaveform.computechi(m1, m2, spin1z, spin2z) imrfFinal = spa...
3608b615d81850531b55d6a54047a3429ee82d64 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/3608b615d81850531b55d6a54047a3429ee82d64/spawaveApp.py
sngl_burst.* time_slide.offset,
sngl_burst.*, time_slide.offset
def add_noninjections(self, param_func, database, *args): # iterate over burst<-->burst coincs cursor = database.connection.cursor() for coinc_event_id, time_slide_id in database.connection.cursor().execute("""
b103add88675e74edd370e9fc17f8b46d37b42e3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b103add88675e74edd370e9fc17f8b46d37b42e3/ligolw_burca_tailor.py
except ImportError, KeyError:
except (ImportError, KeyError):
def get_username(): """ Try to retrieve the username from a variety of sources. First the environment variable LOGNAME is tried, if that is not set the environment variable USERNAME is tried, if that is not set the password database is consulted (only on Unix systems, if the import of the pwd module succedes), finally...
8f151a7950beba23473616a6e5a1011cbec31430 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/8f151a7950beba23473616a6e5a1011cbec31430/process.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...
b5036db122ffd4acba48f4b4049b118c8bb775f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b5036db122ffd4acba48f4b4049b118c8bb775f4/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...
b5036db122ffd4acba48f4b4049b118c8bb775f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b5036db122ffd4acba48f4b4049b118c8bb775f4/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...
b5036db122ffd4acba48f4b4049b118c8bb775f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b5036db122ffd4acba48f4b4049b118c8bb775f4/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,...
b5036db122ffd4acba48f4b4049b118c8bb775f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b5036db122ffd4acba48f4b4049b118c8bb775f4/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,...
b5036db122ffd4acba48f4b4049b118c8bb775f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b5036db122ffd4acba48f4b4049b118c8bb775f4/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...
b5036db122ffd4acba48f4b4049b118c8bb775f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b5036db122ffd4acba48f4b4049b118c8bb775f4/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 ...
b5036db122ffd4acba48f4b4049b118c8bb775f4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b5036db122ffd4acba48f4b4049b118c8bb775f4/makeCheckListWiki.py
os.stdout.write("Path information to background pickle unchanged.\n")
sys.stdout.write("Path information to background pickle unchanged.\n")
def resetPicklePointer(self,filename=None): """ If you called the class definition with the wrong pickle path. You can reset it with this method. """ if filename==None: os.stdout.write("Path information to background pickle unchanged.\n") elif filename.__contains__("~"): self.__backgroundPickle__=os.path.expanduser(fil...
15b8c74e87af07e0931c02fecdfbb15f7dc804da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/15b8c74e87af07e0931c02fecdfbb15f7dc804da/fu_utils.py
os.stdout.write("Specify trigger time please.\n")
sys.stdout.write("Specify trigger time please.\n")
def fetchInformationDualWindow(self,triggerTime=None,frontWindow=300,\ backWindow=150,ifoList='DEFAULT'): """ This method is responsible for queries to the data server. The results of the query become an internal list that can be converted into an HTML table. The arguments allow you to query with trigger time of inte...
15b8c74e87af07e0931c02fecdfbb15f7dc804da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/15b8c74e87af07e0931c02fecdfbb15f7dc804da/fu_utils.py
os.stdout.write("Problem saving pickle of DQ information.") os.stdout.write("Trying to place pickle in your home directory.")
sys.stdout.write("Problem saving pickle of DQ information.") sys.stdout.write("Trying to place pickle in your home directory.")
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)"...
15b8c74e87af07e0931c02fecdfbb15f7dc804da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/15b8c74e87af07e0931c02fecdfbb15f7dc804da/fu_utils.py
os.stdout.write("Really ignoring pickle generation now!\n")
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)"...
15b8c74e87af07e0931c02fecdfbb15f7dc804da /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/15b8c74e87af07e0931c02fecdfbb15f7dc804da/fu_utils.py
def append_process(xmldoc, comment = None, force = None, ds_sq_threshold = None, save_small_coincs = None, vetoes_name = None, verbose = None):
def append_process(xmldoc, comment = None, force = None, ds_sq_threshold = None, save_small_coincs = None, vetoes_name = None, coinc_end_time_segment = None, verbose = None):
def append_process(xmldoc, comment = None, force = None, ds_sq_threshold = None, save_small_coincs = None, vetoes_name = None, verbose = None): process = llwapp.append_process(xmldoc, program = process_program_name, version = __version__, cvs_repository = u"lscsoft", cvs_entry_time = __date__, comment = comment) param...
7a69c0f45d6bbc2512002197ea2ccb2122c44204 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/7a69c0f45d6bbc2512002197ea2ccb2122c44204/ligolw_rinca.py
def append_coinc(self, process_id, time_slide_id, coinc_def_id, events):
def append_coinc(self, process_id, node, coinc_def_id, events):
def append_coinc(self, process_id, time_slide_id, coinc_def_id, events): # # populate the coinc_event and coinc_event_map tables #
7a69c0f45d6bbc2512002197ea2ccb2122c44204 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/7a69c0f45d6bbc2512002197ea2ccb2122c44204/ligolw_rinca.py
time_slide_id = node.time_slide_id
def append_coinc(self, process_id, time_slide_id, coinc_def_id, events): # # populate the coinc_event and coinc_event_map tables #
7a69c0f45d6bbc2512002197ea2ccb2122c44204 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/7a69c0f45d6bbc2512002197ea2ccb2122c44204/ligolw_rinca.py
tstart = events[0].get_start() + self.time_slide_index[time_slide_id][events[0].ifo] coinc_ringdown.set_start(tstart + sum(event.snr * float(event.get_start() + self.time_slide_index[time_slide_id][event.ifo] - tstart) for event in events) / sum(event.snr for event in events))
tstart = coinc_ringdown_start(events, node.offset_vector) coinc_ringdown.set_start(tstart)
def append_coinc(self, process_id, time_slide_id, coinc_def_id, events): # # populate the coinc_event and coinc_event_map tables #
7a69c0f45d6bbc2512002197ea2ccb2122c44204 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/7a69c0f45d6bbc2512002197ea2ccb2122c44204/ligolw_rinca.py
tstart = coinc_ringdown.get_start()
def append_coinc(self, process_id, time_slide_id, coinc_def_id, events): # # populate the coinc_event and coinc_event_map tables #
7a69c0f45d6bbc2512002197ea2ccb2122c44204 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/7a69c0f45d6bbc2512002197ea2ccb2122c44204/ligolw_rinca.py
coinc_tables.append_coinc(process_id, node.time_slide_id, coinc_def_id, ntuple)
coinc_tables.append_coinc(process_id, node, coinc_def_id, ntuple)
def ligolw_rinca( xmldoc, process_id, EventListType, CoincTables, coinc_definer_row, event_comparefunc, thresholds, ntuple_comparefunc = lambda events, offset_vector: False, small_coincs = False, veto_segments = None, verbose = False
7a69c0f45d6bbc2512002197ea2ccb2122c44204 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/7a69c0f45d6bbc2512002197ea2ccb2122c44204/ligolw_rinca.py
coinc_tables.append_coinc(process_id, node.time_slide_id, coinc_def_id, ntuple)
coinc_tables.append_coinc(process_id, node, coinc_def_id, ntuple)
def ligolw_rinca( xmldoc, process_id, EventListType, CoincTables, coinc_definer_row, event_comparefunc, thresholds, ntuple_comparefunc = lambda events, offset_vector: False, small_coincs = False, veto_segments = None, verbose = False
7a69c0f45d6bbc2512002197ea2ccb2122c44204 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/7a69c0f45d6bbc2512002197ea2ccb2122c44204/ligolw_rinca.py
f = os.path.basename(f)
def write_abstract_dag(self): """ Write all the nodes in the workflow to the DAX file. """ if not self.__dax_file_path: # this workflow is not dax-compatible, so don't write a dax return try: dagfile = open( self.__dax_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path
0e89d16bc15acc69ffa5e82b0fc52283d4a61951 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0e89d16bc15acc69ffa5e82b0fc52283d4a61951/pipeline.py
f = os.path.basename(f)
def write_abstract_dag(self): """ Write all the nodes in the workflow to the DAX file. """ if not self.__dax_file_path: # this workflow is not dax-compatible, so don't write a dax return try: dagfile = open( self.__dax_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path
0e89d16bc15acc69ffa5e82b0fc52283d4a61951 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0e89d16bc15acc69ffa5e82b0fc52283d4a61951/pipeline.py
xml = '<filename file="%s" />' % os.path.basename(f)
xml = '<filename file="%s" />' % f
def write_abstract_dag(self): """ Write all the nodes in the workflow to the DAX file. """ if not self.__dax_file_path: # this workflow is not dax-compatible, so don't write a dax return try: dagfile = open( self.__dax_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path
0e89d16bc15acc69ffa5e82b0fc52283d4a61951 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0e89d16bc15acc69ffa5e82b0fc52283d4a61951/pipeline.py
f = os.path.basename(f)
def write_abstract_dag(self): """ Write all the nodes in the workflow to the DAX file. """ if not self.__dax_file_path: # this workflow is not dax-compatible, so don't write a dax return try: dagfile = open( self.__dax_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path
0e89d16bc15acc69ffa5e82b0fc52283d4a61951 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0e89d16bc15acc69ffa5e82b0fc52283d4a61951/pipeline.py
f = os.path.basename(f)
def write_abstract_dag(self): """ Write all the nodes in the workflow to the DAX file. """ if not self.__dax_file_path: # this workflow is not dax-compatible, so don't write a dax return try: dagfile = open( self.__dax_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path
0e89d16bc15acc69ffa5e82b0fc52283d4a61951 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0e89d16bc15acc69ffa5e82b0fc52283d4a61951/pipeline.py
def update_ids(connection, verbose = False):
def update_ids(connection, xmldoc=None, verbose = False):
def update_ids(connection, verbose = False): """ For internal use only. """ table_elems = dbtables.get_xml(connection).getElementsByTagName(ligolw.Table.tagName) for i, tbl in enumerate(table_elems): if verbose: print >>sys.stderr, "updating IDs: %d%%\r" % (100.0 * i / len(table_elems)), tbl.applyKeyMapping() if verbos...
af592752cf35b9a561a2351661d817b99a8d50ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af592752cf35b9a561a2351661d817b99a8d50ab/ligolw_sqlite.py
table_elems = dbtables.get_xml(connection).getElementsByTagName(ligolw.Table.tagName)
if xmldoc: table_elems = xmldoc.getElementsByTagName(ligolw.Table.tagName) else: table_elems = dbtables.get_xml(connection).getElementsByTagName(ligolw.Table.tagName)
def update_ids(connection, verbose = False): """ For internal use only. """ table_elems = dbtables.get_xml(connection).getElementsByTagName(ligolw.Table.tagName) for i, tbl in enumerate(table_elems): if verbose: print >>sys.stderr, "updating IDs: %d%%\r" % (100.0 * i / len(table_elems)), tbl.applyKeyMapping() if verbos...
af592752cf35b9a561a2351661d817b99a8d50ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af592752cf35b9a561a2351661d817b99a8d50ab/ligolw_sqlite.py
utils.load_url(url, verbose = verbose, gz = (url or "stdin").endswith(".gz")).unlink()
xmldoc = utils.load_url(url, verbose = verbose, gz = (url or "stdin").endswith(".gz"))
def insert_from_url(connection, url, preserve_ids = False, verbose = False): """ Parse and insert the LIGO Light Weight document at the URL into the database the at the given connection. """ # # load document. this process inserts the document's contents into # the database. the document is unlinked to delete databas...
af592752cf35b9a561a2351661d817b99a8d50ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af592752cf35b9a561a2351661d817b99a8d50ab/ligolw_sqlite.py
update_ids(connection, verbose)
update_ids(connection, xmldoc, verbose) xmldoc.unlink()
def insert_from_url(connection, url, preserve_ids = False, verbose = False): """ Parse and insert the LIGO Light Weight document at the URL into the database the at the given connection. """ # # load document. this process inserts the document's contents into # the database. the document is unlinked to delete databas...
af592752cf35b9a561a2351661d817b99a8d50ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af592752cf35b9a561a2351661d817b99a8d50ab/ligolw_sqlite.py
connection.commit()
def insert_from_xmldoc(connection, xmldoc, preserve_ids = False, verbose = False): """ Insert the tables from an in-ram XML document into the database at the given connection. """ # # iterate over tables in the XML tree, reconstructing each inside # the database # for tbl in xmldoc.getElementsByTagName(ligolw.Table.ta...
af592752cf35b9a561a2351661d817b99a8d50ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af592752cf35b9a561a2351661d817b99a8d50ab/ligolw_sqlite.py
update_ids(connection, verbose)
update_ids(connection, None, verbose)
def insert_from_xmldoc(connection, xmldoc, preserve_ids = False, verbose = False): """ Insert the tables from an in-ram XML document into the database at the given connection. """ # # iterate over tables in the XML tree, reconstructing each inside # the database # for tbl in xmldoc.getElementsByTagName(ligolw.Table.ta...
af592752cf35b9a561a2351661d817b99a8d50ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af592752cf35b9a561a2351661d817b99a8d50ab/ligolw_sqlite.py
from pylal import antenna
from pylal import antenna
def directional_horizon(ifos, RA, dec, gps_time, horizons=None): """ Return a dictionary of sensitivity numbers for each detector, based on a known sky location and an optional input dictionary of inspiral horizon distances for a reference source of the user's choice. If the horizons dictionary is specified, the return...
c6b08930ed76a8d14be2b87e66f0d39d953cc479 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/c6b08930ed76a8d14be2b87e66f0d39d953cc479/grbsummary.py
threshs[det]=min_threshold*(horizons[det]/worst_horizon)
threshs[det]=min_threshold*(horizons[det]/worst_horizon)
def detector_thresholds(horizons,min_threshold,max_threshold=7.5): """ Return a set of detector thresholds adjusted for a particular set of inspiral horizon distances (calculated with directional_horizon). The min_threshold specified the minimum threshold which will be set for all detectors less sensitive than the best...
c6b08930ed76a8d14be2b87e66f0d39d953cc479 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/c6b08930ed76a8d14be2b87e66f0d39d953cc479/grbsummary.py
def fetchInformation(self,triggerTime=None,window=300): """ Wrapper for fetchInformationDualWindow that mimics original behavior """ return self.fetchInformationDualWindow(triggerTime,window,window,ifoList='DEFAULT')
cdbfaee53521829f68e4254203dcf2bd034ed537 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/cdbfaee53521829f68e4254203dcf2bd034ed537/fu_utils.py
later. """
later. """
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)"\ %...
cdbfaee53521829f68e4254203dcf2bd034ed537 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/cdbfaee53521829f68e4254203dcf2bd034ed537/fu_utils.py
for (ifo,epoch) in ifoEpochList:
except: backgroundPickle=False sys.stderr.write("Error importing the pickle file! %s\n"\ %(pickleLocale)) return for (ifo,epoch) in ifoEpochList:
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)"\ %...
cdbfaee53521829f68e4254203dcf2bd034ed537 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/cdbfaee53521829f68e4254203dcf2bd034ed537/fu_utils.py
generated background %s"%self.__backgroundDict__["ifoepoch"] except: backgroundPickle=False sys.stderr.write("Error importing the pickle file!\n") if os.access(os.path.split(pickleLocal)[0],os.W_OK): os.path.rename(pickleLocale,pickleLocale+".corrupt")
generated background expected %s got %s"%(\ self.__backgroundDict__["ifoepoch"], ifoEpochList)
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)"\ %...
cdbfaee53521829f68e4254203dcf2bd034ed537 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/cdbfaee53521829f68e4254203dcf2bd034ed537/fu_utils.py
ifoEpochList=[(x,getRunEpoch(self.triggerTime,x)) for x in uniqIfos]
ifoEpochList=[(x,getRunEpoch(self.triggerTime,x)) for x in self.ifos]
def estimateDQbackground(self): """ This method looks at the self.resultlist inside the instance. Using this and 1000 generated time stamp it tabulates a ranking of flag prevelance, binomial probability 'p' """ if len(self.resultList) < 1: self.__backgroundResults__=list() self.__backgroundTimesDict__=dict() self.__bac...
cdbfaee53521829f68e4254203dcf2bd034ed537 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/cdbfaee53521829f68e4254203dcf2bd034ed537/fu_utils.py
sys.stderr.write("Aborting tabulate of binomial P\n")
sys.stderr.write("Aborting tabulation of binomial P\n")
def estimateDQbackground(self): """ This method looks at the self.resultlist inside the instance. Using this and 1000 generated time stamp it tabulates a ranking of flag prevelance, binomial probability 'p' """ if len(self.resultList) < 1: self.__backgroundResults__=list() self.__backgroundTimesDict__=dict() self.__bac...
cdbfaee53521829f68e4254203dcf2bd034ed537 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/cdbfaee53521829f68e4254203dcf2bd034ed537/fu_utils.py
for myIfo,flagList in seenFlags.iteritems():
for myIfo in seenFlags.keys():
def estimateDQbackground(self): """ This method looks at the self.resultlist inside the instance. Using this and 1000 generated time stamp it tabulates a ranking of flag prevelance, binomial probability 'p' """ if len(self.resultList) < 1: self.__backgroundResults__=list() self.__backgroundTimesDict__=dict() self.__bac...
cdbfaee53521829f68e4254203dcf2bd034ed537 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/cdbfaee53521829f68e4254203dcf2bd034ed537/fu_utils.py
for backgroundTime,backgroundFlags in \ self.__backgroundDict__[myIfo.strip()].iteritems(): tmpFlags.extend([name for ifo,name,ver,com,start,stop in backgroundFlags]) if myIfo not in self.__backgroundResults__.keys(): self.__backgroundResults__[myIfo]=dict() for myFlag in seenFlags[myIfo]: self.__backgroundResults__[my...
if myIfo.strip() not in self.__backgroundDict__.keys(): if myIfo not in self.__backgroundResults__.keys(): self.__backgroundResults__[myIfo]=dict() for outsideFlag in seenFlags[myIfo]: self.__backgroundResults__[myIfo][outsideFlag]=float(-0.0) else: for backgroundTime,backgroundFlags in \ self.__backgroundDict__[myIf...
def estimateDQbackground(self): """ This method looks at the self.resultlist inside the instance. Using this and 1000 generated time stamp it tabulates a ranking of flag prevelance, binomial probability 'p' """ if len(self.resultList) < 1: self.__backgroundResults__=list() self.__backgroundTimesDict__=dict() self.__bac...
cdbfaee53521829f68e4254203dcf2bd034ed537 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/cdbfaee53521829f68e4254203dcf2bd034ed537/fu_utils.py
tableString+=rowString%(myColor,ifo,name,version,start,offset1,stop,offset2,size)
tableString+=rowString%(myColor,ifo,name,version,\ start,offset1,stop,offset2,\ size,myBackgroundRank,myCategory)
def generateHTMLTable(self,tableType="BOTH"): """ Return a HTML table already formatted using the module MARKUP to keep the HTML tags complient. This method does nothing but return the result of the last call to self.fetchInformation() The flag names associated with LIGO will have links to the channel wiki in them als...
cdbfaee53521829f68e4254203dcf2bd034ed537 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/cdbfaee53521829f68e4254203dcf2bd034ed537/fu_utils.py
tableString+=rowString%(myColor,ifo,name,version,start,offset1,stop,offset2,size)
tableString+=rowString%(myColor,ifo,name,version,\ start,offset1,stop,offset2,\ size,myBackgroundRank,myCategory)
def generateHTMLTable(self,tableType="BOTH"): """ Return a HTML table already formatted using the module MARKUP to keep the HTML tags complient. This method does nothing but return the result of the last call to self.fetchInformation() The flag names associated with LIGO will have links to the channel wiki in them als...
cdbfaee53521829f68e4254203dcf2bd034ed537 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/cdbfaee53521829f68e4254203dcf2bd034ed537/fu_utils.py
tableString+=emptyRowString%myColor
tableString+=emptyRowString
def generateMOINMOINTable(self,tableType="BOTH"): """ Return a MOINMOIN table. """ ligo=["L1","H1","H2","V1"] channelWiki="https://ldas-jobs.ligo.caltech.edu/cgi-bin/chanwiki?%s" if self.triggerTime==int(-1): return "" myColor="grey" tableString="" titleString="" emptyRowString="" rowString="" for i,col in enumerate(se...
cdbfaee53521829f68e4254203dcf2bd034ed537 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/cdbfaee53521829f68e4254203dcf2bd034ed537/fu_utils.py
os.path.join("bin", "coh_PTF_html_summary"), os.path.join("bin", "coh_PTF_injfinder"), os.path.join("bin", "coh_PTF_sbv_plotter"), os.path.join("bin", "coh_PTF_trig_cluster"), os.path.join("bin", "coh_PTF_trig_combiner"), os.path.join("bin", "ring_post"),
os.path.join("bin", "coh_PTF_html_summary"), os.path.join("bin", "coh_PTF_injfinder"), os.path.join("bin", "coh_PTF_sbv_plotter"), os.path.join("bin", "coh_PTF_trig_cluster"), os.path.join("bin", "coh_PTF_trig_combiner"), os.path.join("bin", "ring_post"),
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
131cdbcf8d05d29ecc6d7d62bd9d25aa1a11600d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/131cdbcf8d05d29ecc6d7d62bd9d25aa1a11600d/setup.py
for tbl in dbtables.get_xml(connection).getElementsByTagName(ligolw.Table.tagName): tbl.sync_next_id()
dbtables.idmap_sync(connection)
def setup(target, check_same_thread=True): connection = sqlite3.connect(target, check_same_thread=check_same_thread) dbtables.DBTable_set_connection(connection) for tbl in dbtables.get_xml(connection).getElementsByTagName(ligolw.Table.tagName): tbl.sync_next_id() return connection
203e7af377f630621d055164eb0ff35d39290061 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/203e7af377f630621d055164eb0ff35d39290061/ligolw_sqlite.py
def update_ids(xmldoc, connection, verbose = False):
def update_ids(connection, verbose = False):
def update_ids(xmldoc, connection, verbose = False): """ For internal use only. """ table_elems = xmldoc.getElementsByTagName(ligolw.Table.tagName) for i, tbl in enumerate(table_elems): if verbose: print >>sys.stderr, "updating IDs: %d%%\r" % (100 * i / len(table_elems)), tbl.applyKeyMapping() if verbose: print >>sys.s...
203e7af377f630621d055164eb0ff35d39290061 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/203e7af377f630621d055164eb0ff35d39290061/ligolw_sqlite.py
table_elems = xmldoc.getElementsByTagName(ligolw.Table.tagName)
table_elems = dbtables.get_xml(connection).getElementsByTagName(ligolw.Table.tagName)
def update_ids(xmldoc, connection, verbose = False): """ For internal use only. """ table_elems = xmldoc.getElementsByTagName(ligolw.Table.tagName) for i, tbl in enumerate(table_elems): if verbose: print >>sys.stderr, "updating IDs: %d%%\r" % (100 * i / len(table_elems)), tbl.applyKeyMapping() if verbose: print >>sys.s...
203e7af377f630621d055164eb0ff35d39290061 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/203e7af377f630621d055164eb0ff35d39290061/ligolw_sqlite.py
print >>sys.stderr, "updating IDs: %d%%\r" % (100 * i / len(table_elems)),
print >>sys.stderr, "updating IDs: %d%%\r" % (100.0 * i / len(table_elems)),
def update_ids(xmldoc, connection, verbose = False): """ For internal use only. """ table_elems = xmldoc.getElementsByTagName(ligolw.Table.tagName) for i, tbl in enumerate(table_elems): if verbose: print >>sys.stderr, "updating IDs: %d%%\r" % (100 * i / len(table_elems)), tbl.applyKeyMapping() if verbose: print >>sys.s...
203e7af377f630621d055164eb0ff35d39290061 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/203e7af377f630621d055164eb0ff35d39290061/ligolw_sqlite.py
Iterate over a sequence of URLs and parse and insert each one into the database the dbtables.DBTable class is currently connected to. """
Iterate over a sequence of URLs, calling insert_from_url() on each, then build the indexes indicated by the metadata in lsctables.py. """
def insert_from_urls(connection, urls, preserve_ids = False, verbose = False): """ Iterate over a sequence of URLs and parse and insert each one into the database the dbtables.DBTable class is currently connected to. """ orig_DBTable_append = dbtables.DBTable.append if not preserve_ids: # enable ID remapping dbtables.i...
203e7af377f630621d055164eb0ff35d39290061 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/203e7af377f630621d055164eb0ff35d39290061/ligolw_sqlite.py
def insert_from_urls(connection, urls, preserve_ids = False, verbose = False): """ Iterate over a sequence of URLs and parse and insert each one into the database the dbtables.DBTable class is currently connected to. """ orig_DBTable_append = dbtables.DBTable.append if not preserve_ids: # enable ID remapping dbtables.i...
203e7af377f630621d055164eb0ff35d39290061 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/203e7af377f630621d055164eb0ff35d39290061/ligolw_sqlite.py
def insert_from_urls(connection, urls, preserve_ids = False, verbose = False): """ Iterate over a sequence of URLs and parse and insert each one into the database the dbtables.DBTable class is currently connected to. """ orig_DBTable_append = dbtables.DBTable.append if not preserve_ids: # enable ID remapping dbtables.i...
203e7af377f630621d055164eb0ff35d39290061 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/203e7af377f630621d055164eb0ff35d39290061/ligolw_sqlite.py
def insert_from_urls(connection, urls, preserve_ids = False, verbose = False): """ Iterate over a sequence of URLs and parse and insert each one into the database the dbtables.DBTable class is currently connected to. """ orig_DBTable_append = dbtables.DBTable.append if not preserve_ids: # enable ID remapping dbtables.i...
203e7af377f630621d055164eb0ff35d39290061 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/203e7af377f630621d055164eb0ff35d39290061/ligolw_sqlite.py
xmldoc = utils.load_url(url, verbose = verbose, gz = (url or "stdin").endswith(".gz")) if not preserve_ids: update_ids(xmldoc, connection, verbose) xmldoc.unlink()
insert_from_url(connection, url, preserve_ids = preserve_ids, verbose = verbose)
def insert_from_urls(connection, urls, preserve_ids = False, verbose = False): """ Iterate over a sequence of URLs and parse and insert each one into the database the dbtables.DBTable class is currently connected to. """ orig_DBTable_append = dbtables.DBTable.append if not preserve_ids: # enable ID remapping dbtables.i...
203e7af377f630621d055164eb0ff35d39290061 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/203e7af377f630621d055164eb0ff35d39290061/ligolw_sqlite.py
dbtables.build_indexes(connection, verbose) dbtables.DBTable.append = orig_DBTable_append def insert_from_xmldoc(connection, xmldoc, preserve_ids = False, verbose = False): """ Insert the tables from an in-ram XML document into the database at the given connection. """ orig_DBTable_append = dbtables.DBTable.append if...
def insert_from_urls(connection, urls, preserve_ids = False, verbose = False): """ Iterate over a sequence of URLs and parse and insert each one into the database the dbtables.DBTable class is currently connected to. """ orig_DBTable_append = dbtables.DBTable.append if not preserve_ids: # enable ID remapping dbtables.i...
203e7af377f630621d055164eb0ff35d39290061 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/203e7af377f630621d055164eb0ff35d39290061/ligolw_sqlite.py
htmlfile.write('<table border=1><tr>')
htmlfile.write('<table border=1 width=100%><tr>')
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)...
8efa0901ef9914c859030cd2ae988cc006b9e1d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/8efa0901ef9914c859030cd2ae988cc006b9e1d8/cbcBayesSkyRes.py
oneDplotPath=os.path.join(outdir,param+'.png')
figname=param+'.png' oneDplotPath=os.path.join(outdir,figname)
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)...
8efa0901ef9914c859030cd2ae988cc006b9e1d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/8efa0901ef9914c859030cd2ae988cc006b9e1d8/cbcBayesSkyRes.py
myfig.savefig(os.path.join(outdir,param+'_samps.png'))
myfig.savefig(os.path.join(outdir,figname.replace('.png','_samps.png')))
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)...
8efa0901ef9914c859030cd2ae988cc006b9e1d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/8efa0901ef9914c859030cd2ae988cc006b9e1d8/cbcBayesSkyRes.py
oneDplotPaths.append(oneDplotPath)
oneDplotPaths.append(figname)
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)...
8efa0901ef9914c859030cd2ae988cc006b9e1d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/8efa0901ef9914c859030cd2ae988cc006b9e1d8/cbcBayesSkyRes.py
oneDMenu=['mtotal','m1','m2','mchirp','mc','distance','distMPC','dist','iota','eta','RA','dec','a1','a2','phi1','theta1','phi2','theta2']
oneDMenu=['mtotal','m1','m2','mchirp','mc','distance','distMPC','dist','iota','psi','eta','RA','dec','a1','a2','phi1','theta1','phi2','theta2']
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)...
8efa0901ef9914c859030cd2ae988cc006b9e1d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/8efa0901ef9914c859030cd2ae988cc006b9e1d8/cbcBayesSkyRes.py
twoDplots=[['mc','eta'],['mchirp','eta'],['m1','m2'],['mtotal','eta'],['distance','iota'],['dist','iota'],['RA','dec'],['m1','dist'],['m2','dist']]
twoDplots=[['mc','eta'],['mchirp','eta'],['m1','m2'],['mtotal','eta'],['distance','iota'],['dist','iota'],['RA','dec'],['m1','dist'],['m2','dist'],['psi','iota'],['psi','distance'],['psi','dist'],['psi','phi0']]
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)...
8efa0901ef9914c859030cd2ae988cc006b9e1d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/8efa0901ef9914c859030cd2ae988cc006b9e1d8/cbcBayesSkyRes.py
dax_usertag = node.get_user_tag() if dax_usertag: pegasus_exec_subdir = os.path.join(dax_subdir,dax_usertag) else: pegasus_exec_subdir = dax_subdir xml += """--dir %s """ % pegasus_exec_subdir
xml += """--dir %s """ % dax_subdir
def write_abstract_dag(self): """ Write all the nodes in the workflow to the DAX file. """ if not self.__dax_file_path: # this workflow is not dax-compatible, so don't write a dax return try: dagfile = open( self.__dax_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path
2219fef30781594185a08025fae24b41130ddde7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2219fef30781594185a08025fae24b41130ddde7/pipeline.py
given an instance of skypoints populate and return skylocinjtable
record injection data in a skylocinjtable
def populate_SkyLocInjTable(skylocinjtable,coinc,dt_area,rank_area, \ dtrss_inj,dDrss_inj): """ given an instance of skypoints populate and return skylocinjtable """ row = skylocinjtable.RowType() row.end_time = coinc.time rhosquared = 0.0 for ifo in coinc.ifo_list: rhosquared += coinc.snr[ifo]*coinc.snr[ifo] row.comb...
2c3acdcabcc35de646276ecf68b6440dd34cb559 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2c3acdcabcc35de646276ecf68b6440dd34cb559/skylocutils.py
maxdx=max(xrange(0,N),key=lambda i:dot(sampcart,skycarts[i]))
maxdot=0 for i in range(0,N): thisdot=dot(sampcart,skycarts[i]) if thisdot>maxdot: maxdot=thisdot maxdx=i
def skyhist_cart(skycarts,samples): """ Histogram the list of samples into bins defined by Cartesian vectors in skycarts """ dot=numpy.dot N=len(skycarts) print 'operating on %d sky points'%(N) bins=zeros(N) for sample in samples: sampcart=pol2cart(sample[RAdim],sample[decdim]) maxdx=max(xrange(0,N),key=lambda i:dot(sa...
2a85c85c26c47f76e885abc27e93f5171f709c28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2a85c85c26c47f76e885abc27e93f5171f709c28/cbcBayesSkyRes.py
dag.add_node(self)
if opts.do_makeCheckList: dag.add_node(self)
def __init__(self,dag,job,cp,opts): pipeline.CondorDAGNode.__init__(self,job) #Specify pipe location self.add_var_opt('followup-directory',cp.get("makeCheckListWiki", "location").strip()) #Specify pipe ini file self.add_var_opt('ini-file',cp.get("makeCheckListWiki", "ini-file").strip()) if not opts.disable_dag_categori...
312184e9c5fc13b8218789141d8b7aa13b21265d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/312184e9c5fc13b8218789141d8b7aa13b21265d/stfu_pipe.py
mv $1 $2/. tar -xzvf $2/$1
currentPath=`pwd` ; mv $1 $2/. ; cd $2 ; tar -xzvf $1 ; cd $currentPath ;
def setup_distrib_script(self,tag_base): distrib_script = open('distribRemoteScan_'+tag_base+'.sh','w') distrib_script.write("""#!/bin/bash
0ac39b00f1d66e6fb64eb15d46386a3b5ded1e80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0ac39b00f1d66e6fb64eb15d46386a3b5ded1e80/stfu_pipe.py
rm $2/$1
rm $2/$1 ;
def setup_distrib_script(self,tag_base): distrib_script = open('distribRemoteScan_'+tag_base+'.sh','w') distrib_script.write("""#!/bin/bash
0ac39b00f1d66e6fb64eb15d46386a3b5ded1e80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0ac39b00f1d66e6fb64eb15d46386a3b5ded1e80/stfu_pipe.py
mcmcfilelist += node.outputName'
mcmcfilelist += node.outputName
def __init__(self,job,coinc,cp,opts,dag,ifo,ifonames,p_nodes): pipeline.CondorDAGNode.__init__(self,job)
ed4c05b1e8f4420e17dab587b3f26534eea33ec6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/ed4c05b1e8f4420e17dab587b3f26534eea33ec6/stfu_pipe.py
cp.set("fu-condor","mcmc", self.which("lalapps_spinspiral"))
cp.set("fu-condor","spinmcmc", self.which("lalapps_spinspiral"))
def __init__(self, configfile=None): cp = ConfigParser.ConfigParser() self.cp = cp self.time_now = "_".join([str(i) for i in time_method.gmtime()[0:6]]) self.ini_file=self.time_now + ".ini" home_base = home_dirs() # CONDOR SECTION NEEDED BY THINGS IN INSPIRAL.PY cp.add_section("condor") cp.set("condor","datafind",self...
ed4c05b1e8f4420e17dab587b3f26534eea33ec6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/ed4c05b1e8f4420e17dab587b3f26534eea33ec6/stfu_pipe.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" ...
145082477fff7e374cb1b7a6e3f1c53ec4e94649 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/145082477fff7e374cb1b7a6e3f1c53ec4e94649/makeCheckListWiki.py
scatter(plx,ply,s=5,c=numpyasarray(toppoints)[:,2],faceted=False,cmap=matplotlib.cm.jet)
scatter(plx,ply,s=5,c=numpy.asarray(toppoints)[:,2],faceted=False,cmap=matplotlib.cm.jet)
def getinjpar(inj,parnum): if parnum==0: return inj.mchirp if parnum==1: return inj.eta if parnum==2: return inj.get_end() if parnum==3: return inj.phi0 if parnum==4: return inj.distance if parnum==5: return inj.longitude if parnum==6: return inj.latitude if parnum==7: return inj.polarization if parnum==8: return inj.i...
1334d3f38b9b5e896e6164fc5328782c040709a2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/1334d3f38b9b5e896e6164fc5328782c040709a2/OddsPostProc.py
def script_dict():
def script_dict(fname):
def script_dict(): script = {} tog = create_toggle() script[tog] = 'javascript' script['http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js'] = 'javascript' return (script, [tog])
0032a000469d2e6336ec23ced4aff11e7c52de80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0032a000469d2e6336ec23ced4aff11e7c52de80/cbcwebpage.py
tog = create_toggle()
tog = os.path.split(create_toggle(fname))[1]
def script_dict(): script = {} tog = create_toggle() script[tog] = 'javascript' script['http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js'] = 'javascript' return (script, [tog])
0032a000469d2e6336ec23ced4aff11e7c52de80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0032a000469d2e6336ec23ced4aff11e7c52de80/cbcwebpage.py
return base_dir + '/' + os.path.split(out.rstrip('/'))[1]
return os.path.split(out.rstrip('/'))[1]
def copy_ihope_style(stylefile="cbcwebpage.css", base_dir="."): # FIXME this is a stupid way to find the path... changes to build scripts, set env var? path = which('ligo_data_find') if path: path = os.path.split(path)[0] else: print >>sys.stderr, "COULD NOT FIND STYLE FILES %s IN %s, ABORTING" % (stylefile, path) rai...
0032a000469d2e6336ec23ced4aff11e7c52de80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0032a000469d2e6336ec23ced4aff11e7c52de80/cbcwebpage.py
if not css: css = copy_ihope_style() scdict = script_dict()
if not css: css = copy_ihope_style(base_dir=path) scdict = script_dict(fname='%s/%s' % (path,"toggle.js"))
def __init__(self, title="cbc web page", path='./', css=None, script=None, pagenum=1, verbose=False): """ """ if not css: css = copy_ihope_style() scdict = script_dict() if not script: script = scdict[0] self.front = "" scriptfiles = scdict[1] self.verbose = verbose self._style = css self._title = title self._script = ...
0032a000469d2e6336ec23ced4aff11e7c52de80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0032a000469d2e6336ec23ced4aff11e7c52de80/cbcwebpage.py
self.subpages[tag] = cbcpage(title=title,css=self._style,script=self._script,pagenum=subpage_num)
self.subpages[tag] = cbcpage(title=title,path=self.path,css=self._style,script=self._script,pagenum=subpage_num)
def add_subpage(self, tag, title, link_text=None): """ """
0032a000469d2e6336ec23ced4aff11e7c52de80 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0032a000469d2e6336ec23ced4aff11e7c52de80/cbcwebpage.py
if trigger.chisq_h1 < 4 or trigger.chisq_l < 4:
if trigger.chisq_h1 < 4 or trigger.chisq_v < 4:
def get_signal_vetoes(trigger,bankq=0,bankn=0,autoq=0,auton=0,chiq=0,chin=0,sigmaVals = None,fResp = None): sbvs = {} q = bankq nhigh = bankn q2 = autoq nhigh2 = auton if trigger.chisq == 0: sbvs['BestNR1'] = 0 else: if trigger.chisq < 60: sbvs['BestNR1'] = trigger.snr else: sbvs['BestNR1'] = trigger.snr/((1 + (trigge...
e534464ac252b05367aa5150a8409e2effafeb21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/e534464ac252b05367aa5150a8409e2effafeb21/coh_PTF_pyutils.py
i=list(nonzero(np.asarray(toppoints)[:,2]==injbin))[0]
i=list(np.nonzero(np.asarray(toppoints)[:,2]==injbin))[0]
def plotSkyMap(skypos,skyres,sky_injpoint): from pylal import skylocutils from mpl_toolkits.basemap import Basemap skypoints=array(skylocutils.gridsky(float(skyres))) skycarts=map(lambda s: pol2cart(s[1],s[0]),skypoints) skyinjectionconfidence=None shist=bayespputils.skyhist_cart(array(skycarts),skypos) #shist=skyhi...
1d62b6f57cbe6ce6c304f75ded4030fc36d5a3ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/1d62b6f57cbe6ce6c304f75ded4030fc36d5a3ed/cbcBayesSkyRes.py
def get_ilwdchar_class(tbl_name, col_name): """ Searches the cache of pre-defined ilwdchar subclasses for a class whose table_name and column_name attributes match those provided. If a matching subclass is found it is returned; otherwise a new class is defined, added to the cache, and returned. Example: >>> process_...
46eeb182e5547b4a5fe3dd0cbde35ddc40c89f66 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/46eeb182e5547b4a5fe3dd0cbde35ddc40c89f66/ilwd.py
class cached_ilwdchar_class(ilwdchar): __slots__ = () table_name, column_name = key index_offset = len("%s:%s:" % key) def __conform__(self, protocol): return unicode(self) ilwdchar_class_cache[key] = cached_ilwdchar_class return cached_ilwdchar_class
pass class cached_ilwdchar_class(ilwdchar): __slots__ = () table_name, column_name = key index_offset = len("%s:%s:" % key) def __conform__(self, protocol): return unicode(self) ilwdchar_class_cache[key] = cached_ilwdchar_class return cached_ilwdchar_class
def get_ilwdchar_class(tbl_name, col_name): """ Searches the cache of pre-defined ilwdchar subclasses for a class whose table_name and column_name attributes match those provided. If a matching subclass is found it is returned; otherwise a new class is defined, added to the cache, and returned. Example: >>> process_...
46eeb182e5547b4a5fe3dd0cbde35ddc40c89f66 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/46eeb182e5547b4a5fe3dd0cbde35ddc40c89f66/ilwd.py
cp.set("makeCheckListWiki","ini-file",self.ini_file)
cp.set("makeCheckListWiki","ini-file",os.path.abspath(self.ini_file))
def __init__(self, configfile=None): cp = ConfigParser.ConfigParser() self.cp = cp self.time_now = "_".join([str(i) for i in time_method.gmtime()[0:6]]) self.ini_file=self.time_now + ".ini" home_base = home_dirs() # CONDOR SECTION NEEDED BY THINGS IN INSPIRAL.PY cp.add_section("condor") cp.set("condor","datafind",self...
b04680f787bf19a80bc1102c1acbdbd5391a41f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b04680f787bf19a80bc1102c1acbdbd5391a41f5/stfu_pipe.py
Move both the start and the end of the segment a distance x away from the other.
Return a new segment whose bounds are given by subtracting x from the segment's lower bound and adding x to the segment's upper bound.
def protract(self, x): """ Move both the start and the end of the segment a distance x away from the other. """ return self.__class__(self[0] - x, self[1] + x)
b8d62cdad939775ab60dde40de9755d5089bae1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b8d62cdad939775ab60dde40de9755d5089bae1a/segments.py
Move both the start and the end of the segment a distance x towards the the other.
Return a new segment whose bounds are given by adding x to the segment's lower bound and subtracting x from the segment's upper bound.
def contract(self, x): """ Move both the start and the end of the segment a distance x towards the the other. """ return self.__class__(self[0] + x, self[1] - x)
b8d62cdad939775ab60dde40de9755d5089bae1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b8d62cdad939775ab60dde40de9755d5089bae1a/segments.py
Return a new segment by adding x to the upper and lower bounds of this segment.
Return a new segment whose bounds are given by adding x to the segment's upper and lower bounds.
def shift(self, x): """ Return a new segment by adding x to the upper and lower bounds of this segment. """ return tuple.__new__(self.__class__, (self[0] + x, self[1] + x))
b8d62cdad939775ab60dde40de9755d5089bae1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b8d62cdad939775ab60dde40de9755d5089bae1a/segments.py
For each segment in the list, move both the start and the end a distance x away from the other. Coalesce the result. Segmentlist is modified in place.
Execute the .protract() method on each segment in the list and coalesce the result. Segmentlist is modified in place.
def protract(self, x): """ For each segment in the list, move both the start and the end a distance x away from the other. Coalesce the result. Segmentlist is modified in place. """ for i in xrange(len(self)): self[i] = self[i].protract(x) return self.coalesce()
b8d62cdad939775ab60dde40de9755d5089bae1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b8d62cdad939775ab60dde40de9755d5089bae1a/segments.py
For each segment in the list, move both the start and the end a distance x towards the other. Coalesce the result. Segmentlist is modified in place.
Execute the .contract() method on each segment in the list and coalesce the result. Segmentlist is modified in place.
def contract(self, x): """ For each segment in the list, move both the start and the end a distance x towards the other. Coalesce the result. Segmentlist is modified in place. """ for i in xrange(len(self)): self[i] = self[i].contract(x) return self.coalesce()
b8d62cdad939775ab60dde40de9755d5089bae1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b8d62cdad939775ab60dde40de9755d5089bae1a/segments.py
Shift the segmentlist by adding x to the upper and lower bounds of all segments. The algorithm is O(n) and does not require the list to be coalesced. Segmentlist is modified in place.
Execute the .shift() method on each segment in the list. The algorithm is O(n) and does not require the list to be coalesced nor does it coalesce the list. Segmentlist is modified in place.
def shift(self, x): """ Shift the segmentlist by adding x to the upper and lower bounds of all segments. The algorithm is O(n) and does not require the list to be coalesced. Segmentlist is modified in place. """ for i in xrange(len(self)): self[i] = self[i].shift(x) return self
b8d62cdad939775ab60dde40de9755d5089bae1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/b8d62cdad939775ab60dde40de9755d5089bae1a/segments.py
[segment(11.0, 15)]
[segment(6.0, 15)]
def popitem(*args): raise NotImplementedError
8e48b6075bb8a5cd31c1c0ad7f6050e789bbb144 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/8e48b6075bb8a5cd31c1c0ad7f6050e789bbb144/segments.py