bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def __init__(self, dag, job, cp, opts, sngl, frame_cache, chia, tag, p_nodes=[]):
def __init__(self, dag, job, cp, opts, sngl, frame_cache, chia, tag, p_nodes=[]):
479,400
def __init__(self, dag, job, cp, opts, coinc, inspiral_node_dict, chia_node =None, p_nodes = []):
def __init__(self, dag, job, cp, opts, coinc, inspiral_node_dict, chia_node =None, p_nodes = []):
479,401
def background_livetime_nonring_by_slide(connection, seglists, veto_segments=None, verbose = False): # get the segment lists and live time # FIXME veto segments not handled yet zero_lag_time_slides, background_time_slides = SnglBurstUtils.get_time_slides(connection) instruments = frozenset(seglists.keys()) background_l...
def background_livetime_nonring_by_slide(connection, seglists, veto_segments=None, verbose = False): # get the segment lists and live time # FIXME veto segments not handled yet zero_lag_time_slides, background_time_slides = SnglBurstUtils.get_time_slides(connection) instruments = frozenset(seglists.keys()) background_l...
479,402
def background_livetime_ring_by_slide(connection, live_time_program, seglists, veto_segments, verbose = False): background_livetime = {} instruments = frozenset(seglists.keys()) offset_vectors = db_thinca_rings.get_background_offset_vectors(connection) # first work out time slide live time for on_instruments, livetimes...
def background_livetime_ring_by_slide(connection, live_time_program, seglists, veto_segments, verbose = False): background_livetime = {} instruments = frozenset(seglists.keys()) offset_vectors = db_thinca_rings.get_background_offset_vectors(connection) # first work out time slide live time for on_instruments, livetimes...
479,403
def playground_nonplayground_livetime(seglists, playground_segs=None, verbose=False): playground_livetime = {} nonplayground_livetime = {} instruments = frozenset(seglists.keys()) for on_inst, off_inst in detector_combos(list(instruments)): on_inst = frozenset(on_inst) off_inst = frozenset(off_inst) key = lsctables.ifo...
def playground_nonplayground_livetime(seglists, playground_segs=None, verbose=False): playground_livetime = {} nonplayground_livetime = {} instruments = frozenset(seglists.keys()) for on_inst, off_inst in detector_combos(list(instruments)): on_inst = frozenset(on_inst) off_inst = frozenset(off_inst) key = lsctables.ifo...
479,404
def get_veto_segments(connection, program_name, veto_segments_name=None): veto_segments = segments.segmentlistdict() #FIXME only handles thinca case if not veto_segments_name: return veto_segments if program_name == "thinca": veto_segments = db_thinca_rings.get_veto_segments(connection, veto_segments_name) return veto_...
def get_veto_segments(connection, program_name, veto_segments_name=None): veto_segments = segments.segmentlistdict() #FIXME only handles thinca case if not veto_segments_name: return veto_segments if program_name == "thinca": veto_segments = db_thinca_rings.get_veto_segments(connection, veto_segments_name) return veto_...
479,405
def get_segments(connection, xmldoc, program_name): seglists = segments.segmentlistdict() if program_name == "thinca": seglists = db_thinca_rings.get_thinca_zero_lag_segments(connection, program_name) if program_name == "gstlal_inspiral": seglists = llwapp.segmentlistdict_fromsearchsummary(xmldoc, program_name).coalesc...
def get_segments(connection, xmldoc, program_name): seglists = segments.segmentlistdict() if program_name == "thinca": seglists = db_thinca_rings.get_thinca_zero_lag_segments(connection, program_name) if program_name == "gstlal_inspiral": seglists = llwapp.segmentlistdict_fromsearchsummary(xmldoc, program_name).coalesc...
479,406
def cbcBayesSkyRes(outdir,data,oneDMenu,twoDGreedyMenu,GreedyRes,confidence_levels,twoDplots,injfile=None,eventnum=None,skyres=None,bayesfactornoise=None,bayesfactorcoherent=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: prin...
def cbcBayesSkyRes(outdir,data,oneDMenu,twoDGreedyMenu,GreedyRes,confidence_levels,twoDplots,injfile=None,eventnum=None,skyres=None,bayesfactornoise=None,bayesfactorcoherent=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: prin...
479,407
def __init__(self, dag, job, cp, opts, ifo, p_nodes=[], type=""):
def __init__(self, dag, job, cp, opts, ifo, p_nodes=[], type=""):
479,408
def pkgconfig(*packages, **kw): import commands flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'} for token in commands.getoutput("pkg-config --libs --cflags %s" % ' '.join(packages)).split(): kw.setdefault(flag_map.get(token[:2]), []).append(token[2:]) return kw
def pkgconfig(*packages, **kw): import commands flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'} for token in commands.getoutput("pkg-config --libs --cflags %s" % ' '.join(packages)).split(): kw.setdefault(flag_map.get(token[:2]), []).append(token[2:]) return kw
479,409
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...
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...
479,410
def P(self, params_func, events, offsetdict, *params_func_extra_args): P_bak = 1.0 P_inj = 1.0 for name, value in params_func(events, offsetdict, *params_func_extra_args).items(): P_bak *= self.background_rates[name](*value)[0] P_inj *= self.injection_rates[name](*value)[0] return P_bak, P_inj
def P(self, params_func, events, offsetdict, *params_func_extra_args): P_bak = 1.0 P_inj = 1.0 for name, value in sorted(params_func(events, offsetdict, *params_func_extra_args).items()): P_bak *= self.background_rates[name](*value)[0] P_inj *= self.injection_rates[name](*value)[0] return P_bak, P_inj
479,411
def nest2pos(samps,weights): randoms=rand(size(samps,0)) wt=weights+samps[:,-1] maxwt=max(wt) posidx=find(wt>maxwt+log(randoms)) pos=samps[posidx,:] return pos
def nest2pos(samps,weights): randoms=rand(size(samps,0)) wt=weights+samps[:,-1] maxwt=max(wt) posidx=[i for i in range(0,size(weights)) if wt[i]>maxwt+log(randoms[i]) ] pos=samps[posidx,:] return pos
479,412
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
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
479,413
def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
def __init__(self,cp,ifo,timeref): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
479,414
def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
479,415
def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
479,416
def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
479,417
def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
def __init__(self,cp,ifo): depIfoIniConfig = ifo+'config' self.depIfoDir = ifo+'_qscans_config' depQscanList = ['bg-rds-qscan', 'bg-seismic-qscan']
479,418
def add(self, *args): packing.Bin.add(self, *args) self.extent = self.size.extent_all() return self
def add(self, cache_entry): packing.Bin.add(self, cache_entry, cache_entry.to_segmentlistdict()) self.extent = self.size.extent_all() return self
479,419
def pack(self, cache_entry): """ Find all bins in which this glue.lal.CacheEntry instance belongs, merge them, and add this cache entry to the result. Create a new bin for this cache entry if it does not belong in any of the existing bins.
def pack(self, cache_entry): """ Find all bins in which this glue.lal.CacheEntry instance belongs, merge them, and add this cache entry to the result. Create a new bin for this cache entry if it does not belong in any of the existing bins.
479,420
def split_bins(cafepacker, extentlimit, verbose = False): """ Split bins in CafePacker so that each bin has an extent no longer than extentlimit. """ # # loop over all bins in cafepacker.bins # idx = 0 while idx < len(cafepacker.bins): # # retrieve bin # origbin = cafepacker.bins[idx] # # how many pieces? if bin d...
def split_bins(cafepacker, extentlimit, verbose = False): """ Split bins in CafePacker so that each bin has an extent no longer than extentlimit. """ # # loop over all bins in cafepacker.bins # idx = 0 while idx < len(cafepacker.bins): # # retrieve bin # origbin = cafepacker.bins[idx] # # how many pieces? if bin d...
479,421
def split_bins(cafepacker, extentlimit, verbose = False): """ Split bins in CafePacker so that each bin has an extent no longer than extentlimit. """ # # loop over all bins in cafepacker.bins # idx = 0 while idx < len(cafepacker.bins): # # retrieve bin # origbin = cafepacker.bins[idx] # # how many pieces? if bin d...
def split_bins(cafepacker, extentlimit, verbose = False): """ Split bins in CafePacker so that each bin has an extent no longer than extentlimit. """ # # loop over all bins in cafepacker.bins # idx = 0 while idx < len(cafepacker.bins): # # retrieve bin # origbin = cafepacker.bins[idx] # # how many pieces? if bin d...
479,422
def split_bins(cafepacker, extentlimit, verbose = False): """ Split bins in CafePacker so that each bin has an extent no longer than extentlimit. """ # # loop over all bins in cafepacker.bins # idx = 0 while idx < len(cafepacker.bins): # # retrieve bin # origbin = cafepacker.bins[idx] # # how many pieces? if bin d...
def split_bins(cafepacker, extentlimit, verbose = False): """ Split bins in CafePacker so that each bin has an extent no longer than extentlimit. """ # # loop over all bins in cafepacker.bins # idx = 0 while idx < len(cafepacker.bins): # # retrieve bin # origbin = cafepacker.bins[idx] # # how many pieces? if bin d...
479,423
def split_bins(cafepacker, extentlimit, verbose = False): """ Split bins in CafePacker so that each bin has an extent no longer than extentlimit. """ # # loop over all bins in cafepacker.bins # idx = 0 while idx < len(cafepacker.bins): # # retrieve bin # origbin = cafepacker.bins[idx] # # how many pieces? if bin d...
def split_bins(cafepacker, extentlimit, verbose = False): """ Split bins in CafePacker so that each bin has an extent no longer than extentlimit. """ # # loop over all bins in cafepacker.bins # idx = 0 while idx < len(cafepacker.bins): # # retrieve bin # origbin = cafepacker.bins[idx] # # how many pieces? if bin d...
479,424
def split_bins(cafepacker, extentlimit, verbose = False): """ Split bins in CafePacker so that each bin has an extent no longer than extentlimit. """ # # loop over all bins in cafepacker.bins # idx = 0 while idx < len(cafepacker.bins): # # retrieve bin # origbin = cafepacker.bins[idx] # # how many pieces? if bin d...
def split_bins(cafepacker, extentlimit, verbose = False): """ Split bins in CafePacker so that each bin has an extent no longer than extentlimit. """ # # loop over all bins in cafepacker.bins # idx = 0 while idx < len(cafepacker.bins): # # retrieve bin # origbin = cafepacker.bins[idx] # # how many pieces? if bin d...
479,425
def split_bins(cafepacker, extentlimit, verbose = False): """ Split bins in CafePacker so that each bin has an extent no longer than extentlimit. """ # # loop over all bins in cafepacker.bins # idx = 0 while idx < len(cafepacker.bins): # # retrieve bin # origbin = cafepacker.bins[idx] # # how many pieces? if bin d...
def split_bins(cafepacker, extentlimit, verbose = False): """ Split bins in CafePacker so that each bin has an extent no longer than extentlimit. """ # # loop over all bins in cafepacker.bins # idx = 0 while idx < len(cafepacker.bins): # # retrieve bin # origbin = cafepacker.bins[idx] # # how many pieces? if bin d...
479,426
def split_bins(cafepacker, extentlimit, verbose = False): """ Split bins in CafePacker so that each bin has an extent no longer than extentlimit. """ # # loop over all bins in cafepacker.bins # idx = 0 while idx < len(cafepacker.bins): # # retrieve bin # origbin = cafepacker.bins[idx] # # how many pieces? if bin d...
def split_bins(cafepacker, extentlimit, verbose = False): """ Split bins in CafePacker so that each bin has an extent no longer than extentlimit. """ # # loop over all bins in cafepacker.bins # idx = 0 while idx < len(cafepacker.bins): # # retrieve bin # origbin = cafepacker.bins[idx] # # how many pieces? if bin d...
479,427
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
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
479,428
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
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
479,429
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
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
479,430
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
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
479,431
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
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
479,432
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
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
479,433
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
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
479,434
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
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
479,435
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
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
479,436
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 stati...
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 stati...
479,437
def daily_ihope_cache(start,end,ifo,cluster=None): """ Generates cache list of daily ihope INSPIRAL xml files for give ifo and clustering (None,'30ms','100ms', or '16s') between start and end time """ #== daily path ihope_daily_path = '/archive/home/cbc/ihope_daily' #== set clustering tag if cluster==None or cluster....
def daily_ihope_cache(start,end,ifo,cluster=None): """ Generates cache list of daily ihope INSPIRAL xml files for give ifo and clustering (None,'30ms','100ms', or '16s') between start and end time """ #== daily path ihope_daily_path = '/archive/home/cbc/ihope_daily' #== set clustering tag if cluster==None or cluster....
479,438
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
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
479,439
def test_and_add_hipe_arg(hipeCommand, hipe_arg): if config.has_option("hipe-arguments",hipe_arg): hipeCommand += "--" + hipe_arg + " " + \ config.get("hipe-arguments",hipe_arg) return(hipeCommand)
def test_and_add_hipe_arg(hipeCommand, hipe_arg): if config.has_option("hipe-arguments",hipe_arg): hipeCommand += "--" + hipe_arg + " " + \ config.get("hipe-arguments",hipe_arg) return(hipeCommand)
479,440
def test_and_add_hipe_arg(hipeCommand, hipe_arg): if config.has_option("hipe-arguments",hipe_arg): hipeCommand += "--" + hipe_arg + " " + \ config.get("hipe-arguments",hipe_arg) return(hipeCommand)
def test_and_add_hipe_arg(hipeCommand, hipe_arg): if config.has_option("hipe-arguments",hipe_arg): hipeCommand += "--" + hipe_arg + " " + \ config.get("hipe-arguments",hipe_arg) return(hipeCommand)
479,441
def plot_setup(plotDir, config, logPath, stage, injectionSuffix, zerolagSuffix, slideSuffix, bankSuffix, cacheFile, injdirType, tag = None, ifos = None, cat = 3): """ run lalapps_plot_hipe and add job to dag plotDir = directory in which to run inspiral hipe config = config file logPath = location where log files...
def plot_setup(plotDir, config, logPath, stage, injectionSuffix, zerolagSuffix, slideSuffix, bankSuffix, cacheFile, injdirType, tag = None, ifos = None, cat = 3): """ run lalapps_plot_hipe and add job to dag plotDir = directory in which to run inspiral hipe config = config file logPath = location where log files...
479,442
def write_job(self,fh): """ Write the DAG entry for this node's job to the DAG file descriptor. @param fh: descriptor of open DAG file. """ if isinstance(self.job(),CondorDAGManJob): # create an external subdag from this dag fh.write( ' '.join( ['SUBDAG EXTERNAL', self.__name, self.__job.get_sub_file]) ) if self.job()....
def write_job(self,fh): """ Write the DAG entry for this node's job to the DAG file descriptor. @param fh: descriptor of open DAG file. """ if isinstance(self.job(),CondorDAGManJob): # create an external subdag from this dag fh.write( ' '.join( ['SUBDAG EXTERNAL', self.__name, self.__job.get_sub_file()]) ) if self.job(...
479,443
def convert_duration( duration ): return sqlutils.convert_duration( duration, convert_durations )
def convert_duration( duration ): return sqlutils.convert_duration( duration, convert_durations )
479,444
def get_pyvalue(self): return generic_get_pyvalue(self)
def get_pyvalue(self): return generic_get_pyvalue(self)
479,445
def get_decisive_distance( *args ): return sorted(args)[1]
def get_decisive_distance( *args ): return sorted(args)[1]
479,446
def getSciSegs(ifo=None, gpsStart=None, gpsStop=None, cut=bool(False), serverURL=None, segName="DMT-SCIENCE", seglenmin=None, segpading=0
def getSciSegs(ifo=None, gpsStart=None, gpsStop=None, cut=bool(False), serverURL=None, segName="DMT-SCIENCE", seglenmin=None, segpading=0
479,447
def append_process(xmldoc, comment = None, force = None, e_thinca_parameter = None, effective_snr_factor = None, vetoes_name = None, trigger_program = None, effective_snr = None, verbose = None): process = llwapp.append_process(xmldoc, program = process_program_name, version = __version__, cvs_repository = u"lscsoft", ...
def append_process(xmldoc, comment = None, force = None, e_thinca_parameter = None, effective_snr_factor = None, vetoes_name = None, trigger_program = None, effective_snr = None, coinc_end_time_segment = None, verbose = None): process = llwapp.append_process(xmldoc, program = process_program_name, version = __version__...
479,448
def append_coinc(self, process_id, time_slide_id, coinc_def_id, events, effective_snr_factor): # # populate the coinc_event and coinc_event_map tables #
def append_coinc(self, process_id, time_slide_id, coinc_def_id, events, effective_snr_factor): # # populate the coinc_event and coinc_event_map tables #
479,449
def ligolw_thinca( xmldoc, process_id, EventListType, CoincTables, coinc_definer_row, event_comparefunc, thresholds, ntuple_comparefunc = lambda events, offset_vector: False, effective_snr_factor = 250.0, veto_segments = None, trigger_program = u"inspiral", verbose = False
def ligolw_thinca( xmldoc, process_id, EventListType, CoincTables, coinc_definer_row, event_comparefunc, thresholds, ntuple_comparefunc = default_ntuple_comparefunc, effective_snr_factor = 250.0, veto_segments = None, trigger_program = u"inspiral", verbose = False
479,450
def __init__(self,job,coinc,cp,opts,dag,ifo,ifonames,p_nodes): pipeline.CondorDAGNode.__init__(self,job)
def __init__(self,job,coinc,cp,opts,dag,ifo,ifonames,p_nodes): pipeline.CondorDAGNode.__init__(self,job)
479,451
def __init__(self,job,coinc,cp,opts,dag,ifo,ifonames,p_nodes): pipeline.CondorDAGNode.__init__(self,job)
def __init__(self,job,coinc,cp,opts,dag,ifo,ifonames,p_nodes): pipeline.CondorDAGNode.__init__(self,job)
479,452
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
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
479,453
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...
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...
479,454
def recurse_pfn_cache(node,caches=[]): for parent in node._CondorDAGNode__parents: if isinstance(parent.job(), CondorDAGManJob): if parent.job().get_dax() is None: pass else: caches = recurse_pfn_cache(parent,caches) caches.append( os.path.join( parent.job().get_pegasus_exec_dir(), '00/P1/P1.cache') ) return caches
def recurse_pfn_cache(node,caches=[]): for parent in node._CondorDAGNode__parents: if isinstance(parent.job(), CondorDAGManJob): if parent.job().get_dax() is None: pass else: caches = recurse_pfn_cache(parent,caches) caches.append( os.path.join( parent.job().get_pegasus_exec_dir(), dax_basename + '_0') ) return caches ...
479,455
def get_chirp_dist(self,instrument,ref_mass = 1.40): return self.get_eff_dist() * (2.**(-1./5) * ref_mass / self.mchirp)**(5./6)
def get_chirp_dist(self,instrument,ref_mass = 1.40): return self.get_eff_dist() * (2.**(-1./5) * ref_mass / self.mchirp)**(5./6)
479,456
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...
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...
479,457
def set_qscan_executable(self): host = stfu_pipe.get_hostname() if 'phy.syr.edu' in host: self.cp.set("fu-condor","qscan",home_dirs()+"/rgouaty/opt/omega/omega_r3270_glnxa64_binary/bin/wpipeline") else: self.cp.set("fu-condor","qscan",home_dirs()+"/romain/opt/omega/omega_r3270_glnxa64_binary/bin/wpipeline")
def set_qscan_executable(self): host = stfu_pipe.get_hostname() if 'phy.syr.edu' in host: self.cp.set("fu-condor","qscan",stfu_pipe.home_dirs()+"/rgouaty/opt/omega/omega_r3270_glnxa64_binary/bin/wpipeline") else: self.cp.set("fu-condor","qscan",home_dirs()+"/romain/opt/omega/omega_r3270_glnxa64_binary/bin/wpipeline")
479,458
def set_qscan_executable(self): host = stfu_pipe.get_hostname() if 'phy.syr.edu' in host: self.cp.set("fu-condor","qscan",home_dirs()+"/rgouaty/opt/omega/omega_r3270_glnxa64_binary/bin/wpipeline") else: self.cp.set("fu-condor","qscan",home_dirs()+"/romain/opt/omega/omega_r3270_glnxa64_binary/bin/wpipeline")
def set_qscan_executable(self): host = stfu_pipe.get_hostname() if 'phy.syr.edu' in host: self.cp.set("fu-condor","qscan",home_dirs()+"/rgouaty/opt/omega/omega_r3270_glnxa64_binary/bin/wpipeline") else: self.cp.set("fu-condor","qscan",home_dirs()+"/romain/opt/omega/omega_r3270_glnxa64_binary/bin/wpipeline")
479,459
def parse_command_line(): parser = OptionParser( version = "%prog", description = "Pipeline to setup Remote Wscans On Demand" ) parser.add_option("-v", "--verbose", action = "store_true", help = "Be verbose.") parser.add_option("-f", "--config-file", default="followup_pipe.ini", help="the config file, default looks for...
def parse_command_line(): parser = OptionParser( version = "%prog", description = "Pipeline to setup Remote Wscans On Demand" ) parser.add_option("-v", "--verbose", action = "store_true", help = "Be verbose.") parser.add_option("-f", "--config-file", default="WOD_Bologna.ini", help="the config file, default looks for s...
479,460
def parse_command_line(): parser = OptionParser( version = "%prog", description = "Pipeline to setup Remote Wscans On Demand" ) parser.add_option("-v", "--verbose", action = "store_true", help = "Be verbose.") parser.add_option("-f", "--config-file", default="followup_pipe.ini", help="the config file, default looks for...
def parse_command_line(): parser = OptionParser( version = "%prog", description = "Pipeline to setup Remote Wscans On Demand" ) parser.add_option("-v", "--verbose", action = "store_true", help = "Be verbose.") parser.add_option("-f", "--config-file", default="followup_pipe.ini", help="the config file, default looks for...
479,461
def parse_command_line(): parser = OptionParser( version = "%prog", description = "Pipeline to setup Remote Wscans On Demand" ) parser.add_option("-v", "--verbose", action = "store_true", help = "Be verbose.") parser.add_option("-f", "--config-file", default="followup_pipe.ini", help="the config file, default looks for...
def parse_command_line(): parser = OptionParser( version = "%prog", description = "Pipeline to setup Remote Wscans On Demand" ) parser.add_option("-v", "--verbose", action = "store_true", help = "Be verbose.") parser.add_option("-f", "--config-file", default="followup_pipe.ini", help="the config file, default looks for...
479,462
def parse_command_line(): parser = OptionParser( version = "%prog", description = "Pipeline to setup Remote Wscans On Demand" ) parser.add_option("-v", "--verbose", action = "store_true", help = "Be verbose.") parser.add_option("-f", "--config-file", default="followup_pipe.ini", help="the config file, default looks for...
def parse_command_line(): parser = OptionParser( version = "%prog", description = "Pipeline to setup Remote Wscans On Demand" ) parser.add_option("-v", "--verbose", action = "store_true", help = "Be verbose.") parser.add_option("-f", "--config-file", default="followup_pipe.ini", help="the config file, default looks for...
479,463
def xml(self): """Convert a table dictionary to LIGO lightweight XML""" if len(self.table) == 0: raise LIGOLwDBError, 'attempt to convert empty table to xml' ligolw = """\
def xml(self): """Convert a table dictionary to LIGO lightweight XML""" if len(self.table) == 0: raise LIGOLwDBError, 'attempt to convert empty table to xml' ligolw = """\
479,464
def xml(self): """Convert a table dictionary to LIGO lightweight XML""" if len(self.table) == 0: raise LIGOLwDBError, 'attempt to convert empty table to xml' ligolw = """\
def xml(self): """Convert a table dictionary to LIGO lightweight XML""" if len(self.table) == 0: raise LIGOLwDBError, 'attempt to convert empty table to xml' ligolw = """\
479,465
def xml(self): """Convert a table dictionary to LIGO lightweight XML""" if len(self.table) == 0: raise LIGOLwDBError, 'attempt to convert empty table to xml' ligolw = """\
def xml(self): """Convert a table dictionary to LIGO lightweight XML""" if len(self.table) == 0: raise LIGOLwDBError, 'attempt to convert empty table to xml' ligolw = """\
479,466
def coinc_params_func(events, offsetvector): # # check for coincs that have been vetoed entirely # if len(events) < 2: return None params = {} # # zero-instrument parameters # params["nevents"] = (len(events),) # # one-instrument parameters # for event in events: prefix = "%s_" % event.ifo params["%ssnr2_chi2" %...
def coinc_params_func(events, offsetvector): # # check for coincs that have been vetoed entirely # if len(events) < 2: return None params = {} # # zero-instrument parameters # params["nevents"] = (len(events),) # # one-instrument parameters # for event in events: prefix = "%s_" % event.ifo params["%ssnr2_chi2" %...
479,467
def dt_binning(instrument1, instrument2): dt = 0.005 + inject.light_travel_time(instrument1, instrument2) # seconds return rate.NDBins((rate.ATanBins(-dt, +dt, 3001),))
def dt_binning(instrument1, instrument2): dt = 0.005 + inject.light_travel_time(instrument1, instrument2) # seconds return rate.NDBins((rate.ATanBins(-dt, +dt, 3001),))
479,468
def get_coincparamsdistributions(xmldoc): coincparamsdistributions, process_id = ligolw_burca_tailor.coinc_params_distributions_from_xml(xmldoc, u"string_cusp_likelihood") return coincparamsdistributions
def get_coincparamsdistributions(xmldoc, seglists = None): coincparamsdistributions, process_id = ligolw_burca_tailor.coinc_params_distributions_from_xml(xmldoc, u"string_cusp_likelihood") return coincparamsdistributions
479,469
def load_likelihood_data(filenames, verbose = False): coincparamsdistributions = None for n, filename in enumerate(filenames): if verbose: print >>sys.stderr, "%d/%d:" % (n + 1, len(filenames)), xmldoc = utils.load_filename(filename, gz = (filename or "stdin").endswith(".gz"), verbose = verbose) if coincparamsdistribut...
def load_likelihood_data(filenames, seglists = None, verbose = False): coincparamsdistributions = None for n, filename in enumerate(filenames): if verbose: print >>sys.stderr, "%d/%d:" % (n + 1, len(filenames)), xmldoc = utils.load_filename(filename, gz = (filename or "stdin").endswith(".gz"), verbose = verbose) if coi...
479,470
def load_likelihood_data(filenames, verbose = False): coincparamsdistributions = None for n, filename in enumerate(filenames): if verbose: print >>sys.stderr, "%d/%d:" % (n + 1, len(filenames)), xmldoc = utils.load_filename(filename, gz = (filename or "stdin").endswith(".gz"), verbose = verbose) if coincparamsdistribut...
def load_likelihood_data(filenames, verbose = False): coincparamsdistributions = None for n, filename in enumerate(filenames): if verbose: print >>sys.stderr, "%d/%d:" % (n + 1, len(filenames)), xmldoc = utils.load_filename(filename, gz = (filename or "stdin").endswith(".gz"), verbose = verbose) if coincparamsdistribut...
479,471
def load_likelihood_data(filenames, verbose = False): coincparamsdistributions = None for n, filename in enumerate(filenames): if verbose: print >>sys.stderr, "%d/%d:" % (n + 1, len(filenames)), xmldoc = utils.load_filename(filename, gz = (filename or "stdin").endswith(".gz"), verbose = verbose) if coincparamsdistribut...
def load_likelihood_data(filenames, verbose = False): coincparamsdistributions = None for n, filename in enumerate(filenames): if verbose: print >>sys.stderr, "%d/%d:" % (n + 1, len(filenames)), xmldoc = utils.load_filename(filename, gz = (filename or "stdin").endswith(".gz"), verbose = verbose) if coincparamsdistribut...
479,472
def __init__(self, config=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.whi...
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...
479,473
def __init__(self, config=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.whi...
def __init__(self, config=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.whi...
479,474
def __init__(self, config=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.whi...
def __init__(self, config=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.whi...
479,475
def __init__(self, config=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.whi...
def __init__(self, config=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.whi...
479,476
def __init__(self, config=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.whi...
def __init__(self, config=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.whi...
479,477
def overwrite_config(self,config): for section in config.sections(): if not cp.has_section(section): cp.add_section(section) for option in config.options(section): cp.set(section,option,config.get(section,option))
def overwrite_config(self,config,cp): for section in config.sections(): if not cp.has_section(section): cp.add_section(section) for option in config.options(section): cp.set(section,option,config.get(section,option))
479,478
def recurse_pfn_cache(node,caches=[]): for parent in node._CondorDAGNode__parents: if isinstance(parent.job(), CondorDAGManJob): if parent.job().get_dax() is None: pass else: caches = recurse_pfn_cache(parent,caches) dax_name = os.path.basename(parent.job().get_dax()) dax_basename = '.'.join(dax_name.split('.')[0:-1]) ...
def recurse_pfn_cache(node,caches=[]): for parent in node._CondorDAGNode__parents: if isinstance(parent.job(), CondorDAGManJob): if parent.job().get_dax() is None: pass else: caches = recurse_pfn_cache(parent,caches) dax_name = os.path.basename(parent.job().get_dax()) dax_basename = '.'.join(dax_name.split('.')[0:-1]) ...
479,479
def system_call(item, command, divert_output_to_log = True): """ Makes a system call. @params item: a text specifying the content of the text (e.g. number of the GRB the message is associated with) (see also 'info') @params command: the command to be executed on the bash @params divert_output_to_log: If this flag is se...
def system_call(item, command, divert_output_to_log = True): """ Makes a system call. @params item: a text specifying the content of the text (e.g. number of the GRB the message is associated with) (see also 'info') @params command: the command to be executed on the bash @params divert_output_to_log: If this flag is se...
479,480
def make_cvs_copy(self, files, dest_dir): """ Copies all the files given in the list 'files' to dest_dir and creates a file 'cvs_versions.txt' in dest_dir containing the actual CVS version of the files @param files: list of files to be copied from self.input_dir @param dest_dir: destination directory """
def make_cvs_copy(self, files, dest_dir): """ Copies all the files given in the list 'files' to dest_dir and creates a file 'cvs_versions.txt' in dest_dir containing the actual CVS version of the files @param files: list of files to be copied from self.input_dir @param dest_dir: destination directory """
479,481
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...
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...
479,482
def _greedy_bin(greedyHist,greedyPoints,injection_bin_index,bin_size,Nsamples,confidence_levels): """ An interal function representing the common, dimensionally-independent part of the greedy binning algorithms. """ #Now call confidence level C extension function to determine top-ranked pixels (injectionconfidence,top...
def _greedy_bin(greedyHist,greedyPoints,injection_bin_index,bin_size,Nsamples,confidence_levels): """ An interal function representing the common, dimensionally-independent part of the greedy binning algorithms. """ #Now call confidence level C extension function to determine top-ranked pixels (injectionconfidence,top...
479,483
def get_ifo_tag(self): """ Returns the IFO tag string """ return self.__ifo_tag
def get_ifo_tag(self): """ Returns the IFO tag string """ return self.__ifo_tag
479,484
def scatterPointer(A=None,B=None): """ Expects two ordered pairs as tuples (x1,y1) and (x2,y2)... Then this defines an angle. From this angle we orient a triangle point and return this as a tuple of requested size. This can be plotted by the scatter plot to point in a particular orientation. The direction right(0,0)->...
def scatterPointer(A=None,B=None): """ Expects two ordered pairs as tuples (x1,y1) and (x2,y2)... Then this defines an angle. From this angle we orient a triangle point and return this as a tuple of requested size. This can be plotted by the scatter plot to point in a particular orientation. The direction right(0,0)->...
479,485
def scatterPointer(A=None,B=None): """ Expects two ordered pairs as tuples (x1,y1) and (x2,y2)... Then this defines an angle. From this angle we orient a triangle point and return this as a tuple of requested size. This can be plotted by the scatter plot to point in a particular orientation. The direction right(0,0)->...
def scatterPointer(A=None,B=None): """ Expects two ordered pairs as tuples (x1,y1) and (x2,y2)... Then this defines an angle. From this angle we orient a triangle point and return this as a tuple of requested size. This can be plotted by the scatter plot to point in a particular orientation. The direction right(0,0)->...
479,486
def scatterPointer(A=None,B=None): """ Expects two ordered pairs as tuples (x1,y1) and (x2,y2)... Then this defines an angle. From this angle we orient a triangle point and return this as a tuple of requested size. This can be plotted by the scatter plot to point in a particular orientation. The direction right(0,0)->...
def scatterPointer(A=None,B=None): """ Expects two ordered pairs as tuples (x1,y1) and (x2,y2)... Then this defines an angle. From this angle we orient a triangle point and return this as a tuple of requested size. This can be plotted by the scatter plot to point in a particular orientation. The direction right(0,0)->...
479,487
def scatterPointer(A=None,B=None): """ Expects two ordered pairs as tuples (x1,y1) and (x2,y2)... Then this defines an angle. From this angle we orient a triangle point and return this as a tuple of requested size. This can be plotted by the scatter plot to point in a particular orientation. The direction right(0,0)->...
def scatterPointer(A=None,B=None): """ Expects two ordered pairs as tuples (x1,y1) and (x2,y2)... Then this defines an angle. From this angle we orient a triangle point and return this as a tuple of requested size. This can be plotted by the scatter plot to point in a particular orientation. The direction right(0,0)->...
479,488
def convert2DHistTo3ColVectors(myMatrix,xBins=None,yBins=None): """ Create three vectors X,Y,Z for ease of use in functs like contour, and scatter instead of imshow! If [x,y]Bins==None use bin index for X, Y Input matrix assumed square!! """ if xBins==None: xBins=range(len(myMatrix)) if yBins==None: yBins=range(len(myM...
def convert2DHistTo3ColVectors(myMatrix,xBins=None,yBins=None): """ Create three vectors X,Y,Z for ease of use in functs like contour, and scatter instead of imshow! If [x,y]Bins==None use bin index for X, Y Input matrix assumed square!! """ if xBins==None: xBins=range(len(myMatrix)) if yBins==None: yBins=range(len(myM...
479,489
def convert2DHistTo3ColVectors(myMatrix,xBins=None,yBins=None): """ Create three vectors X,Y,Z for ease of use in functs like contour, and scatter instead of imshow! If [x,y]Bins==None use bin index for X, Y Input matrix assumed square!! """ if xBins==None: xBins=range(len(myMatrix)) if yBins==None: yBins=range(len(myM...
def convert2DHistTo3ColVectors(myMatrix,xBins=None,yBins=None): """ Create three vectors X,Y,Z for ease of use in functs like contour, and scatter instead of imshow! If [x,y]Bins==None use bin index for X, Y Input matrix assumed square!! """ if xBins==None: xBins=range(len(myMatrix)) if yBins==None: yBins=range(len(myM...
479,490
def convert2DHistTo3ColVectors(myMatrix,xBins=None,yBins=None): """ Create three vectors X,Y,Z for ease of use in functs like contour, and scatter instead of imshow! If [x,y]Bins==None use bin index for X, Y Input matrix assumed square!! """ if xBins==None: xBins=range(len(myMatrix)) if yBins==None: yBins=range(len(myM...
def convert2DHistTo3ColVectors(myMatrix,xBins=None,yBins=None): """ Create three vectors X,Y,Z for ease of use in functs like contour, and scatter instead of imshow! If [x,y]Bins==None use bin index for X, Y Input matrix assumed square!! """ if xBins==None: xBins=range(len(myMatrix)) if yBins==None: yBins=range(len(myM...
479,491
def convert2DHistTo3ColVectors(myMatrix,xBins=None,yBins=None): """ Create three vectors X,Y,Z for ease of use in functs like contour, and scatter instead of imshow! If [x,y]Bins==None use bin index for X, Y Input matrix assumed square!! """ if xBins==None: xBins=range(len(myMatrix)) if yBins==None: yBins=range(len(myM...
def convert2DHistTo3ColVectors(myMatrix,xBins=None,yBins=None): """ Create three vectors X,Y,Z for ease of use in functs like contour, and scatter instead of imshow! If [x,y]Bins==None use bin index for X, Y Input matrix assumed square!! """ if xBins==None: xBins=range(len(myMatrix)) if yBins==None: yBins=range(len(myM...
479,492
def convert2DHistTo3ColVectors(myMatrix,xBins=None,yBins=None): """ Create three vectors X,Y,Z for ease of use in functs like contour, and scatter instead of imshow! If [x,y]Bins==None use bin index for X, Y Input matrix assumed square!! """ if xBins==None: xBins=range(len(myMatrix)) if yBins==None: yBins=range(len(myM...
def convert2DHistTo3ColVectors(myMatrix,xBins=None,yBins=None): """ Create three vectors X,Y,Z for ease of use in functs like contour, and scatter instead of imshow! If [x,y]Bins==None use bin index for X, Y Input matrix assumed square!! """ if xBins==None: xBins=range(len(myMatrix)) if yBins==None: yBins=range(len(myM...
479,493
def convert2DHistTo3ColVectors(myMatrix,xBins=None,yBins=None): """ Create three vectors X,Y,Z for ease of use in functs like contour, and scatter instead of imshow! If [x,y]Bins==None use bin index for X, Y Input matrix assumed square!! """ if xBins==None: xBins=range(len(myMatrix)) if yBins==None: yBins=range(len(myM...
def convert2DHistTo3ColVectors(myMatrix,xBins=None,yBins=None): """ Create three vectors X,Y,Z for ease of use in functs like contour, and scatter instead of imshow! If [x,y]Bins==None use bin index for X, Y Input matrix assumed square!! """ if xBins==None: xBins=range(len(myMatrix)) if yBins==None: yBins=range(len(myM...
479,494
def __init__(self, host, port): self.daq = nds.daq(self.host, self.port) self.channels = self.daq.recv_channel_list() self.channelLeaves, self.channelTree = make_channel_tree(self.channels) self.rates = tuple(sorted(set(int(c.rate) for c in self.channels))) self.channel_types = tuple(c for c in nds.channel_type.values....
def __init__(self, host, port): self.daq = nds.daq(host, port) self.channels = self.daq.recv_channel_list() self.channelLeaves, self.channelTree = make_channel_tree(self.channels) self.rates = tuple(sorted(set(int(c.rate) for c in self.channels))) self.channel_types = tuple(c for c in nds.channel_type.values.values() i...
479,495
def mktmp(path, verbose = False): fd, filename = tempfile.mkstemp(suffix = ".sqlite", dir = path) os.close(fd) if verbose: print >>sys.stderr, "using '%s' as workspace" % filename # mkstemp() ignores umask, creates all files accessible # only by owner; we should respect umask. note that # os.umask() sets it, too, so ...
def mktmp(path, verbose = False): temporary_file = tempfile.NamedTemporaryFile(suffix = ".sqlite", dir = path) def new_unlink(self, orig_unlink = temporary_file.unlink): try: orig_unlink("%s-journal" % self) except: pass orig_unlink(self) temporary_file.unlink = new_unlink filename = temporary_file.name temporary_file...
479,496
def discard_connection_filename(filename, working_filename, verbose = False): """ Like put_connection_filename(), but the working copy is simply deleted instead of being copied back to its original location. This is a useful performance boost if it is known that no modifications were made to the file, for example if qu...
def discard_connection_filename(filename, working_filename, verbose = False): """ Like put_connection_filename(), but the working copy is simply deleted instead of being copied back to its original location. This is a useful performance boost if it is known that no modifications were made to the file, for example if qu...
479,497
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...
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...
479,498
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...
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...
479,499