bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def figure_out_cache(time,ifo): cacheList=( (home_dirs()+"/romain/followupbackgrounds/omega/S5/background/background_815155213_875232014.cache",815155213,875232014,"H1H2L1"), (home_dirs()+"/romain/followupbackgrounds/omega/S6a/background/background_931035296_935798415.cache",931035296,935798415,"H1L1"), (home_dirs()+"...
def figure_out_cache(time,ifo): cacheList=( (home_dirs()+"/romain/followupbackgrounds/omega/S5/background/background_815155213_875232014.cache",815155213,875232014,"H1H2L1"), (home_dirs()+"/romain/followupbackgrounds/omega/S6a/background/background_931035296_935798415.cache",931035296,935798415,"H1L1"), (home_dirs()+"...
479,300
def set_offset_vectors(self, offset_vectors): """ Set the list of offset vectors to be considered when deciding the bins in which each file belongs. Must be called before packing any files. The input is a list of dictionaries, each mapping instruments to offsets. """ self.offset_vectors = offset_vectors min_offset = ...
def set_offset_vectors(self, offset_vectors): """ Set the list of offset vectors to be considered when deciding the bins in which each file belongs. Must be called before packing any files. The input is a list of dictionaries, each mapping instruments to offsets. """ self.offset_vectors = list(offset_vectors) se...
479,301
def set_offset_vectors(self, offset_vectors): """ Set the list of offset vectors to be considered when deciding the bins in which each file belongs. Must be called before packing any files. The input is a list of dictionaries, each mapping instruments to offsets. """ self.offset_vectors = offset_vectors min_offset = ...
def set_offset_vectors(self, offset_vectors): """ Set the list of offset vectors to be considered when deciding the bins in which each file belongs.Must be called before packing any files.The input is a list of dictionaries, each mapping instruments to offsets. """ self.offset_vectors = offset_vectors min_offset = min(...
479,302
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...
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...
479,303
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...
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...
479,304
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...
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...
479,305
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...
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 cafepa...
479,306
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...
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...
479,307
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...
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...
479,308
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...
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...
479,309
def write_caches(base, bins, instruments, verbose = False): filenames = [] if len(bins): pattern = "%%s%%0%dd.cache" % int(log10(len(bins)) + 1) for n, bin in enumerate(bins): filename = pattern % (base, n) filenames.append(filename) if verbose: print >>sys.stderr, "writing %s ..." % filename f = file(filename, "w") fo...
def write_caches(base, bins, instruments, verbose = False): filenames = [] if len(bins): pattern = "%%s%%0%dd.cache" % int(math.log10(len(bins)) + 1) for n, bin in enumerate(bins): filename = pattern % (base, n) filenames.append(filename) if verbose: print >>sys.stderr, "writing %s ..." % filename f = file(filename, "w...
479,310
def write_html_output(opts, args, fnameList, tagLists, \ doThumb=True, mapList = [],\ comment=None, CoincSummTable=None,\ html_tag = '', add_box_flag=False): """ @param opts: The options from the calling code @param args: The args from the calling code @param fnameList: A list of the filenames @param tagLists: A list f...
def write_html_output(opts, args, fnameList, tagLists, \ doThumb=True, mapList = [],\ comment=None, CoincSummTable=None,\ html_tag = '', add_box_flag=False): """ @param opts: The options from the calling code @param args: The args from the calling code @param fnameList: A list of the filenames @param tagLists: A list f...
479,311
def getQscanTable(opts,type): summary = readSummaryFiles() if "FG" in type: type_string = "foreground" elif "BG" in type: type_string = "background" if eval("opts.qscan_cache_" + type_string): qscanList = stfu_pipe.getParamsFromCache(eval("opts.qscan_cache_" + type_string),type) else: try: inputPath = eval("opts." +...
def getQscanTable(opts,type): summary = readSummaryFiles() if "FG" in type: type_string = "foreground" elif "BG" in type: type_string = "background" if eval("opts.qscan_cache_" + type_string): qscanList = getParamsFromCache(eval("opts.qscan_cache_" + type_string),type) else: try: inputPath = eval("opts." + type_stri...
479,312
def plotHistogram(chan,opts,distribution,histoList,binList,percentiles=None,candidate=None,candidateRank=None): parameter = distribution.split('-')[0] step = binList[1] - binList[0] counter = sum(histoList) xlimInf = min(binList) if candidate and not parameter == 'dt': xlimSup = max(max(binList),candidate + 2.0) els...
def plotHistogram(chan,opts,distribution,histoList,binList,percentiles=None,candidate=None,candidateRank=None): parameter = distribution.split('-')[0] step = binList[1] - binList[0] counter = sum(histoList) xlimInf = min(binList) if candidate and not parameter == 'dt': xlimSup = max(max(binList),candidate + 2.0) els...
479,313
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 = "%s-STRING_LIKELIHOOD_%s-%d-%d.xml.gz" % (cache_entry.observatory, cache_entry.description, int(cache_...
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...
479,314
def __init__(self,config_parser): """ config_parser = ConfigParser object from which options are read. """ pipeline.CondorDAGJob.__init__(self, power.get_universe(config_parser), power.get_executable(config_parser, "lalapps_StringSearch")) pipeline.AnalysisJob.__init__(self, config_parser) self.add_ini_opts(config_pars...
def __init__(self,config_parser): """ config_parser = ConfigParser object from which options are read. """ pipeline.CondorDAGJob.__init__(self, power.get_universe(config_parser), power.get_executable(config_parser, "lalapps_StringSearch")) pipeline.AnalysisJob.__init__(self, config_parser) self.add_ini_opts(config_pars...
479,315
def __init__(self,job): """ job = A CondorDAGJob that can run an instance of lalapps_StringSearch. """ pipeline.CondorDAGNode.__init__(self,job) pipeline.AnalysisNode.__init__(self) self.__usertag = job.get_config('pipeline','user_tag') self.output_cache = [] self.triggers_dir = self.job().triggers_dir
def __init__(self,job): """ job = A CondorDAGJob that can run an instance of lalapps_StringSearch. """ pipeline.CondorDAGNode.__init__(self,job) pipeline.AnalysisNode.__init__(self) self.__usertag = job.get_config('pipeline','user_tag') self.output_cache = [] self.triggers_dir = self.job().triggers_dir
479,316
def get_output(self): """ Returns the file name of output from the ring code. This must be kept synchronized with the name of the output file in ring.c. """ if self._AnalysisNode__output is None: if None in (self.get_start(), self.get_end(), self.get_ifo(), self.__usertag): raise ValueError, "start time, end time, ifo,...
def get_output(self): """ Returns the file name of output from the ring code. This must be kept synchronized with the name of the output file in ring.c. """ if self._AnalysisNode__output is None: if None in (self.get_start(), self.get_end(), self.get_ifo(), self.__usertag): raise ValueError, "start time, end time, ifo,...
479,317
def get_coincs(self, eventlists, event_comparefunc, thresholds, verbose = False): # # has this node already been visited? if so, return the # answer we already know #
def get_coincs(self, eventlists, event_comparefunc, thresholds, verbose = False): # # has this node already been visited? if so, return the # answer we already know #
479,318
def get_coincs(self, eventlists, event_comparefunc, thresholds, verbose = False): # # has this node already been visited? if so, return the # answer we already know #
def get_coincs(self, eventlists, event_comparefunc, thresholds, verbose = False): # # has this node already been visited? if so, return the # answer we already know #
479,319
def check_call_out(command): """ Run the given command (with shell=False) and return the output as a string. Strip the output of enclosing whitespace. If the return code is non-zero, throw GitInvocationError. """ # start external command process p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PI...
def check_call_out(command): """ Run the given command (with shell=False) and return the output as a string. Strip the output of enclosing whitespace. If the return code is non-zero, throw GitInvocationError. """ # start external command process p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PI...
479,320
def __init__( self, table_name, table_param, param_ranges_opt, verbose = False ): """ Parse --param-ranges option. Creates self.param which is the table_name and the table_param appended together (with a '.') and self.param_ranges, which is a list of tuples that give the lower parameter value, whether it is an open or ...
def __init__( self, table_name, table_param, param_ranges_opt, verbose = False ): """ Parse --param-ranges option. Creates self.param which is the table_name and the table_param appended together (with a '.') and self.param_ranges, which is a list of tuples that give the lower parameter value, whether it is an open or ...
479,321
def hwinj_page_setup(cp,ifos,veto_categories,hw_inj_dir): """ run ligolw_cbc_hardware injection page, soring the input and output in the subdirectory hardware_injection_summary """ hwInjNodes = [] hwinj_length = cp.getint("input","gps-end-time") - cp.getint("input","gps-start-time") hwInjJob = inspiral.HWinjPageJob(cp...
def hwinj_page_setup(cp,ifos,veto_categories,hw_inj_dir): """ run ligolw_cbc_hardware injection page, soring the input and output in the subdirectory hardware_injection_summary """ hwInjNodes = [] hwinj_length = cp.getint("input","gps-end-time") - cp.getint("input","gps-start-time") hwInjJob = inspiral.HWinjPageJob(cp...
479,322
def get_lock(lockfile): """ Tries to write a lockfile containing the current pid. Excepts if the lockfile already contains the pid of a running process. Although this should prevent a lock from being granted twice, it can theoretically deny a lock unjustly in the unlikely event that the original process is gone but a...
def get_lock(lockfile): """ Tries to write a lockfile containing the current pid. Excepts if the lockfile already contains the pid of a running process. Although this should prevent a lock from being granted twice, it can theoretically deny a lock unjustly in the unlikely event that the original process is gone but a...
479,323
def get_lock(lockfile): """ Tries to write a lockfile containing the current pid. Excepts if the lockfile already contains the pid of a running process. Although this should prevent a lock from being granted twice, it can theoretically deny a lock unjustly in the unlikely event that the original process is gone but a...
def get_lock(lockfile): """ Tries to write a lockfile containing the current pid. Excepts if the lockfile already contains the pid of a running process. Although this should prevent a lock from being granted twice, it can theoretically deny a lock unjustly in the unlikely event that the original process is gone but a...
479,324
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,325
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...
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...
479,326
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...
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...
479,327
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...
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...
479,328
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...
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...
479,329
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...
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...
479,330
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...
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...
479,331
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...
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...
479,332
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...
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...
479,333
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...
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...
479,334
def getFOMLinks(gpsTime=int(0),ifo=("default")): """ Simple method returns a list of links to FOMs ordered by FOM # The list is 2D ie: [['ifo,shift',LINKtoImage,LinktoThumb],['ifo,shift',LinktoImage,LinkToThumb]...] images marked [Eve,Owl,Day] via [p3,p2,p1] in filenames this methd only for S6 and later IFO naming star...
def getFOMLinks(gpsTime=int(0),ifo=("default")): """ Simple method returns a list of links to FOMs ordered by FOM # The list is 2D ie: [['ifo,shift',LINKtoImage,LinktoThumb],['ifo,shift',LinktoImage,LinkToThumb]...] images marked [Eve,Owl,Day] via [p3,p2,p1] in filenames this methd only for S6 and later IFO naming star...
479,335
def update_ids(xmldoc, connection, verbose = False): """ For internal use only. """ table_elems = xmldoc.getElementsByTagName(ligolw.Table.tagName) for i, tbl in enumerate(table_elems): if verbose: print >>sys.stderr, "updating IDs: %d%%\r" % (100 * i / len(table_elems)), tbl.applyKeyMapping() if verbose: print >>sys.s...
def update_ids(xmldoc, connection, verbose = False): """ For internal use only. """ table_elems = xmldoc.getElementsByTagName(ligolw.Table.tagName) for i, tbl in enumerate(table_elems): if verbose: print >>sys.stderr, "updating IDs: %d%%\r" % (100 * i / len(table_elems)), tbl.applyKeyMapping() if verbose: print >>sys.s...
479,336
def __init__(self, cp, dax = False): """ cp: ConfigParser object from which options are read. """ exec_name = "mvsc_get_doubles" universe = "vanilla" executable = cp.get('condor',exec_name) pipeline.CondorDAGJob.__init__(self, universe, executable) pipeline.AnalysisJob.__init__(self, cp, dax) self.add_condor_cmd('geten...
def __init__(self, cp, dax = False): """ cp: ConfigParser object from which options are read. """ exec_name = "mvsc_get_doubles" universe = "vanilla" executable = cp.get('condor',exec_name) pipeline.CondorDAGJob.__init__(self, universe, executable) pipeline.AnalysisJob.__init__(self, cp, dax) self.add_condor_cmd('geten...
479,337
def finalize(self): """ finalize the mvsc_get_doubles node """ self.add_var_opt("instruments", self.instruments) self.add_var_opt("trainingstr", self.trainingstr) self.add_var_opt("testingstr", self.testingstr) self.add_var_opt("zerolagstr", self.zerolagstr) for database in self.databases: self.add_file_arg(database) i...
def finalize(self): """ finalize the mvsc_get_doubles node """ self.add_var_opt("instruments", self.instruments) self.add_var_opt("trainingstr", self.trainingstr) self.add_var_opt("testingstr", self.testingstr) self.add_var_opt("zerolagstr", self.zerolagstr) for database in self.databases: self.add_file_arg(database) i...
479,338
def __init__(self, cp, dax = False): """ cp: ConfigParser object from which options are read. """ exec_name = "mvsc_train_forest" universe = "vanilla" executable = cp.get('condor',exec_name) pipeline.CondorDAGJob.__init__(self, universe, executable) pipeline.AnalysisJob.__init__(self, cp, dax) self.add_condor_cmd('gete...
def __init__(self, cp, dax = False): """ cp: ConfigParser object from which options are read. """ exec_name = "mvsc_train_forest" universe = "vanilla" executable = cp.get('condor',exec_name) pipeline.CondorDAGJob.__init__(self, universe, executable) pipeline.AnalysisJob.__init__(self, cp, dax) self.add_condor_cmd('gete...
479,339
def add_training_file(self, trainingfile):
def add_training_file(self, trainingfile):
479,340
def __init__(self, cp, dax = False):
def __init__(self, cp, dax = False):
479,341
def __init__(self, cp, dax = False):
def __init__(self, cp, dax = False):
479,342
def finalize(self): """ finalize the MvscUseForestNode """ self.ranked_file = self.file_to_rank.replace('.pat','.dat') self.add_file_arg("-A -a 1 %s %s %s" % (self.trainedforest, self.file_to_rank, self.ranked_file)) self.add_output_file(self.ranked_file)
def finalize(self): """ finalize the MvscUseForestNode """ self.ranked_file = self.file_to_rank.replace('.pat','.dat') self.add_file_arg("-A -a 4 %s %s %s" % (self.trainedforest, self.file_to_rank, self.ranked_file)) self.add_output_file(self.ranked_file)
479,343
def finalize(self): """ finalize the MvscUseForestNode """ self.ranked_file = self.file_to_rank.replace('.pat','.dat') self.add_file_arg("-A -a 1 %s %s %s" % (self.trainedforest, self.file_to_rank, self.ranked_file)) self.add_output_file(self.ranked_file)
def finalize(self): """ finalize the MvscUseForestNode """ self.ranked_file = self.file_to_rank.replace('.pat','.dat') self.add_file_arg("-A -a 1 %s %s %s" % (self.trainedforest, self.file_to_rank, self.ranked_file)) self.add_output_file(self.ranked_file)
479,344
def __init__(self, cp, dax = False): """ cp: ConfigParser object from which options are read. """ exec_name = "mvsc_update_sql" universe = "vanilla" executable = cp.get('condor',exec_name) pipeline.CondorDAGJob.__init__(self, universe, executable) pipeline.AnalysisJob.__init__(self, cp, dax) self.add_condor_cmd('getenv...
def __init__(self, cp, dax = False): """ cp: ConfigParser object from which options are read. """ exec_name = "mvsc_update_sql" universe = "vanilla" executable = cp.get('condor',exec_name) pipeline.CondorDAGJob.__init__(self, universe, executable) pipeline.AnalysisJob.__init__(self, cp, dax) self.add_condor_cmd('getenv...
479,345
def __init__(self, cp, dax = False): """ cp: ConfigParser object from which options are read. """ exec_name = "mvsc_update_sql" universe = "vanilla" executable = cp.get('condor',exec_name) pipeline.CondorDAGJob.__init__(self, universe, executable) pipeline.AnalysisJob.__init__(self, cp, dax) self.add_condor_cmd('getenv...
def __init__(self, cp, dax = False): """ cp: ConfigParser object from which options are read. """ exec_name = "mvsc_update_sql" universe = "vanilla" executable = cp.get('condor',exec_name) pipeline.CondorDAGJob.__init__(self, universe, executable) pipeline.AnalysisJob.__init__(self, cp, dax) self.add_condor_cmd('getenv...
479,346
def get_delta_t_rss(latitude,longitude,coinc,reference_frequency=None): """ returns the rss timing error for a particular location in the sky (longitude,latitude) """ earth_center = (0.0,0.0,0.0) tref = {} tgeo={} for ifo in coinc.ifo_list: if reference_frequency: tFromRefFreq = get_signal_duration(ifo,coinc,reference...
def get_delta_t_rss(latitude,longitude,coinc,reference_frequency=None): """ returns the rss timing error for a particular location in the sky (longitude,latitude) """ earth_center = (0.0,0.0,0.0) tref = {} tgeo={} for ifo in coinc.ifo_list: if reference_frequency: tFromRefFreq = get_signal_duration(ifo,coinc,reference...
479,347
def map_grids(coarsegrid,finegrid,coarseres=4.0): """ takes the two grids (lists of lat/lon tuples) and returns a dictionary where the points in the coarse grid are the keys and lists of tuples of points in the fine grid are the values """ fgtemp = finegrid coarsedict = {} for cpt in coarsegrid: flist = [] for fpt in f...
def map_grids(coarsegrid,finegrid,coarseres=4.0): """ takes the two grids (lists of lat/lon tuples) and returns a dictionary where the points in the coarse grid are the keys and lists of tuples of points in the fine grid are the values """ fgtemp = finegrid coarsedict = {} for cpt in coarsegrid: flist = [] for fpt in f...
479,348
def map_grids(coarsegrid,finegrid,coarseres=4.0): """ takes the two grids (lists of lat/lon tuples) and returns a dictionary where the points in the coarse grid are the keys and lists of tuples of points in the fine grid are the values """ fgtemp = finegrid coarsedict = {} for cpt in coarsegrid: flist = [] for fpt in f...
def map_grids(coarsegrid,finegrid,coarseres=4.0): """ takes the two grids (lists of lat/lon tuples) and returns a dictionary where the points in the coarse grid are the keys and lists of tuples of points in the fine grid are the values """ fgtemp = finegrid coarsedict = {} for cpt in coarsegrid: flist = [] for fpt in f...
479,349
def __init__(self,opts,cp,dir='',tag_base=''): """ """ self.__executable = string.strip(cp.get('fu-condor','plotmcmc')) self.name = os.path.split(self.__executable.rstrip('/'))[1] self.__universe = "vanilla"
def __init__(self,opts,cp,dir='',tag_base=''): """ """ self.__executable = string.strip(cp.get('fu-condor','plotmcmc')) self.name = os.path.split(self.__executable.rstrip('/'))[1] self.__universe = "vanilla"
479,350
def wiki_table_parse(file): #FIXME assumes table files of the form # === title === # ||data||data|| # ||data||data|| tabs = [] titles = [] tab = [] for line in open(file).readlines(): if '===' in line: titles.append(line.replace("=","")) if tab: tabs.append(tab) tab = [] if '||' in line: tab.append(line.split('||')) t...
def wiki_table_parse(file): #FIXME assumes table files of the form # === title === # ||data||data|| # ||data||data|| tabs = [] titles = [] tab = [] for line in open(file).readlines(): if '===' in line: titles.append(line.replace("=","")) if tab: tabs.append(tab) tab = [] if '||' in line: tab.append(line.split('||')[1:...
479,351
def __init__(self, two_d_data, title="", caption="", tag="table", num="1"): markup.page.__init__(self, mode="strict_html") self.add("<br>") if title: self.b("%s. %s" %(num, title.upper()) ) self.table() for row in two_d_data: self.tr tdstr = "" for col in row: tdstr += "<td>%s</td>" % (str(col),) self.add(tdstr) self....
def __init__(self, two_d_data, title="", caption="", tag="table", num="1"): markup.page.__init__(self, mode="strict_html") self.add("<br>") if title: self.b("%s. %s" %(num, title.upper()) ) self.table() for row in two_d_data: self.add('<tr>') tdstr = "" for col in row: tdstr += "<td>%s</td>" % (str(col),) self.add(tds...
479,352
def __init__(self, two_d_data, title="", caption="", tag="table", num="1"): markup.page.__init__(self, mode="strict_html") self.add("<br>") if title: self.b("%s. %s" %(num, title.upper()) ) self.table() for row in two_d_data: self.tr tdstr = "" for col in row: tdstr += "<td>%s</td>" % (str(col),) self.add(tdstr) self....
def __init__(self, two_d_data, title="", caption="", tag="table", num="1"): markup.page.__init__(self, mode="strict_html") self.add("<br>") if title: self.b("%s. %s" %(num, title.upper()) ) self.table() for row in two_d_data: self.tr tdstr = "" for col in row: tdstr += "<td>%s</td>" % (str(col),) self.add(tdstr) self....
479,353
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...
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...
479,354
def getParamsFromCache(fileName,type,ifo=None,time=None): qscanList = [] cacheList = lal.Cache.fromfile(open(fileName)) if not cacheList: return qscanList cacheSelected = cacheList.sieve(description=type,ifos=ifo) if time: cacheSelected = cacheSelected.sieve(segment=segments.segment(math.floor(float(time)), math.ceil(f...
def getParamsFromCache(fileName,type,ifo=None,time=None): qscanList = [] cacheList = lal.Cache.fromfile(open(fileName)) if not cacheList: return qscanList cacheSelected = cacheList.sieve(description=type,ifos=ifo) if time: if math.floor(float(time)) != math.ceil(float(time)): cacheSelected = cacheSelected.sieve(segment...
479,355
def coinc_segments(start,end,ifos): #== first, construct doubles and triples lists doubles=[] triples=[] for ifo_1 in ifos: for ifo_2 in ifos: if ifos.index(ifo_2)>ifos.index(ifo_1): doubles.append(ifo_1+ifo_2) if triple_coinc is True: for ifo_3 in ifos: if ifos.index(ifo_3)>ifos.index(ifo_2): triples.append(ifo_1+ifo_...
def coinc_segments(start,end,ifos): #== first, construct doubles and triples lists doubles=[] triples=[] for ifo_1 in ifos: for ifo_2 in ifos: if ifos.index(ifo_2)>ifos.index(ifo_1): doubles.append(ifo_1+ifo_2) for ifo_3 in ifos: if ifos.index(ifo_3)>ifos.index(ifo_2): triples.append(ifo_1+ifo_2+ifo_3) segments={} dou...
479,356
def coinc_segments(start,end,ifos): #== first, construct doubles and triples lists doubles=[] triples=[] for ifo_1 in ifos: for ifo_2 in ifos: if ifos.index(ifo_2)>ifos.index(ifo_1): doubles.append(ifo_1+ifo_2) if triple_coinc is True: for ifo_3 in ifos: if ifos.index(ifo_3)>ifos.index(ifo_2): triples.append(ifo_1+ifo_...
def coinc_segments(start,end,ifos): #== first, construct doubles and triples lists doubles=[] triples=[] for ifo_1 in ifos: for ifo_2 in ifos: if ifos.index(ifo_2)>ifos.index(ifo_1): doubles.append(ifo_1+ifo_2) if triple_coinc is True: for ifo_3 in ifos: if ifos.index(ifo_3)>ifos.index(ifo_2): triples.append(ifo_1+ifo_...
479,357
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,358
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,359
def __init__(self,LDBDServerURL=None,quiet=bool(False),pickle=None,blinded=False): """ This class setups of for connecting to a LDBD server specified at command line to do segment queries as part of the follow up pipeline. If the user does not specify the LDBD server to use the method will use the environment variable...
def __init__(self,LDBDServerURL=None,quiet=bool(False),pickle=None,blinded=False): """ This class setups of for connecting to a LDBD server specified at command line to do segment queries as part of the follow up pipeline. If the user does not specify the LDBD server to use the method will use the environment variable...
479,360
def get_exttrig_trials(on_segs, off_segs, veto_files): """ Return a tuple of (off-source time bins, off-source veto mask, index of trial that is on source). The off-source veto mask is a one-dimensional boolean array where True means vetoed. @param on_segs: On-source segments @param off_segs: Off-source segments @param...
def get_exttrig_trials(on_segs, off_segs, veto_files): """ Return a tuple of (off-source time bins, off-source veto mask, index of trial that is on source). The off-source veto mask is a one-dimensional boolean array where True means vetoed. @param on_segs: On-source segments @param off_segs: Off-source segments @param...
479,361
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,362
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,363
def __init__(self,fStructure=None,myCoinc=None): if fStructure==None or myCoinc==None: print "Given None Types FS:%s Coinc:%s"%(type(fStructure),type(myCoinc)) return None else: self.fsys=fStructure self.coinc=myCoinc
def __init__(self,fStructure=None,myCoinc=None): if fStructure==None or myCoinc==None: print "Given None Types FS:%s Coinc:%s"%(type(fStructure),type(myCoinc)) return None else: self.fsys=fStructure self.coinc=myCoinc
479,364
def get_RDS_R_L1(self): """ """ tmpList=list() for sngl in self.coinc.sngls: #Determine file type frametype,channelName=stfu_pipe.figure_out_type(sngl.time,sngl.ifo,'rds') if not sngl.ifo in frametype: frametype = sngl.ifo + "_" + frametype myMaskIndex="*/%s/*/%s/index.html"%(frametype,sngl.time) myMaskPNG="*/%s/*/%s/*...
def get_RDS_R_L1(self): """ """ tmpList=list() for sngl in self.coinc.sngls: #Determine file type frametype,channelName=stfu_pipe.figure_out_type(sngl.time,sngl.ifo,'rds') frametype=__patchFrameTypeDef__(frametype,sngl.ifo,sngl.time) myMaskIndex="*/%s/*/%s/index.html"%(frametype,sngl.time) myMaskPNG="*/%s/*/%s/*.png"%...
479,365
def get_RDS_R_L1_SEIS(self): """ """ tmpList=list() for sngl in self.coinc.sngls: #Determine file type frametype,channelName=stfu_pipe.figure_out_type(sngl.time,sngl.ifo,'rds') if not sngl.ifo in frametype: frametype = sngl.ifo + "_" + frametype frametype = frametype + "_SEIS" myMaskIndex="*/%s*/%s/*.html"%(frametype,s...
def get_RDS_R_L1_SEIS(self): """ """ tmpList=list() for sngl in self.coinc.sngls: #Determine file type frametype,channelName=stfu_pipe.figure_out_type(sngl.time,sngl.ifo,'rds') frametype=__patchFrameTypeDef__(frametype,sngl.ifo,sngl.time) frametype = frametype + "_SEIS" myMaskIndex="*/%s*/%s/*.html"%(frametype,sngl.ti...
479,366
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...
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...
479,367
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...
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...
479,368
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...
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...
479,369
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...
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...
479,370
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...
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...
479,371
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...
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...
479,372
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...
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...
479,373
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)
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)
479,374
def __init__( self, table_name, table_param, param_ranges_opt, verbose = False ): """ Parse --param-ranges option. Creates self.param which is the table_name and the table_param appended together (with a '.') and self.param_ranges, which is a list of tuples that give the lower parameter value, whether it is an open or ...
def __init__( self, table_name, table_param, param_ranges_opt, verbose = False ): """ Parse --param-ranges option. Creates self.param which is the table_name and the table_param appended together (with a '.') and self.param_ranges, which is a list of tuples that give the lower parameter value, whether it is an open or ...
479,375
def get_new_snr(self, index=6.0): # the kwarg 'index' is to be assigned to the parameter chisq_index occurring in the .ini files etc # the parameter nhigh gives the asymptotic behaviour d (ln chisq) / d (ln rho) at large rho # nhigh=2 means chisq~rho^2 along contours of new_snr as expected from the behaviour of mismatc...
def get_new_snr(self, index=6.0): # the kwarg 'index' is to be assigned to the parameter chisq_index occurring in the .ini files etc # the parameter nhigh gives the asymptotic behaviour d (ln chisq) / d (ln rho) at large rho # nhigh=2 means chisq~rho^2 along contours of new_snr as expected from the behaviour of mismatc...
479,376
def get_new_snr(self, index=6.0): # the kwarg 'index' is to be assigned to the parameter chisq_index occurring in the .ini files etc # the parameter nhigh gives the asymptotic behaviour d (ln chisq) / d (ln rho) at large rho # nhigh=2 means chisq~rho^2 along contours of new_snr as expected from the behaviour of mismatc...
def get_new_snr(self, index=6.0): # the kwarg 'index' is to be assigned to the parameter chisq_index occurring in the .ini files etc # the parameter nhigh gives the asymptotic behaviour d (ln chisq) / d (ln rho) at large rho # nhigh=2 means chisq~rho^2 along contours of new_snr as expected from the behaviour of mismatc...
479,377
def get_new_snr(self, index=6.0): # the kwarg 'index' is to be assigned to the parameter chisq_index occurring in the .ini files etc # the parameter nhigh gives the asymptotic behaviour d (ln chisq) / d (ln rho) at large rho # nhigh=2 means chisq~rho^2 along contours of new_snr as expected from the behaviour of mismatc...
def get_new_snr(self, index=6.0): # the kwarg 'index' is to be assigned to the parameter chisq_index occurring in the .ini files etc # the parameter nhigh gives the asymptotic behaviour d (ln chisq) / d (ln rho) at large rho # nhigh=2 means chisq~rho^2 along contours of new_snr as expected from the behaviour of mismatc...
479,378
def skyhist_cart(skycarts,samples): """ Histogram the list of samples into bins defined by Cartesian vectors in skycarts """ dot=numpy.dot N=len(skycarts) print 'operating on %d sky points'%(N) bins=zeros(N) for sample in samples: sampcart=pol2cart(sample[RAdim],sample[decdim]) maxdx=max(xrange(0,N),key=lambda i:dot(sa...
def skyhist_cart(skycarts,samples): """ Histogram the list of samples into bins defined by Cartesian vectors in skycarts """ dot=numpy.dot N=len(skycarts) print 'operating on %d sky points'%(N) bins=zeros(N) for sample in samples: sampcart=pol2cart(sample[RAdim],sample[decdim]) maxdx=max(xrange(0,N),key=lambda i:dot(sa...
479,379
def get_lock(lockfile): """ Tries to write a lockfile containing the current pid. Excepts if the lockfile already contains the pid of a running process. Although this should prevent a lock from being granted twice, it can theoretically deny a lock unjustly in the unlikely event that the original process is gone but a...
def get_lock(lockfile): """ Tries to write a lockfile containing the current pid. Excepts if the lockfile already contains the pid of a running process. Although this should prevent a lock from being granted twice, it can theoretically deny a lock unjustly in the unlikely event that the original process is gone but a...
479,380
def clip_segment(seg, pad, short_segment_duration): # clip segment to the length required by lalapps_StringSearch. if # # duration = segment length - padding # # then # # duration / short_segment_duration - 0.5 # # must be an odd integer, therefore # # 2 * duration + short_segment_duration # # must be divisble b...
def clip_segment(seg, pad, short_segment_duration): # clip segment to the length required by lalapps_StringSearch. if # # duration = segment length - padding # # then # # duration / short_segment_duration - 0.5 # # must be an odd integer, therefore # # 2 * duration + short_segment_duration # # must be divisble b...
479,381
def sky_hist(skypoints,samples): N=len(skypoints) print 'operating on %d sky points' % (N) bins=zeros(N) j=0 for sample in samples: seps=map(lambda s: ang_dist(sample[6],sample[7],s[1],s[0]),skypoints) minsep=math.pi for i in range(0,N): if seps[i]<minsep: minsep=seps[i] mindx=i bins[mindx]=bins[mindx]+1 j=j+1 print 'D...
def sky_hist(skypoints,samples): N=len(skypoints) print 'operating on %d sky points' % (N) bins=zeros(N) j=0 for sample in samples: seps=map(lambda s: ang_dist(sample[5],sample[6],s[1],s[0]),skypoints) minsep=math.pi for i in range(0,N): if seps[i]<minsep: minsep=seps[i] mindx=i bins[mindx]=bins[mindx]+1 j=j+1 print 'D...
479,382
def skyhist_cart(skycarts,samples): N=len(skypoints) print 'operating on %d sky points'%(N) bins=zeros(N) j=0 for sample in samples: sampcart=pol2cart(sample[6],sample[7]) dots=map(lambda s: numpy.dot(sampcart,s),skycarts) maxdot=0 for i in range(0,N): if dots[i]>maxdot: maxdot=dots[i] mindx=i bins[mindx]=bins[mindx]+1...
def skyhist_cart(skycarts,samples): N=len(skypoints) print 'operating on %d sky points'%(N) bins=zeros(N) j=0 for sample in samples: sampcart=pol2cart(sample[5],sample[6]) dots=map(lambda s: numpy.dot(sampcart,s),skycarts) maxdot=0 for i in range(0,N): if dots[i]>maxdot: maxdot=dots[i] mindx=i bins[mindx]=bins[mindx]+1...
479,383
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...
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...
479,384
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...
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...
479,385
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...
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...
479,386
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...
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...
479,387
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...
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...
479,388
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...
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...
479,389
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...
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...
479,390
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...
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...
479,391
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...
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...
479,392
def get_unique_filename(name): """ use this to avoid name collisions """ counter = 1 base_name, ext = os.path.splitext(name) while os.path.isfile(name): name = base_name + '_' + str(counter) + ext counter += 1 return name
def get_unique_filename(name): """ use this to avoid name collisions """ counter = 1 base_name, ext = os.path.splitext(name) while os.path.isfile(name): name = base_name + '_' + str(counter) + ext counter += 1 return name
479,393
def write_git_version(fileobj): """ Query git to determine current repository status and write a Python module with this information. Ex: >>> write_git_version(open("git_version.py", "w")) >>> import git_version >>> print git_version.id 1b0549019e992d0e001f3c28e8488946f825e873 """ git_path = check_call_out(('/usr/bin/...
def write_git_version(fileobj): """ Query git to determine current repository status and write a Python module with this information. Ex: >>> write_git_version(open("git_version.py", "w")) >>> import git_version >>> print git_version.id 1b0549019e992d0e001f3c28e8488946f825e873 """ git_path = check_call_out(('/usr/bin/...
479,394
def write_git_version(fileobj): """ Query git to determine current repository status and write a Python module with this information. Ex: >>> write_git_version(open("git_version.py", "w")) >>> import git_version >>> print git_version.id 1b0549019e992d0e001f3c28e8488946f825e873 """ git_path = check_call_out(('/usr/bin/...
def write_git_version(fileobj): """ Query git to determine current repository status and write a Python module with this information. Ex: >>> write_git_version(open("git_version.py", "w")) >>> import git_version >>> print git_version.id 1b0549019e992d0e001f3c28e8488946f825e873 """ git_path = check_call_out(('/usr/bin/...
479,395
def write_git_version(fileobj): """ Query git to determine current repository status and write a Python module with this information. Ex: >>> write_git_version(open("git_version.py", "w")) >>> import git_version >>> print git_version.id 1b0549019e992d0e001f3c28e8488946f825e873 """ git_path = check_call_out(('/usr/bin/...
def write_git_version(fileobj): """ Query git to determine current repository status and write a Python module with this information. Ex: >>> write_git_version(open("git_version.py", "w")) >>> import git_version >>> print git_version.id 1b0549019e992d0e001f3c28e8488946f825e873 """ git_path = check_call_out(('/usr/bin/...
479,396
def write_git_version(fileobj): """ Query git to determine current repository status and write a Python module with this information. Ex: >>> write_git_version(open("git_version.py", "w")) >>> import git_version >>> print git_version.id 1b0549019e992d0e001f3c28e8488946f825e873 """ git_path = check_call_out(('/usr/bin/...
def write_git_version(fileobj): """ Query git to determine current repository status and write a Python module with this information. Ex: >>> write_git_version(open("git_version.py", "w")) >>> import git_version >>> print git_version.id 1b0549019e992d0e001f3c28e8488946f825e873 """ git_path = check_call_out(('/usr/bin/...
479,397
def plotSkyMap(skypos,skyres,sky_injpoint,confidence_levels,outdir): from mpl_toolkits.basemap import Basemap from pylal import skylocutils np.seterr(under='ignore') skypoints=np.array(skylocutils.gridsky(float(skyres))) skycarts=map(lambda s: pol2cart(s[1],s[0]),skypoints) skyinjectionconfidence=None shist=skyhist...
def plotSkyMap(skypos,skyres,sky_injpoint,confidence_levels,outdir): from mpl_toolkits.basemap import Basemap from pylal import skylocutils np.seterr(under='ignore') skypoints=np.array(skylocutils.gridsky(float(skyres))) skycarts=map(lambda s: pol2cart(s[1],s[0]),skypoints) skyinjectionconfidence=None shist=skyhist...
479,398
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,399