rem stringlengths 1 322k | add stringlengths 0 2.05M | context stringlengths 4 228k | meta stringlengths 156 215 |
|---|---|---|---|
return comp_lenghts_pos | return comp_lengths_pos | def _prepare_header(output, in_size, basename, mtime): """Returns a prepared gzip header StringIO. The gzip header is defined in RFC 1952. """ output.write("\x1f\x8b\x08") # Gzip-deflate identification flags = FEXTRA if basename: flags |= FNAME output.write(chr(flags)) # The mtime will be undefined if it does not fit... | 599e1e2a4e20b94572217d36e0d7135c9204a61d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4495/599e1e2a4e20b94572217d36e0d7135c9204a61d/compressor.py |
comp_lenghts_pos = output.tell() | comp_lengths_pos = output.tell() | def _write_extra_fields(output, in_size): """Writes the dictzip extra field. It will be initiated with zeros in chunk lengths. See man dictzip. """ num_chunks = in_size // CHUNK_LENGTH if in_size % CHUNK_LENGTH != 0: num_chunks += 1 field_length = 3*2 + 2 * num_chunks extra_length = 2*2 + field_length assert extra_len... | 599e1e2a4e20b94572217d36e0d7135c9204a61d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4495/599e1e2a4e20b94572217d36e0d7135c9204a61d/compressor.py |
return comp_lenghts_pos | return comp_lengths_pos | def _write_extra_fields(output, in_size): """Writes the dictzip extra field. It will be initiated with zeros in chunk lengths. See man dictzip. """ num_chunks = in_size // CHUNK_LENGTH if in_size % CHUNK_LENGTH != 0: num_chunks += 1 field_length = 3*2 + 2 * num_chunks extra_length = 2*2 + field_length assert extra_len... | 599e1e2a4e20b94572217d36e0d7135c9204a61d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4495/599e1e2a4e20b94572217d36e0d7135c9204a61d/compressor.py |
output = open(filename + ".gz", "wb") | output = open(filename + SUFFIX, "wb") | def main(): args = sys.argv[1:] if len(args) == 0: print >>sys.stderr, __doc__ sys.exit(1) for filename in args: input = open(filename, "rb") inputinfo = os.fstat(input.fileno()) basename = os.path.basename(filename) output = open(filename + ".gz", "wb") compressor.compress(input, inputinfo.st_size, output, basename,... | 98765916ea115983617ef488d3d87392abab75f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4495/98765916ea115983617ef488d3d87392abab75f7/command.py |
print >> cache_fh, ' '.join([lfn,pfn,' pool = "local"']) | print >> cache_fh, ' '.join([lfn,pfn,' pool="local"']) | def hipe_pfn_cache(cachename,globpat): """ create and return the name of a pfn cache containing files that match globpat. This is needed to manage the .input files that hipe creates. cachename = the name of the pfn cache file globpat = the pattern to search for """ cache_fh = open(cachename,"w") for file in glob.glob(... | 75581937a87bbd80bdc541181f98075089b9a4f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/75581937a87bbd80bdc541181f98075089b9a4f3/inspiralutils.py |
self.cache_name = os.path.join(self._CondorDAGNode__job.cache_dir, "%s.cache" % self.get_name()) | self.cache_name = os.path.join(self.cache_dir, "%s.cache" % self.get_name()) self.add_var_opt("input-cache", self.cache_name) | def set_name(self, *args): pipeline.CondorDAGNode.set_name(self, *args) self.cache_name = os.path.join(self._CondorDAGNode__job.cache_dir, "%s.cache" % self.get_name()) | 21092c700f762f841e8eba33e9f472c11ebd26af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/21092c700f762f841e8eba33e9f472c11ebd26af/cosmicstring.py |
for c in cache: filename = c.path() pipeline.CondorDAGNode.add_file_arg(self, filename) self.add_output_file(filename) | def add_input_cache(self, cache): if self.output_cache: raise AttributeError, "cannot change attributes after computing output cache" self.input_cache.extend(cache) for c in cache: filename = c.path() pipeline.CondorDAGNode.add_file_arg(self, filename) self.add_output_file(filename) | 21092c700f762f841e8eba33e9f472c11ebd26af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/21092c700f762f841e8eba33e9f472c11ebd26af/cosmicstring.py | |
cache_entry.url = "file://localhost" + os.path.abspath(filename) | def set_output(self, description): if self.output_cache: raise AttributeError, "cannot change attributes after computing output cache" cache_entry = power.make_cache_entry(self.input_cache, description, "") filename = os.path.join(self.output_dir, "%s-STRING_LIKELIHOOD_%s-%d-%d.xml.gz" % (cache_entry.observatory, cache... | 21092c700f762f841e8eba33e9f472c11ebd26af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/21092c700f762f841e8eba33e9f472c11ebd26af/cosmicstring.py | |
for arg in self.get_args(): if "--add-from-cache" in arg: f = file(self.cache_name, "w") for c in self.input_cache: print >>f, str(c) pipeline.CondorDAGNode.write_input_files(self, *args) break | f = file(self.cache_name, "w") for c in self.input_cache: print >>f, str(c) pipeline.CondorDAGNode.write_input_files(self, *args) | def write_input_files(self, *args): # oh. my. god. this is fscked. for arg in self.get_args(): if "--add-from-cache" in arg: f = file(self.cache_name, "w") for c in self.input_cache: print >>f, str(c) pipeline.CondorDAGNode.write_input_files(self, *args) break | 21092c700f762f841e8eba33e9f472c11ebd26af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/21092c700f762f841e8eba33e9f472c11ebd26af/cosmicstring.py |
injectionconfidence=0 | def loadDataFile(filename): print filename infile=open(filename,'r') formatstr=infile.readline().lstrip() header=formatstr.split() llines=[] import re dec=re.compile(r'[^\d.-]+') for line in infile: sline=line.split() proceed=True if len(sline)<1: print 'Ignoring empty line in input file: %s'%(sline) proceed=False for ... | 9d26385d15c782f3f1b49b2a4badf738fd4f2223 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/9d26385d15c782f3f1b49b2a4badf738fd4f2223/cbcBayesSkyRes.py | |
if injectionconfidence: | if injectionconfidence!=0: | 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... | 9d26385d15c782f3f1b49b2a4badf738fd4f2223 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/9d26385d15c782f3f1b49b2a4badf738fd4f2223/cbcBayesSkyRes.py |
twoDKdePath=os.path.join(margdir,par1_name+'-'+par2_name+'_2Dkernel.png') | figname=par1_name+'-'+par2_name+'_2Dkernel.png' twoDKdePath=os.path.join(margdir,figname) | 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... | 5f8152dff458ceb1a147c6c8d816e08c11982cd1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/5f8152dff458ceb1a147c6c8d816e08c11982cd1/cbcBayesPostProc.py |
html_tcmp_write+='<td width="30%"><img width="100%" src="'+twoDKdePath+'"/></td>' | html_tcmp_write+='<td width="30%"><img width="100%" src="2Dkde/'+twoDKdePath+'"/></td>' | 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... | 5f8152dff458ceb1a147c6c8d816e08c11982cd1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/5f8152dff458ceb1a147c6c8d816e08c11982cd1/cbcBayesPostProc.py |
html_tcmp.a("2D/",'All 2D Marginal PDFs') | html_tcmp.a("2Dkde/",'All 2D marginal PDFs (kde)') | 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... | 5f8152dff458ceb1a147c6c8d816e08c11982cd1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/5f8152dff458ceb1a147c6c8d816e08c11982cd1/cbcBayesPostProc.py |
if re.match('.*-[0-9]*-[0-9]*\.xml', dirname): | if re.match('.*-[0-9]*-[0-9]*\.xml$', dirname): | def get_all_files_in_range(dirname, starttime, endtime, pad=64): """Returns all files in dirname and all its subdirectories whose names indicate that they contain segments in the range starttime to endtime""" ret = [] # Maybe the user just wants one file... if os.path.isfile(dirname): if re.match('.*-[0-9]*-[0-9]*\.x... | e0fb7da226a60de170116ca2cc2d29e96e8f00ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/e0fb7da226a60de170116ca2cc2d29e96e8f00ed/segmentdb_utils.py |
elif re.match('.*-[0-9]*-[0-9]*\.xml', filename): | elif re.match('.*-[0-9]*-[0-9]*\.xml$', filename): | def get_all_files_in_range(dirname, starttime, endtime, pad=64): """Returns all files in dirname and all its subdirectories whose names indicate that they contain segments in the range starttime to endtime""" ret = [] # Maybe the user just wants one file... if os.path.isfile(dirname): if re.match('.*-[0-9]*-[0-9]*\.x... | e0fb7da226a60de170116ca2cc2d29e96e8f00ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/e0fb7da226a60de170116ca2cc2d29e96e8f00ed/segmentdb_utils.py |
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 just return return try: dagfile = open( self.__dag_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path | af0d11174f59a33954bcf909dedc86e1d0c82d73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af0d11174f59a33954bcf909dedc86e1d0c82d73/pipeline.py | ||
dagfile = open( self.__dag_file_path, 'w' ) | dagfile = open( self.__dax_file_path, 'w' ) | 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 just return return try: dagfile = open( self.__dag_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path | af0d11174f59a33954bcf909dedc86e1d0c82d73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af0d11174f59a33954bcf909dedc86e1d0c82d73/pipeline.py |
preamble = """\ <?xml version="1.0" encoding="UTF-8"?> | preamble = """<?xml version="1.0" encoding="UTF-8"?> | 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 just return return try: dagfile = open( self.__dag_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path | af0d11174f59a33954bcf909dedc86e1d0c82d73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af0d11174f59a33954bcf909dedc86e1d0c82d73/pipeline.py |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0" count="1" index="0" """ | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0" count="1" index="0" """ | 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 just return return try: dagfile = open( self.__dag_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path | af0d11174f59a33954bcf909dedc86e1d0c82d73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af0d11174f59a33954bcf909dedc86e1d0c82d73/pipeline.py |
if isinstance(node, LSCDataFindNode): | if self.is_dax() and isinstance(node, LSCDataFindNode): | 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 just return return try: dagfile = open( self.__dag_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path | af0d11174f59a33954bcf909dedc86e1d0c82d73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af0d11174f59a33954bcf909dedc86e1d0c82d73/pipeline.py |
os.getcwd(),node.job().get_dag_directory(),subgax_name) | os.getcwd(),node.job().get_dag_directory(),subdag_name) | 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 just return return try: dagfile = open( self.__dag_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path | af0d11174f59a33954bcf909dedc86e1d0c82d73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af0d11174f59a33954bcf909dedc86e1d0c82d73/pipeline.py |
print >>dagfile, """<dag id="%s" file="%s">""" % (id, subdag_name) | print >>dagfile, """<dag id="%s" file="%s">""" % (id_tag, subdag_name) | 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 just return return try: dagfile = open( self.__dag_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path | af0d11174f59a33954bcf909dedc86e1d0c82d73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af0d11174f59a33954bcf909dedc86e1d0c82d73/pipeline.py |
print >>dagfile, """<dax id="%s" file="%s">""" % (id, subdax_name) | print >>dagfile, """<dax id="%s" file="%s">""" % (id_tag, subdax_name) | 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 just return return try: dagfile = open( self.__dag_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path | af0d11174f59a33954bcf909dedc86e1d0c82d73 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/af0d11174f59a33954bcf909dedc86e1d0c82d73/pipeline.py |
outdir=opts.outpath | def histN(mat,N): Nd=size(N) histo=zeros(N) scale=array(map(lambda a,b:a/b,map(lambda a,b:(1*a)-b,map(max,mat),map(min,mat)),N)) axes=array(map(lambda a,N:linspace(min(a),max(a),N),mat,N)) bins=floor(map(lambda a,b:a/b , map(lambda a,b:a-b, mat, map(min,mat) ),scale*1.01)) hbins=reshape(map(int,bins.flat),bins.shape) ... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py | |
if debug: print "maxdx : %i , maxvalue: %f sample0 : %f sample1: %f"%(maxdx,maxvalue,sample[RAdim],sample[decdim]) | def skyhist_cart(skycarts,sky_samples): """ Histogram the list of samples into bins defined by Cartesian vectors in skycarts """ dot=np.dot N=len(skycarts) print 'operating on %d sky points'%(N) bins=np.zeros(N) for RAsample,decsample in sky_samples: sampcart=pol2cart(RAsample,decsample) maxdx=-1 maxvalue=-1 for i in x... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py | |
def loadDataFile(filename): print filename infile=open(filename,'r') formatstr=infile.readline().lstrip() formatstr=formatstr.replace('#','') header=formatstr.split() llines=[] import re dec=re.compile(r'[^\d.-]+') line_count=0 for line in infile: sline=line.split() proceed=True if len(sline)<1: print 'Ignoring empty ... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py | ||
print 'Read columns %s'%(str(header)) | print 'Read columns %s'%(str(header)) | def loadDataFile(filename): print filename infile=open(filename,'r') formatstr=infile.readline().lstrip() formatstr=formatstr.replace('#','') header=formatstr.split() llines=[] import re dec=re.compile(r'[^\d.-]+') line_count=0 for line in infile: sline=line.split() proceed=True if len(sline)<1: print 'Ignoring empty ... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py |
summary_fo=open('summary.ini','w') summary_file=ConfigParser() summary_file.add_section('metadata') summary_file.set('metadata','group_id','X') if opts.eventnum: summary_file.set('metadata','event_id',str(opts.eventnum)) summary_file.add_section('Confidence levels') summary_file.set('Confidence levels','confidence le... | def getinjpar(paramnames,inj,parnum): | def loadDataFile(filename): print filename infile=open(filename,'r') formatstr=infile.readline().lstrip() formatstr=formatstr.replace('#','') header=formatstr.split() llines=[] import re dec=re.compile(r'[^\d.-]+') line_count=0 for line in infile: sline=line.split() proceed=True if len(sline)<1: print 'Ignoring empty ... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py |
if injection: injpoint=map(lambda a: getinjpar(injection,a),range(len(paramnames))) injvals=map(str,injpoint) out=reduce(lambda a,b:a+'||'+b,injvals) print 'Injected values:' print out summary_file.add_section('Injection values') for parnum in range(len(paramnames)): summary_file.set('Injection values',paramnames[p... | def getinjpar(inj,parnum): if paramnames[parnum]=='mchirp' or paramnames[parnum]=='mc': return inj.mchirp if paramnames[parnum]=='mass1' or paramnames[parnum]=='m1': (m1,m2)=mc2ms(inj.mchirp,inj.eta) return m1 if paramnames[parnum]=='mass2' or paramnames[parnum]=='m2': (m1,m2)=mc2ms(inj.mchirp,inj.eta) return m2 if par... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py | |
def plot2Dbins(toppoints,cl,par1_name,par1_bin,par2_name,par2_bin,injpoint): | def plot2Dbins(toppoints,par1_bin,par2_bin,outdir,par1name=None,par2name=None,injpoint=None): | def plot2Dbins(toppoints,cl,par1_name,par1_bin,par2_name,par2_bin,injpoint): #Work out good bin size xbins=int(ceil((max(toppoints[:,0])-min(toppoints[:,0]))/par1_bin)) ybins=int(ceil((max(toppoints[:,1])-min(toppoints[:,1]))/par2_bin)) _dpi=120 xsize_in_inches=6. xsize_points = xsize_in_inches * _dpi points_per_bin_... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py |
plt.title("%s-%s histogram (greedy binning)"%(par1_name,par2_name)) | plt.title("%s-%s histogram (greedy binning)"%(par1name,par2name)) | def plot2Dbins(toppoints,cl,par1_name,par1_bin,par2_name,par2_bin,injpoint): #Work out good bin size xbins=int(ceil((max(toppoints[:,0])-min(toppoints[:,0]))/par1_bin)) ybins=int(ceil((max(toppoints[:,1])-min(toppoints[:,1]))/par2_bin)) _dpi=120 xsize_in_inches=6. xsize_points = xsize_in_inches * _dpi points_per_bin_... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py |
myfig.savefig(os.path.join(outdir,'2Dbins',par1_name+'-'+par2_name+'.png'),dpi=_dpi) | myfig.savefig(os.path.join(outdir,'2Dbins',par1name+'-'+par2name+'.png'),dpi=_dpi) | def plot2Dbins(toppoints,cl,par1_name,par1_bin,par2_name,par2_bin,injpoint): #Work out good bin size xbins=int(ceil((max(toppoints[:,0])-min(toppoints[:,0]))/par1_bin)) ybins=int(ceil((max(toppoints[:,1])-min(toppoints[:,1]))/par2_bin)) _dpi=120 xsize_in_inches=6. xsize_points = xsize_in_inches * _dpi points_per_bin_... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py |
def plotSkyMap(skypos,skyres,sky_injpoint): | def plotSkyMap(skypos,skyres,sky_injpoint,confidence_levels,pos,outdir): | def plot2Dbins(toppoints,cl,par1_name,par1_bin,par2_name,par2_bin,injpoint): #Work out good bin size xbins=int(ceil((max(toppoints[:,0])-min(toppoints[:,0]))/par1_bin)) ybins=int(ceil((max(toppoints[:,1])-min(toppoints[:,1]))/par2_bin)) _dpi=120 xsize_in_inches=6. xsize_points = xsize_in_inches * _dpi points_per_bin_... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py |
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... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py | ||
(skyinjectionconfidence,toppoints,skyreses)=bayespputils.calculateConfidenceLevels(shist,skypoints,injbin,float(opts.skyres),confidence_levels,len(pos)) | (skyinjectionconfidence,toppoints,skyreses)=bayespputils.calculateConfidenceLevels(shist,skypoints,injbin,float(skyres),confidence_levels,len(pos)) | 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... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py |
min_sky_area_containing_injection=float(opts.skyres)*float(opts.skyres)*i | min_sky_area_containing_injection=float(skyres)*float(skyres)*i | 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... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py |
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... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py | ||
skyreses=None if opts.skyres is not None: RAvec=array(pos)[:,paramnames.index('RA')] decvec=array(pos)[:,paramnames.index('dec')] skypos=column_stack([RAvec,decvec]) | 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... | 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... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py |
skyreses,skyinjectionconfidence=plotSkyMap(skypos,opts.skyres,(injpoint[RAdim],injpoint[decdim])) else: skyreses,skyinjectionconfidence=plotSkyMap(skypos,opts.skyres,None) myfig=plt.figure(1,figsize=(6,4),dpi=80) plt.clf() summary_file.add_section('2D greedy cl') ncon=len(confidence_levels) pos_array=np.array(pos... | injpoint=map(lambda a: getinjpar(paramnames,injection,a),range(len(paramnames))) injvals=map(str,injpoint) out=reduce(lambda a,b:a+'||'+b,injvals) print 'Injected values:' print out summary_file.add_section('Injection values') for parnum in range(len(paramnames)): summary_file.set('Injection values',paramnames[parnu... | 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... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py |
for j in range(par1pos_Nbins): greedyPoints[j+par1pos_Nbins*i,0]=par1_point greedyPoints[j+par1pos_Nbins*i,1]=par2_point par1_point+=par1_bin par2_point+=par2_bin injbin=None if injection: par1_injvalue=np.array(injpoint)[par1_index] par2_injvalue=np.array(injpoint)[par2_index] if par1_injvalue is not None and par2... | par2_point=par2pos_min for i in range(par2pos_Nbins): par1_point=par1pos_min for j in range(par1pos_Nbins): greedyPoints[j+par1pos_Nbins*i,0]=par1_point greedyPoints[j+par1pos_Nbins*i,1]=par2_point par1_point+=par1_bin par2_point+=par2_bin injbin=None if injection: par1_injvalue=np.array(injpoint)[par1_index] par2_... | 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... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py |
greedyHist[par_binNumber]+=1 except IndexError: print "IndexError: bin number: %i total bins: %i parsamp: %f bin: %f - %f"%(par_binNumber,parpos_Nbins,par_samp,greedyPoints[par_binNumber-1,0],greedyPoints[par_binNumber-1,0]+par_bin) injbin=None if injection: par_injvalue=np.array(injpoint)[par_index] if par_injvalu... | par_index=paramnames.index(par_name) except ValueError: print "No input chain for %s, skipping binning."%par_name continue try: par_bin=GreedyRes[par_name] except KeyError: print "Bin size is not set for %s, skipping binning."%par_name continue oneDGreedyCL[par_name]={} oneDStats[par_name]={} oneDContCL[par_name]={} ... | 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... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py |
left+=1 right+=1 if max_frac is not None: break if max_frac is None: print "Cant determine intervals at %f confidence!"%confidence_level | else: if frac>max_frac: max_frac=frac max_left=left max_right=right left+=1 right+=1 if max_frac is not None: break if max_frac is None: print "Cant determine intervals at %f confidence!"%confidence_level else: summary_file.set('1D contigious cl',par_name,'['+str(max_left*par_bin)+','+str(max_right*par_bin)+','+str((m... | 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... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py |
summary_file.set('1D contigious cl',par_name,'['+str(max_left*par_bin)+','+str(max_right*par_bin)+','+str((max_right-max_left)*par_bin)+']') k=j while k+1<len(confidence_levels) : if confidence_levels[k+1]<max_frac: j+=1 k+=1 j+=1 (injectionconfidence,toppoints,reses)=bayespputils.calculateConfidenceLevels(greedyH... | htmlfile.write('<p>Injection not found in posterior bins in sky location!</p>') htmlfile.write('<h5>2D Marginal PDFs</h5><br>') htmlfile.write('<table border=1><tr>') if skyres is not None: htmlfile.write('<td width=30%><img width=100% src="skymap.png"></td>') else: htmlfile.write('<td width=30%><img width=100% src... | 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... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.py |
z = kde(grid_coords.T) z = z.reshape(Nx,Ny) asp=xax.ptp()/yax.ptp() plt.imshow(z,extent=(xax[0],xax[-1],yax[0],yax[-1]),aspect=asp,origin='lower') plt.colorbar() for par1,par2 in twoDplots: try: i=paramnames.index(par1) except ValueError: print "No input chain for %s, skipping 2D plot of %s-%s."%(par1,par1,par2) c... | cbcBayesSkyRes(opts.outpath,opts.data,oneDMenu,twoDGreedyMenu,greedyRes,confidenceLevels,twoDplots,injfile=opts.injfile,eventnum=opts.eventnum,skyres=opts.skyres) | def plot2Dkernel(xdat,ydat,Nx,Ny): xax=np.linspace(min(xdat),max(xdat),Nx) yax=np.linspace(min(ydat),max(ydat),Ny) x,y=np.meshgrid(xax,yax) samp=array([xdat,ydat]) kde=stats.kde.gaussian_kde(samp) grid_coords = np.append(x.reshape(-1,1),y.reshape(-1,1),axis=1) z = kde(grid_coords.T) z = z.reshape(Nx,Ny) asp=xax.ptp()/... | 6b7383178dfc3e0bc72b88b696c5636f91f41a6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/6b7383178dfc3e0bc72b88b696c5636f91f41a6d/cbcBayesSkyRes.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"): | 28cb4edc339b00e96a52afd22c9d77521a7a7003 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/28cb4edc339b00e96a52afd22c9d77521a7a7003/stfu_pipe.py |
period = float(binjjob.get_opts()["time-step"]) / math.pi | period = float(binjjob.get_opts()["time-step"]) | def make_binj_fragment(dag, seg, tag, offset, flow = None, fhigh = None): # one injection every time-step / pi seconds period = float(binjjob.get_opts()["time-step"]) / math.pi # adjust start time to be commensurate with injection period start = seg[0] - seg[0] % period + period * offset node = BurstInjNode(binjjob) ... | 0c24df4b078e9713ce74d1d04dffacbb1da1bd7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/0c24df4b078e9713ce74d1d04dffacbb1da1bd7c/power.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... | 058fb73d9a07d6c104f62ca589cbbc9413cf8f55 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/058fb73d9a07d6c104f62ca589cbbc9413cf8f55/ligolw_cafe.py |
if ' ' in self.__options[c] and '$(macro' not in self.__options[c]: self.__options[c] = ''.join([ "'", self.__options[c], "'" ]) | def write_sub_file(self): """ Write a submit file for this Condor job. """ if not self.__log_file: raise CondorSubmitError, "Log file not specified." if not self.__err_file: raise CondorSubmitError, "Error file not specified." if not self.__out_file: raise CondorSubmitError, "Output file not specified." | 3dd1a9df24c5987d3256ef99ff254e16a9c7f94d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/3dd1a9df24c5987d3256ef99ff254e16a9c7f94d/pipeline.py | |
if ' ' in self.__short_options[c] and '$(macro' not in self.__short_options[c]: self.__short_options[c] = ''.join([ "'", self.__short_options[c], "'" ]) | def write_sub_file(self): """ Write a submit file for this Condor job. """ if not self.__log_file: raise CondorSubmitError, "Log file not specified." if not self.__err_file: raise CondorSubmitError, "Error file not specified." if not self.__out_file: raise CondorSubmitError, "Output file not specified." | 3dd1a9df24c5987d3256ef99ff254e16a9c7f94d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/3dd1a9df24c5987d3256ef99ff254e16a9c7f94d/pipeline.py | |
print >>dagfile, """\ | print >>dagfile, """ | 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 | a7bd5749d7e3884dc25892a5f5265bab9a159fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a7bd5749d7e3884dc25892a5f5265bab9a159fab/pipeline.py |
template = """ <profile namespace="condor" key="universe">%s</profile>""" | template = """ <profile namespace="condor" key="universe">%s</profile>\n""" | 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 | a7bd5749d7e3884dc25892a5f5265bab9a159fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a7bd5749d7e3884dc25892a5f5265bab9a159fab/pipeline.py |
print >>dagfile, xml | print >>dagfile, xml, | 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 | a7bd5749d7e3884dc25892a5f5265bab9a159fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a7bd5749d7e3884dc25892a5f5265bab9a159fab/pipeline.py |
from glue import LDRdataFindClient if isinstance( filename, LDRdataFindClient.lfnlist ): self.add_var_opt('glob-frame-data',' ') for lfn in filename: a, b, c, d = lfn.split('.')[0].split('-') t_start = int(c) t_end = int(c) + int(d) if (t_start <= (self.__data_end+int(d)+1) and t_end >= (self.__data_start-int(d)-1))... | raise CondorDAGNodeError, "Unknown LFN cache format" | def set_cache(self,filename): """ Set the LAL frame cache to to use. The frame cache is passed to the job with the --frame-cache argument. @param filename: calibration file to use. """ if isinstance( filename, str ): # the name of a lal cache file created by a datafind node self.add_var_opt('frame-cache', filename) sel... | a7bd5749d7e3884dc25892a5f5265bab9a159fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a7bd5749d7e3884dc25892a5f5265bab9a159fab/pipeline.py |
def parse(self): | def parse(self,type_regex=None): | def parse(self): """ Each line of the frame cache file is like the following: | a7bd5749d7e3884dc25892a5f5265bab9a159fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a7bd5749d7e3884dc25892a5f5265bab9a159fab/pipeline.py |
count = 0 countIncluded = 0 | def parse(self): """ Each line of the frame cache file is like the following: | a7bd5749d7e3884dc25892a5f5265bab9a159fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a7bd5749d7e3884dc25892a5f5265bab9a159fab/pipeline.py | |
count += 1 | if type_filter and type_filter.search(line) is None: continue | def parse(self): """ Each line of the frame cache file is like the following: | a7bd5749d7e3884dc25892a5f5265bab9a159fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a7bd5749d7e3884dc25892a5f5265bab9a159fab/pipeline.py |
def parse(self): """ Each line of the frame cache file is like the following: | a7bd5749d7e3884dc25892a5f5265bab9a159fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a7bd5749d7e3884dc25892a5f5265bab9a159fab/pipeline.py | ||
msg = "The combination %s is not unique in the frame cache file" % str(key) | msg = "The combination %s is not unique in the frame cache file" \ % str(key) | def parse(self): """ Each line of the frame cache file is like the following: | a7bd5749d7e3884dc25892a5f5265bab9a159fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a7bd5749d7e3884dc25892a5f5265bab9a159fab/pipeline.py |
countIncluded += 1 f.close() cache['gwf'] = gwfDict | f.close() cache['gwf'] = gwfDict | def parse(self): """ Each line of the frame cache file is like the following: | a7bd5749d7e3884dc25892a5f5265bab9a159fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a7bd5749d7e3884dc25892a5f5265bab9a159fab/pipeline.py |
else: self.__lsync_cache = None | def __init__(self,cache_dir,log_dir,config_file,dax=0,lsync_cache_file=None): """ @param cache_dir: the directory to write the output lal cache files to. @param log_dir: the directory to write the stderr file to. @param config_file: ConfigParser object containing the path to the LSCdataFind executable in the [condor] s... | a7bd5749d7e3884dc25892a5f5265bab9a159fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a7bd5749d7e3884dc25892a5f5265bab9a159fab/pipeline.py | |
if certFile and keyFile: h = httplib.HTTPSConnection(server, key_file = keyFile, cert_file = certFile) | if cert and key: h = httplib.HTTPSConnection(server, key_file = key, cert_file = cert) | def get_output(self): """ Return the output file, i.e. the file containing the frame cache data. or the files itself as tuple (for DAX) """ if self.__dax: # we are a dax running in grid mode so we need to resolve the # frame file metadata into LFNs so pegasus can query the RLS if self.__lfn_list is None: | a7bd5749d7e3884dc25892a5f5265bab9a159fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a7bd5749d7e3884dc25892a5f5265bab9a159fab/pipeline.py |
def get_coincs(self, eventlists, event_comparefunc, thresholds, verbose = False): # # has this node already been visited? if so, return the # answer we already know # | 71af8d610e523e41824de1730bcf4bdab75f12fc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/71af8d610e523e41824de1730bcf4bdab75f12fc/snglcoinc.py | ||
(self.coint.type,sngl.ifo,sngl.ifo,timeString) | (self.coinc.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*/%s-analyseQscan_%s_%s_rds*.cache"%\ (self.coint.ty... | 04ee230753c51cc2fa6261a2cf36152529f9394e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/04ee230753c51cc2fa6261a2cf36152529f9394e/makeCheckListWiki.py |
sys.stdout.write("Found: %s\n",publication_directory) | sys.stdout.write("Found: %s\n" %(publication_directory)) | 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) | 04ee230753c51cc2fa6261a2cf36152529f9394e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/04ee230753c51cc2fa6261a2cf36152529f9394e/makeCheckListWiki.py |
sys.stdout.write("Found: %s\n",publication_url) | sys.stdout.write("Found: %s\n" %(publication_url)) | 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) | 04ee230753c51cc2fa6261a2cf36152529f9394e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/04ee230753c51cc2fa6261a2cf36152529f9394e/makeCheckListWiki.py |
msg = "%s does not have permission to update row entries" % subject msg += " created by %s (process_id %s)" % (dn, known_proc[pid][0]) raise ServerHandlerException, msg | msg = "\"%s\" does not match dn in existing row entries: " % subject msg += "%s (process_id %s)" % (dn, known_proc[pid][0]) logger.warn(msg) | uniq_def = (row[ifos_col],row[name_col],row[vers_col]) | 472da4ef86a559c3f653bcf8dc9b20d5605d9c44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/472da4ef86a559c3f653bcf8dc9b20d5605d9c44/LDBDWServer.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) | eee2a7f04265d53a4933a8bcfbb49cb47bd30f44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/eee2a7f04265d53a4933a8bcfbb49cb47bd30f44/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... | eee2a7f04265d53a4933a8bcfbb49cb47bd30f44 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/eee2a7f04265d53a4933a8bcfbb49cb47bd30f44/sphericalutils.py |
class InspiralAnalysisJob(pipeline.CondorDAGJob, pipeline.AnalysisJob): | class InspiralAnalysisJob(pipeline.AnalysisJob, pipeline.CondorDAGJob): | def __init__(self, args=None): self.args = args | a1ebb3ed6454d4f4a8100deaa2f286012d72028d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a1ebb3ed6454d4f4a8100deaa2f286012d72028d/inspiral.py |
class InspiralAnalysisNode(pipeline.CondorDAGNode, pipeline.AnalysisNode): | class InspiralAnalysisNode(pipeline.AnalysisNode, pipeline.CondorDAGNode): | def __init__(self, cp, dax = False): """ @cp: a ConfigParser object from which the options are read. """ exec_name = 'inspinjfind' sections = ['inspinjfind'] extension = 'xml' InspiralAnalysisJob.__init__(self, cp, sections, exec_name, extension, dax) self.add_condor_cmd('getenv', 'True') # overwrite standard log file ... | a1ebb3ed6454d4f4a8100deaa2f286012d72028d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a1ebb3ed6454d4f4a8100deaa2f286012d72028d/inspiral.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... | d4e5cf55a233130a9e8e244eb51db7232816cc27 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/d4e5cf55a233130a9e8e244eb51db7232816cc27/sphericalutils.py |
return None | raise Warning, "input to __patchFrameTypeDef__ included a \ gps time argument specified as None\n" return frametype | 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: return None if gpstime == None: return None if ifo == None: return None endOfS5=int(875232014) new=Non... | 90b92f8357c22c5ae1a2f077fa4f8667b43d588a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/90b92f8357c22c5ae1a2f077fa4f8667b43d588a/makeCheckListWiki.py |
return None | raise Warning, "input to __patchFrameTypeDef__ included an \ ifo argument specified as None\n" return frametype | 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: return None if gpstime == None: return None if ifo == None: return None endOfS5=int(875232014) new=Non... | 90b92f8357c22c5ae1a2f077fa4f8667b43d588a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/90b92f8357c22c5ae1a2f077fa4f8667b43d588a/makeCheckListWiki.py |
new=None | 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: return None if gpstime == None: return None if ifo == None: return None endOfS5=int(875232014) new=Non... | 90b92f8357c22c5ae1a2f077fa4f8667b43d588a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/90b92f8357c22c5ae1a2f077fa4f8667b43d588a/makeCheckListWiki.py | |
orig=frametype new=ifo+"_"+frametype return new | return ifo+"_"+frametype return frametype | 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: return None if gpstime == None: return None if ifo == None: return None endOfS5=int(875232014) new=Non... | 90b92f8357c22c5ae1a2f077fa4f8667b43d588a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/90b92f8357c22c5ae1a2f077fa4f8667b43d588a/makeCheckListWiki.py |
fileListing.append(entry) | finalList.append(entry) | 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. It uses the pathing information from the files passed via cacheListing to aid in our filesystem search. """ #Open the cache entry and search for those en... | 2ecdb740cf7779b329f5e5208424d8c61de2993d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2ecdb740cf7779b329f5e5208424d8c61de2993d/makeCheckListWiki.py |
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. It uses the pathing information from the files passed via cacheListing to aid in our filesystem search. """ #Open the cache entry and search for those en... | 2ecdb740cf7779b329f5e5208424d8c61de2993d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2ecdb740cf7779b329f5e5208424d8c61de2993d/makeCheckListWiki.py | ||
def get_findVetos(self): tmpList=list() #H1,H2,L1-findFlags_H1,H2,L1_831695156.714.wiki #instrument,ifos ifoString="" for i in range(0,len(self.coinc.ifos)/2):ifoString=ifoString+"%s,"%self.coinc.ifos[2*i:2*i+2] ifoString=ifoString.rstrip(",") insString="" for i in range(0,len(self.coinc.instruments)/2):insString=insSt... | 2ecdb740cf7779b329f5e5208424d8c61de2993d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2ecdb740cf7779b329f5e5208424d8c61de2993d/makeCheckListWiki.py | ||
myMask="*%s*%s-findVetos_%s_%s.wiki"%\ | myMask="*%s/*%s-findVetos_%s_%s.wiki"%\ | def get_findVetos(self): tmpList=list() #H1,H2,L1-findFlags_H1,H2,L1_831695156.714.wiki #instrument,ifos ifoString="" for i in range(0,len(self.coinc.ifos)/2):ifoString=ifoString+"%s,"%self.coinc.ifos[2*i:2*i+2] ifoString=ifoString.rstrip(",") insString="" for i in range(0,len(self.coinc.instruments)/2):insString=insSt... | 2ecdb740cf7779b329f5e5208424d8c61de2993d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2ecdb740cf7779b329f5e5208424d8c61de2993d/makeCheckListWiki.py |
myMask="*%s*%s-findFlags_%s_%s.wiki"%\ | myMask="*%s/*%s-findFlags_%s_%s.wiki"%\ | def get_findFlags(self): """ """ tmpList=list() #H1,H2,L1-findFlags_H1,H2,L1_831695156.714.wiki #instrument,ifos ifoString="" for i in range(0,len(self.coinc.ifos)/2):ifoString=ifoString+"%s,"%self.coinc.ifos[2*i:2*i+2] ifoString=ifoString.rstrip(",") insString="" for i in range(0,len(self.coinc.instruments)/2):insStri... | 2ecdb740cf7779b329f5e5208424d8c61de2993d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2ecdb740cf7779b329f5e5208424d8c61de2993d/makeCheckListWiki.py |
(self.coint.type,sngl.ifo,sngl.ifo,timeString) | (self.coinc.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*/%s-analyseQscan_%s_%s_rds*.cache"%\ (self.coint.ty... | 2ecdb740cf7779b329f5e5208424d8c61de2993d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2ecdb740cf7779b329f5e5208424d8c61de2993d/makeCheckListWiki.py |
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... | 2ecdb740cf7779b329f5e5208424d8c61de2993d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2ecdb740cf7779b329f5e5208424d8c61de2993d/makeCheckListWiki.py | ||
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... | 2ecdb740cf7779b329f5e5208424d8c61de2993d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2ecdb740cf7779b329f5e5208424d8c61de2993d/makeCheckListWiki.py | ||
while os.path.exists(wikiFilename) and maxCount < 10: | while os.path.exists(wikiFilename) and maxCount < 15: | 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... | 2ecdb740cf7779b329f5e5208424d8c61de2993d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2ecdb740cf7779b329f5e5208424d8c61de2993d/makeCheckListWiki.py |
sys.stdout.write("Found: %s\n",publication_directory) | sys.stdout.write("Found: %s\n"%publication_directory) | 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) | 2ecdb740cf7779b329f5e5208424d8c61de2993d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2ecdb740cf7779b329f5e5208424d8c61de2993d/makeCheckListWiki.py |
sys.stdout.write("Found: %s\n",publication_url) | sys.stdout.write("Found: %s\n"%publication_url) | 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) | 2ecdb740cf7779b329f5e5208424d8c61de2993d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/2ecdb740cf7779b329f5e5208424d8c61de2993d/makeCheckListWiki.py |
for sngl in coincEvent.sngl_inspiral.itervalues(): myArgString=myArgString+"%s,"%sngl.ifo | if hasattr(coincEvent, "sngl_inspiral"): for sngl in coincEvent.sngl_inspiral.itervalues(): myArgString=myArgString+"%s,"%sngl.ifo elif hasattr(coincEvent, "ifos_list"): for ifo in coincEvent.ifos_list: myArgString=myArgString+"%s,"%ifo | def __init__(self, dag, job, cp, opts, coincEvent=None): """ """ self.__conditionalLoadDefaults__(findFlagsNode.defaults,cp) pipeline.CondorDAGNode.__init__(self,job) self.add_var_opt("trigger-time",coincEvent.time) #Output filename oFilename="%s-findFlags_%s_%s.wiki"%(coincEvent.instruments, coincEvent.ifos, coincEven... | 130ebf309860df4889826c32bceaee7ddd882e7f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/130ebf309860df4889826c32bceaee7ddd882e7f/stfu_pipe.py |
for sngl in coincEvent.sngl_inspiral.itervalues(): myArgString=myArgString+"%s,"%sngl.ifo | if hasattr(coincEvent, "sngl_inspiral"): for sngl in coincEvent.sngl_inspiral.itervalues(): myArgString=myArgString+"%s,"%sngl.ifo elif hasattr(coincEvent, "ifos_list"): for ifo in coincEvent.ifos_list: myArgString=myArgString+"%s,"%ifo | 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... | 130ebf309860df4889826c32bceaee7ddd882e7f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/130ebf309860df4889826c32bceaee7ddd882e7f/stfu_pipe.py |
cellString=cellString+" %s "%self.linkedRemoteImage(thumbs[ifo][myOmegaIndex], | cellString=cellString+" %s "%self.linkedRemoteImage(thumbs[ifo][myOmegaIndexT], | def insertAnalyzeQscanTable(self, images=None, thumbs=None, indexes=None, imagesAQ=None, thumbsAQ=None, indexesAQ=None, channelRanks=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 to change th... | 427c4b33ce7a947c2072db62020e1f9a2d395239 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/427c4b33ce7a947c2072db62020e1f9a2d395239/makeCheckListWiki.py |
cellString=cellString+" %s "%self.linkedRemoteImage(thumbsAQ[ifo][myAQIndex], | cellString=cellString+" %s "%self.linkedRemoteImage(thumbsAQ[ifo][myAQIndexT], | def insertAnalyzeQscanTable(self, images=None, thumbs=None, indexes=None, imagesAQ=None, thumbsAQ=None, indexesAQ=None, channelRanks=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 to change th... | 427c4b33ce7a947c2072db62020e1f9a2d395239 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/427c4b33ce7a947c2072db62020e1f9a2d395239/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... | c64520f211dcf13695883191b82cf519c4889317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/c64520f211dcf13695883191b82cf519c4889317/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... | c64520f211dcf13695883191b82cf519c4889317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/c64520f211dcf13695883191b82cf519c4889317/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... | c64520f211dcf13695883191b82cf519c4889317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/c64520f211dcf13695883191b82cf519c4889317/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... | c64520f211dcf13695883191b82cf519c4889317 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/c64520f211dcf13695883191b82cf519c4889317/makeCheckListWiki.py |
import sqlite3 | import sqlite3 | def set_temp_store_directory( connection, temp_store_directory, verbose = False ): """ Sets the temp_store_directory parameter in sqlite. """ try: import sqlite3 except ImportError: # pre 2.5.x from pysqlite2 import dbapi2 as sqlite3 if verbose: print >> sys.stderr, "setting the temp_store_directory to %s" % temp_stor... | 98147701cf04e51d748c843d2db3236a5f201722 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/98147701cf04e51d748c843d2db3236a5f201722/dbtables.py |
from pysqlite2 import dbapi2 as sqlite3 | from pysqlite2 import dbapi2 as sqlite3 | def set_temp_store_directory( connection, temp_store_directory, verbose = False ): """ Sets the temp_store_directory parameter in sqlite. """ try: import sqlite3 except ImportError: # pre 2.5.x from pysqlite2 import dbapi2 as sqlite3 if verbose: print >> sys.stderr, "setting the temp_store_directory to %s" % temp_stor... | 98147701cf04e51d748c843d2db3236a5f201722 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/98147701cf04e51d748c843d2db3236a5f201722/dbtables.py |
print >> sys.stderr, "setting the temp_store_directory to %s" % temp_store_directory | print >> sys.stderr, "setting the temp_store_directory to %s ..." % temp_store_directory | def set_temp_store_directory( connection, temp_store_directory, verbose = False ): """ Sets the temp_store_directory parameter in sqlite. """ try: import sqlite3 except ImportError: # pre 2.5.x from pysqlite2 import dbapi2 as sqlite3 if verbose: print >> sys.stderr, "setting the temp_store_directory to %s" % temp_stor... | 98147701cf04e51d748c843d2db3236a5f201722 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/98147701cf04e51d748c843d2db3236a5f201722/dbtables.py |
flines[:,i]=asin(flines[:,i]) | flines[:,i]=arcsin(flines[:,i]) | def loadDataFile(filename): print filename infile=open(filename,'r') formatstr=infile.readline().lstrip() header=formatstr.split() llines=[] import re dec=re.compile(r'[^\d.-]+') for line in infile: sline=line.split() proceed=True for s in sline: if dec.search(s) is not None: print 'Warning! Ignoring non-numeric data a... | f9cf47f36c4b265a40824c9056905324afc8be9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/f9cf47f36c4b265a40824c9056905324afc8be9c/cbcBayesSkyRes.py |
flines[:,i]=acos(flines[:,i]) | flines[:,i]=arccos(flines[:,i]) | def loadDataFile(filename): print filename infile=open(filename,'r') formatstr=infile.readline().lstrip() header=formatstr.split() llines=[] import re dec=re.compile(r'[^\d.-]+') for line in infile: sline=line.split() proceed=True for s in sline: if dec.search(s) is not None: print 'Warning! Ignoring non-numeric data a... | f9cf47f36c4b265a40824c9056905324afc8be9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/f9cf47f36c4b265a40824c9056905324afc8be9c/cbcBayesSkyRes.py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.