bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def latexnumber(s): """ Convert a string of the form "d.dddde-dd" to "d.dddd \times 10^{-dd}" """ return re.sub(r"([+-]?[.0-9]+)[Ee]?([+-]?[0-9]+)", r"\1 \\times 10^{\2}", s)
def latexnumber(s): """ Convert a string of the form "d.dddde-dd" to "d.dddd \times 10^{-dd}" """ m, e = floatpattern.match(s).groups() return r"%s \\times 10^{%d}" % (m, int(e))
471,700
def IMRpeakAmp(m1,m2,spin1z,spin2z,d): """ IMRpeakAmp finds the peak amplitude of the waveform for a given source parameters and the source distance. usage: IMRpeakAmp(m1,m2,spin1z,spin2z,distance) e.g. spawaveApp.IMRpeakAmp(30,40,0.45,0.5,100) """ chi = spawaveform.computechi(m1, m2, spin1z, spin2z) imrfFinal = spawaveform.imrffinal(m1, m2, chi, 'fcut') fLower = 10.0 order = 7 dur = 2**numpy.ceil(numpy.log2(spawaveform.chirptime(m1,m2,order,fLower))) sr = 2**numpy.ceil(numpy.log2(imrfFinal*2)) deltaF = 1.0 / dur deltaT = 1.0 / sr s = numpy.empty(sr * dur, 'complex128') spawaveform.imrwaveform(m1, m2, deltaF, fLower, s, spin1z, spin2z) s = scipy.ifft(s) #s = numpy.abs(s) s = numpy.real(s) max = numpy.max(s)/d return max
def IMRpeakAmp(m1,m2,spin1z,spin2z,d): """ IMRpeakAmp finds the peak amplitude of the waveform for a given source parameters and the source distance. usage: IMRpeakAmp(m1,m2,spin1z,spin2z,distance) e.g. spawaveApp.IMRpeakAmp(30,40,0.45,0.5,100) """ chi = spawaveform.computechi(m1, m2, spin1z, spin2z) imrfFinal = spawaveform.imrffinal(m1, m2, chi, 'fcut') fLower = 10.0 order = 7 dur = 2**numpy.ceil(numpy.log2(spawaveform.chirptime(m1,m2,order,fLower))) sr = 2**numpy.ceil(numpy.log2(imrfFinal*2)) deltaF = 1.0 / dur deltaT = 1.0 / sr s = numpy.empty(sr * dur, 'complex128') spawaveform.imrwaveform(m1, m2, deltaF, fLower, s, spin1z, spin2z) s = scipy.ifft(s) #s = numpy.abs(s) s = numpy.real(s) max = numpy.max(s)/d return max
471,701
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)
471,702
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.which("ligo_data_find")) cp.set("condor","inspiral",self.which("lalapps_inspiral")) cp.set("condor","chia", self.which("lalapps_coherent_inspiral")) cp.set("condor","universe","standard") # SECTIONS TO SHUT UP WARNINGS cp.add_section("inspiral") cp.add_section("data") # DATAFIND SECTION cp.add_section("datafind")
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.which("ligo_data_find")) cp.set("condor","inspiral",self.which("lalapps_inspiral")) cp.set("condor","chia", self.which("lalapps_coherent_inspiral")) cp.set("condor","universe","standard") # SECTIONS TO SHUT UP WARNINGS cp.add_section("inspiral") cp.add_section("data") # DATAFIND SECTION cp.add_section("datafind")
471,703
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.which("ligo_data_find")) cp.set("condor","inspiral",self.which("lalapps_inspiral")) cp.set("condor","chia", self.which("lalapps_coherent_inspiral")) cp.set("condor","universe","standard") # SECTIONS TO SHUT UP WARNINGS cp.add_section("inspiral") cp.add_section("data") # DATAFIND SECTION cp.add_section("datafind")
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.which("ligo_data_find")) cp.set("condor","inspiral",self.which("lalapps_inspiral")) cp.set("condor","chia", self.which("lalapps_coherent_inspiral")) cp.set("condor","universe","standard") # SECTIONS TO SHUT UP WARNINGS cp.add_section("inspiral") cp.add_section("data") # DATAFIND SECTION cp.add_section("datafind")
471,704
def get_signal_vetoes(trigger,bankq=0,bankn=0,autoq=0,auton=0,chiq=0,chin=0,sigmaVals = None,fResp = None): sbvs = {} q = bankq nhigh = bankn q2 = autoq nhigh2 = auton if trigger.chisq == 0: sbvs['BestNR1'] = 0 else: if trigger.chisq < 60: sbvs['BestNR1'] = trigger.snr else: sbvs['BestNR1'] = trigger.snr/((1 + (trigger.chisq/60.)**(chiq/chin))/2.)**(1./chiq)
def get_signal_vetoes(trigger,bankq=0,bankn=0,autoq=0,auton=0,chiq=0,chin=0,sigmaVals = None,fResp = None): sbvs = {} q = bankq nhigh = bankn q2 = autoq nhigh2 = auton if trigger.chisq == 0: sbvs['BestNR1'] = 0 else: if trigger.chisq < 60: sbvs['BestNR1'] = trigger.snr else: sbvs['BestNR1'] = trigger.snr/((1 + (trigger.chisq/60.)**(chiq/chin))/2.)**(1./chiq)
471,705
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" % prefix] = (event.snr**2.0, event.chisq / event.chisq_dof) # # two-instrument parameters # for event1, event2 in iterutils.choices(sorted(events, key = lambda event: event.ifo), 2): assert event1.ifo != event2.ifo prefix = "%s_%s_" % (event1.ifo, event2.ifo) dt = float((event1.get_peak() + offsetvector[event1.ifo]) - (event2.get_peak() + offsetvector[event2.ifo])) params["%sdt" % prefix] = (dt,) dA = math.log10(abs(event1.amplitude / event2.amplitude)) params["%sdA" % prefix] = (dA,) df = float((event1.central_freq + 0.5*event1.bandwidth - event2.central_freq - 0.5*event2.bandwidth)/(event1.central_freq + 0.5*event1.bandwidth + event2.central_freq + 0.5*event2.bandwidth)) params["%sdf" % prefix] = (df,) # # done # return params
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" % prefix] = (event.snr**2.0, event.chisq / event.chisq_dof) # # two-instrument parameters # for event1, event2 in iterutils.choices(sorted(events, key = lambda event: event.ifo), 2): assert event1.ifo != event2.ifo prefix = "%s_%s_" % (event1.ifo, event2.ifo) dt = float((event1.get_peak() + offsetvector[event1.ifo]) - (event2.get_peak() + offsetvector[event2.ifo])) params["%sdt" % prefix] = (dt,) dA = math.log10(abs(event1.amplitude / event2.amplitude)) params["%sdA" % prefix] = (dA,) f_cut1 = event1.central_freq + event1.bandwidth / 2 f_cut2 = event2.central_freq + event2.bandwidth / 2 df = float((f_cut1 - f_cut2) / (f_cut1 + f_cut2)) params["%sdf" % prefix] = (df,) # # done # return params
471,706
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),))
471,707
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
471,708
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 coincparamsdistributions is None: coincparamsdistributions = get_coincparamsdistributions(xmldoc) else: coincparamsdistributions += get_coincparamsdistributions(xmldoc) xmldoc.unlink() return coincparamsdistributions
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 coincparamsdistributions is None: coincparamsdistributions = get_coincparamsdistributions(xmldoc) else: coincparamsdistributions += get_coincparamsdistributions(xmldoc) xmldoc.unlink() return coincparamsdistributions
471,709
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 coincparamsdistributions is None: coincparamsdistributions = get_coincparamsdistributions(xmldoc) else: coincparamsdistributions += get_coincparamsdistributions(xmldoc) xmldoc.unlink() return coincparamsdistributions
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 coincparamsdistributions is None: coincparamsdistributions = get_coincparamsdistributions(xmldoc, seglists = seglists) else: coincparamsdistributions += get_coincparamsdistributions(xmldoc) xmldoc.unlink() return coincparamsdistributions
471,710
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 coincparamsdistributions is None: coincparamsdistributions = get_coincparamsdistributions(xmldoc) else: coincparamsdistributions += get_coincparamsdistributions(xmldoc) xmldoc.unlink() return coincparamsdistributions
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 coincparamsdistributions is None: coincparamsdistributions = get_coincparamsdistributions(xmldoc) else: coincparamsdistributions += get_coincparamsdistributions(xmldoc, seglists = seglists) xmldoc.unlink() return coincparamsdistributions
471,711
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"
471,712
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
471,713
def __init__(self): """ here are all the things we need """ #start with data needed for every coinc self.ifo_list = [] self.ifo_coincs = [] self.snr = {} self.gps = {} self.eff_distances = {} self.mass1 = {} self.mass2 = {} self.time = None self.FAR = -1 #this stuff is only needed for injections self.is_injection = False self.latitude_inj = None self.longitude_inj = None self.mass1_inj = None self.mass2_inj = None self.distance_inj = None self.eff_distances_inj = {}
def __init__(self): """ here are all the things we need """ #start with data needed for every coinc self.ifo_list = [] self.ifo_coincs = [] self.snr = {} self.gps = {} self.eff_distances = {} self.mass1 = {} self.mass2 = {} self.time = None self.FAR = 99 #this stuff is only needed for injections self.is_injection = False self.latitude_inj = None self.longitude_inj = None self.mass1_inj = None self.mass2_inj = None self.distance_inj = None self.eff_distances_inj = {}
471,714
def get_coincs_from_coinctable(self,files): """ read data from coinc tables (xml format) FIXME: currently assumes one coinc per file!!! """ for file in files: coinc = CoincData() xmldoc = utils.load_filename(file) sngltab = tab.get_table(xmldoc,lsctables.SnglInspiralTable.tableName) coinc.set_snr(dict((row.ifo, row.snr) for row in sngltab)) coinc.set_gps(dict((row.ifo, LIGOTimeGPS(row.get_end())) for row in sngltab)) coinc.set_effDs(dict((row.ifo,row.eff_distance) for row in sngltab)) coinc.set_masses(dict((row.ifo, row.mass1) for row in sngltab), \ dict((row.ifo, row.mass2) for row in sngltab)) ctab = tab.get_table(xmldoc,lsctables.CoincInspiralTable.tableName) coinc.set_ifos(list(ctab[0].get_ifos())) try: simtab = tab.get_table(xmldoc,lsctables.SimInspiralTable.tableName) row = siminsptab[0] effDs_inj = {} for ifo in coinc.ifo_list: if ifo == 'H1': effDs_inj[ifo] = row.eff_dist_h elif ifo == 'L1': effDs_inj[ifo] = row.eff_dist_l elif ifo == 'V1': effDs_inj[ifo] = row.eff_dist_v dist_inj = row.distance coinc.set_inj_params(row.latitude,row.longitude,row.mass1,row.mass2, \ dist_inj,effDs_inj) coinc.is_injection = True #FIXME: name the exception! except: pass
defif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) get_coincs_from_coinctable(self,files):if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) """if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) readif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) dataif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) fromif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coincif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) tablesif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) (xmlif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) format)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) FIXME:if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) currentlyif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) assumesif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) oneif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coincif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) perif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) file!!!if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) """if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) forif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) fileif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) inif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) files:if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coincif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) CoincData()if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) xmldocif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) utils.load_filename(file)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) sngltabif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) tab.get_table(xmldoc,lsctables.SnglInspiralTable.tableName)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.set_snr(dict((row.ifo,if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) row.snr)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) forif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) rowif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) inif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) sngltab))if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.set_gps(dict((row.ifo,if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) LIGOTimeGPS(row.get_end()))if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) forif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) rowif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) inif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) sngltab))if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.set_effDs(dict((row.ifo,row.eff_distance)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) forif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) rowif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) inif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) sngltab))if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.set_masses(dict((row.ifo,if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) row.mass1)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) forif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) rowif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) inif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) sngltab),if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) \if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) dict((row.ifo,if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) row.mass2)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) forif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) rowif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) inif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) sngltab))if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ctabif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) tab.get_table(xmldoc,lsctables.CoincInspiralTable.tableName)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.set_ifos(list(ctab[0].get_ifos()))if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) try:if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) simtabif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) tab.get_table(xmldoc,lsctables.SimInspiralTable.tableName)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) rowif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) siminsptab[0]if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) effDs_injif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) {}if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) forif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ifoif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) inif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.ifo_list:if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ifif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ifoif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ==if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) 'H1':if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) effDs_inj[ifo]if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) row.eff_dist_hif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) elifif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ifoif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ==if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) 'L1':if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) effDs_inj[ifo]if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) row.eff_dist_lif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) elifif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ifoif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ==if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) 'V1':if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) effDs_inj[ifo]if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) row.eff_dist_vif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) dist_injif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) row.distanceif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.set_inj_params(row.latitude,row.longitude,row.mass1,row.mass2,if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) \if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) dist_inj,effDs_inj)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.is_injectionif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) Trueif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) #FIXME:if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) nameif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) theif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) exception!if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) except:if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) pass
471,715
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 statistic coincTrigs = CoincInspiralUtils.coincInspiralTable(inspTrigs,'snr') try: inspInj = SimInspiralUtils.ReadSimInspiralFromFiles(files) coincTrigs.add_sim_inspirals(inspInj) #FIXME: name the exception! except: pass
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 statistic statistic = CoincInspiralUtils.coincStatistic('snr',None,None) coincTrigs = CoincInspiralUtils.coincInspiralTable(inspTrigs,statistic) try: inspInj = SimInspiralUtils.ReadSimInspiralFromFiles(files) coincTrigs.add_sim_inspirals(inspInj) #FIXME: name the exception! except: pass
471,716
def __init__(self): """ here are all the things we need """ #start with data needed for every coinc self.ifo_list = [] self.ifo_coincs = [] self.snr = {} self.gps = {} self.eff_distances = {} self.mass1 = {} self.mass2 = {} self.time = None self.FAR = -1 #this stuff is only needed for injections self.is_injection = False self.latitude_inj = None self.longitude_inj = None self.mass1_inj = None self.mass2_inj = None self.distance_inj = None self.eff_distances_inj = {}
def __init__(self): """ here are all the things we need """ #start with data needed for every coinc self.ifo_list = [] self.ifo_coincs = [] self.snr = {} self.gps = {} self.eff_distances = {} self.mass1 = {} self.mass2 = {} self.time = None self.FAR = 99 #this stuff is only needed for injections self.is_injection = False self.latitude_inj = None self.longitude_inj = None self.mass1_inj = None self.mass2_inj = None self.distance_inj = None self.eff_distances_inj = {}
471,717
def __init__(self): """ here are all the things we need """ #start with data needed for every coinc self.ifo_list = [] self.ifo_coincs = [] self.snr = {} self.gps = {} self.eff_distances = {} self.mass1 = {} self.mass2 = {} self.time = None self.FAR = -1 #this stuff is only needed for injections self.is_injection = False self.latitude_inj = None self.longitude_inj = None self.mass1_inj = None self.mass2_inj = None self.distance_inj = None self.eff_distances_inj = {}
def__init__(self):"""hereareallthethingsweneed"""#startwithdataneededforeverycoincself.ifo_list=[]self.ifo_coincs=[]self.snr={}self.gps={}self.eff_distances={}self.mass1={}self.mass2={}self.time=Noneself.FAR=-1#thisstuffisonlyneededforinjectionsself.is_injection=Falseself.latitude_inj=Noneself.longitude_inj=Noneself.mass1_inj=Noneself.mass2_inj=Noneself.distance_inj=Noneself.eff_distances_inj={}
471,718
def get_coincs_from_coinctable(self,files): """ read data from coinc tables (xml format) FIXME: currently assumes one coinc per file!!! """ for file in files: coinc = CoincData() xmldoc = utils.load_filename(file) sngltab = tab.get_table(xmldoc,lsctables.SnglInspiralTable.tableName) coinc.set_snr(dict((row.ifo, row.snr) for row in sngltab)) coinc.set_gps(dict((row.ifo, LIGOTimeGPS(row.get_end())) for row in sngltab)) coinc.set_effDs(dict((row.ifo,row.eff_distance) for row in sngltab)) coinc.set_masses(dict((row.ifo, row.mass1) for row in sngltab), \ dict((row.ifo, row.mass2) for row in sngltab)) ctab = tab.get_table(xmldoc,lsctables.CoincInspiralTable.tableName) coinc.set_ifos(list(ctab[0].get_ifos())) try: simtab = tab.get_table(xmldoc,lsctables.SimInspiralTable.tableName) row = siminsptab[0] effDs_inj = {} for ifo in coinc.ifo_list: if ifo == 'H1': effDs_inj[ifo] = row.eff_dist_h elif ifo == 'L1': effDs_inj[ifo] = row.eff_dist_l elif ifo == 'V1': effDs_inj[ifo] = row.eff_dist_v dist_inj = row.distance coinc.set_inj_params(row.latitude,row.longitude,row.mass1,row.mass2, \ dist_inj,effDs_inj) coinc.is_injection = True #FIXME: name the exception! except: pass
defif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) get_coincs_from_coinctable(self,files):if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) """if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) readif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) dataif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) fromif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coincif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) tablesif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) (xmlif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) format)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) FIXME:if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) currentlyif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) assumesif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) oneif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coincif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) perif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) file!!!if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) """if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) forif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) fileif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) inif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) files:if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coincif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) CoincData()if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) xmldocif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) utils.load_filename(file)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) sngltabif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) tab.get_table(xmldoc,lsctables.SnglInspiralTable.tableName)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.set_snr(dict((row.ifo,if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) row.snr)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) forif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) rowif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) inif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) sngltab))if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.set_gps(dict((row.ifo,if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) LIGOTimeGPS(row.get_end()))if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) forif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) rowif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) inif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) sngltab))if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.set_effDs(dict((row.ifo,row.eff_distance)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) forif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) rowif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) inif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) sngltab))if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.set_masses(dict((row.ifo,if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) row.mass1)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) forif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) rowif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) inif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) sngltab),if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) \if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) dict((row.ifo,if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) row.mass2)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) forif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) rowif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) inif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) sngltab))if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ctabif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) tab.get_table(xmldoc,lsctables.CoincInspiralTable.tableName)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.set_ifos(list(ctab[0].get_ifos()))if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) try:if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) simtabif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) tab.get_table(xmldoc,lsctables.SimInspiralTable.tableName)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) rowif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) siminsptab[0]if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) effDs_injif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) {}if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) forif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ifoif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) inif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.ifo_list:if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ifif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ifoif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ==if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) 'H1':if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) effDs_inj[ifo]if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) row.eff_dist_hif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) elifif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ifoif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ==if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) 'L1':if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) effDs_inj[ifo]if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) row.eff_dist_lif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) elifif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ifoif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) ==if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) 'V1':if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) effDs_inj[ifo]if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) row.eff_dist_vif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) dist_injif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) row.distanceif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.set_inj_params(row.latitude,row.longitude,row.mass1,row.mass2,if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) \if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) dist_inj,effDs_inj)if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) coinc.is_injectionif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) =if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) Trueif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) #FIXME:if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) nameif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) theif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) exception!if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) except:if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) pass
471,719
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(float(time)))) for cacheEntry in cacheSelected: path_output = cacheEntry.path() time_output = str(cacheEntry.segment[0]) type_output = cacheEntry.description ifo_output = cacheEntry.observatory qscanList.append([path_output,time_output,type_output,ifo_output]) return qscanList
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=segments.segment(math.floor(float(time)), math.ceil(float(time)))) else: cacheSelected = cacheSelected.sieve(segment=segments.segment(math.floor(float(time))-0.5, math.floor(float(time))+0.5)) for cacheEntry in cacheSelected: path_output = cacheEntry.path() time_output = str(cacheEntry.segment[0]) type_output = cacheEntry.description ifo_output = cacheEntry.observatory qscanList.append([path_output,time_output,type_output,ifo_output]) return qscanList
471,720
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 closed boundary, and the same for the upper parameter. For example, if table_name is coinc_inspiral, table_param is mchirp and param_ranges_opt is '[2,8);[8,17]' will get: self.param = 'coinc_inspiral.mchirp' self.param_ranges = [ ( ('>=',2.0), ('<',8.0) ), ( ('>=',8.0), ('<=', 17.0) ) ]
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 closed boundary, and the same for the upper parameter. For example, if table_name is coinc_inspiral, table_param is mchirp and param_ranges_opt is '[2,8);[8,17]' will get: self.param = 'coinc_inspiral.mchirp' self.param_ranges = [ ( ('>=',2.0), ('<',8.0) ), ( ('>=',8.0), ('<=', 17.0) ) ]
471,721
def __init__(self, xmldoc, b_b_def, sb_b_def, si_b_def, sb_c_e_def, sb_c_n_def, si_c_e_def, si_c_n_def, process): # # store the process row #
def __init__(self, xmldoc, b_b_def, sb_b_def, si_b_def, sb_c_e_def, sb_c_n_def, si_c_e_def, si_c_n_def, process, livetime_program): # # store the process row #
471,722
def __init__(self, xmldoc, b_b_def, sb_b_def, si_b_def, sb_c_e_def, sb_c_n_def, si_c_e_def, si_c_n_def, process): # # store the process row #
def __init__(self, xmldoc, b_b_def, sb_b_def, si_b_def, sb_c_e_def, sb_c_n_def, si_c_e_def, si_c_n_def, process): # # store the process row #
471,723
def bursts_near_peaktime(self, t): """ Return a list of the burst events whose peak times are within self.burst_peak_time_window of t. """ return self.snglbursttable[bisect.bisect_left(self.snglbursttable, t - self.burst_peak_time_window):bisect.bisect_right(self.snglbursttable, t + self.burst_peak_time_window)]
def bursts_near_peaktime(self, t): """ Return a list of the burst events whose peak times are within window seconds of t. This is not used to define any coincidences, only to provide a short list of burst events for use in more costly comparison tests. """ return self.snglbursttable[bisect.bisect_left(self.snglbursttable, t - self.burst_peak_time_window):bisect.bisect_right(self.snglbursttable, t + self.burst_peak_time_window)]
471,724
def bursts_near_peaktime(self, t): """ Return a list of the burst events whose peak times are within self.burst_peak_time_window of t. """ return self.snglbursttable[bisect.bisect_left(self.snglbursttable, t - self.burst_peak_time_window):bisect.bisect_right(self.snglbursttable, t + self.burst_peak_time_window)]
def bursts_near_peaktime(self, t): """ Return a list of the burst events whose peak times are within self.burst_peak_time_window of t. """ return self.snglbursttable[bisect.bisect_left(self.snglbursttable, t - self.burst_peak_time_window):bisect.bisect_right(self.snglbursttable, t + self.burst_peak_time_window)]
471,725
def coincs_near_peaktime(self, t): """ Return a list of the (coinc_event_id, event list) tuples in which at least one burst event's peak time is within self.coinc_peak_time_window of t. """ # FIXME: this test does not consider the time slide # offsets that should be applied to the coinc, but for now # injections are done at zero lag so this isn't a problem # yet return [(coinc_event_id, events) for coinc_event_id, events in self.coincs if (t - self.coinc_peak_time_window <= events[-1].get_peak()) and (events[0].get_peak() <= t + self.coinc_peak_time_window)]
def coincs_near_peaktime(self, t): """ Return a list of the (coinc_event_id, event list) tuples in which at least one burst event's peak time is within window seconds of t. This is not used to define any coincidences, only to provide a short list of coinc events for use in more costly comparison tests. """ # FIXME: this test does not consider the time slide # offsets that should be applied to the coinc, but for now # injections are done at zero lag so this isn't a problem # yet return [(coinc_event_id, events) for coinc_event_id, events in self.coincs if (t - self.coinc_peak_time_window <= events[-1].get_peak()) and (events[0].get_peak() <= t + self.coinc_peak_time_window)]
471,726
def coincs_near_peaktime(self, t): """ Return a list of the (coinc_event_id, event list) tuples in which at least one burst event's peak time is within self.coinc_peak_time_window of t. """ # FIXME: this test does not consider the time slide # offsets that should be applied to the coinc, but for now # injections are done at zero lag so this isn't a problem # yet return [(coinc_event_id, events) for coinc_event_id, events in self.coincs if (t - self.coinc_peak_time_window <= events[-1].get_peak()) and (events[0].get_peak() <= t + self.coinc_peak_time_window)]
def coincs_near_peaktime(self, t): """ Return a list of the (coinc_event_id, event list) tuples in which at least one burst event's peak time is within self.coinc_peak_time_window of t. """ # FIXME: this test does not consider the time slide # offsets that should be applied to the coinc, but for now # injections are done at zero lag so this isn't a problem # yet return [(coinc_event_id, events) for coinc_event_id, events in self.coincs if (t - self.coinc_peak_time_window <= events[-1].get_peak()) and (events[0].get_peak() <= t + self.coinc_peak_time_window)]
471,727
def StringCuspSnglCompare(sim, burst): """ Return False if the peak time of the injection sim lies within the time interval of burst. """ return SimBurstUtils.time_at_instrument(sim, burst.ifo) not in burst.get_period()
def StringCuspSnglCompare(sim, burst): """ Return False (injection matches event) if an autocorrelation-width window centred on the injection is continuous with the time interval of the burst. """ tinj = SimBurstUtils.time_at_instrument(sim, burst.ifo) window = SimBurstUtils.stringcusp_autocorrelation_width / 2 return segments.segment(tinj - window, tinj + window).disjoint(burst.get_period())
471,728
def ExcessPowerSnglCompare(sim, burst): """ Return False if the peak time and centre frequency of sim lie within the time-frequency tile of burst. """ return StringCuspSnglCompare(sim, burst) or (sim.frequency not in burst.get_band())
def ExcessPowerSnglCompare(sim, burst): """ Return False (injection matches event) if the peak time and centre frequency of sim lie within the time-frequency tile of burst. """ return (SimBurstUtils.time_at_instrument(sim, burst.ifo) not in burst.get_period()) or (sim.frequency not in burst.get_band())
471,729
def OmegaSnglCompare(sim, burst, delta_t = 10.0): """ Return False if the peak time and centre frequency of sim lie within the time-frequency tile of burst. """ return abs(float(SimBurstUtils.time_at_instrument(sim, burst.ifo) - burst.get_peak())) > delta_t
def OmegaSnglCompare(sim, burst, delta_t = 10.0): """ Return False (injection matches event) if the time of the sim and the peak time of the burst event differ by less than or equal to delta_t seconds. """ return abs(float(SimBurstUtils.time_at_instrument(sim, burst.ifo) - burst.get_peak())) > delta_t
471,730
def StringCuspNearCoincCompare(sim, burst): """ Return False if the peak time of the sim is "near" the burst event. """ return OmegaNearCoincCompare(sim, burst)
def StringCuspNearCoincCompare(sim, burst): """ Return False (injection matches coinc) if the peak time of the sim is "near" the burst event. """ tinj = SimBurstUtils.time_at_instrument(sim, burst.ifo) window = SimBurstUtils.stringcusp_autocorrelation_width / 2 + SimBurstUtils.burst_is_near_injection_window return segments.segment(tinj - window, tinj + window).disjoint(burst.get_period())
471,731
def ExcessPowerNearCoincCompare(sim, burst): """ Return False if the peak time of the sim is "near" the burst event. """ return not SimBurstUtils.burst_is_near_injection(sim, burst.start_time, burst.start_time_ns, burst.duration, burst.ifo)
def ExcessPowerNearCoincCompare(sim, burst): """ Return False (injection matches coinc) if the peak time of the sim is "near" the burst event. """ return not SimBurstUtils.burst_is_near_injection(sim, burst.start_time, burst.start_time_ns, burst.duration, burst.ifo)
471,732
def OmegaNearCoincCompare(sim, burst): """ Return False if the peak time of the sim is "near" the burst event. """ start_time = burst.get_peak() - burst.duration / 2.0 return not SimBurstUtils.burst_is_near_injection(sim, start_time.seconds, start_time.nanoseconds, burst.duration, burst.ifo)
def OmegaNearCoincCompare(sim, burst): """ Return False (injection matches coinc) if the peak time of the sim is "near" the burst event. """ return OmegaSnglCompare(sim, burst, delta_t = 20.0 + burst.duration / 2)
471,733
def find_sngl_burst_matches(contents, sim, comparefunc): """ Scan the burst table for triggers matching sim. """ return [burst for burst in contents.bursts_near_peaktime(sim.get_time_geocent()) if not comparefunc(sim, burst)]
def find_sngl_burst_matches(contents, sim, comparefunc, sieve_window): """ Scan the burst table for triggers matching sim. sieve_window is used in a bisection search to quickly identify burst events within that many seconds of the injection's peak time at the geocentre; it should be larger than the greatest time difference that can separate a burst event's peak time from an injection's peak time at the geocentre and the two still be considered a match. """ return [burst for burst in contents.bursts_near_peaktime(sim.get_time_geocent(), sieve_window) if not comparefunc(sim, burst)]
471,734
def find_exact_coinc_matches(coincs, sim, comparefunc): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which all burst events match sim. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero lag so this isn't a problem yet return [coinc_event_id for coinc_event_id, events in coincs if True not in (bool(comparefunc(sim, event)) for event in events)]
def find_exact_coinc_matches(coincs, sim, comparefunc, seglists): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which all burst events match sim. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero lag so this isn't a problem yet return [coinc_event_id for coinc_event_id, events in coincs if True not in (bool(comparefunc(sim, event)) for event in events)]
471,735
def find_exact_coinc_matches(coincs, sim, comparefunc): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which all burst events match sim. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero lag so this isn't a problem yet return [coinc_event_id for coinc_event_id, events in coincs if True not in (bool(comparefunc(sim, event)) for event in events)]
def find_exact_coinc_matches(coincs, sim, comparefunc): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which all burst events match sim and to which all instruments on at the time of the sim contributed events. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero lag so this isn't a problem yet return [coinc_event_id for coinc_event_id, events in coincs if True not in (bool(comparefunc(sim, event)) for event in events)]
471,736
def find_exact_coinc_matches(coincs, sim, comparefunc): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which all burst events match sim. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero lag so this isn't a problem yet return [coinc_event_id for coinc_event_id, events in coincs if True not in (bool(comparefunc(sim, event)) for event in events)]
def find_exact_coinc_matches(coincs, sim, comparefunc): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which all burst events match sim. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero lag so this isn't a problem yet on_instruments = SimBurstUtils.on_instruments(sim, seglists) return set(coinc_event_id for coinc_event_id, events in coincs if on_instruments.issubset(set(event.ifo for event in events)) and not any(comparefunc(sim, event) for event in events))
471,737
def find_near_coinc_matches(coincs, sim, comparefunc): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which at least one burst event matches sim. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero lag so this isn't a problem yet return [coinc_event_id for coinc_event_id, events in coincs if False in (bool(comparefunc(sim, event)) for event in events)]
def find_near_coinc_matches(coincs, sim, comparefunc): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which at least one burst event matches sim. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero lag so this isn't a problem yet return set(coinc_event_id for coinc_event_id, events in coincs if not all(comparefunc(sim, event) for event in events))
471,738
si_c_n_def = si_c_n_def,
si_c_n_def = si_c_n_def,
471,739
si_c_n_def = si_c_n_def,
si_c_n_def = si_c_n_def,
471,740
si_c_n_def = si_c_n_def,
si_c_n_def = si_c_n_def,
471,741
si_c_n_def = si_c_n_def,
si_c_n_def = si_c_n_def,
471,742
si_c_n_def = si_c_n_def,
si_c_n_def = si_c_n_def,
471,743
def get_analyzeQscan_RDS(self): """ """ #analyseQscan.py_FG_RDS_full_data/H1-analyseQscan_H1_931176926_116_rds-unspecified-gpstime.cache cacheList=list() cacheFiles=list() for sngl in self.coinc.sngls: timeString=str(float(sngl.time)).replace(".","_") myCacheMask="*%s*/%s-analyseQscan_%s_%s_rds*.cache"%\ (self.coint.type,sngl.ifo,sngl.ifo,timeString) #Ignore the files with seis_rds in them for x in fnmatch.filter(self.fsys,myCacheMask): if not x.__contains__('seis_rds'): cacheList.append(x) #Read the cache file or files cacheFiles=self.__readCache__(cacheList) return cacheFiles
def get_analyzeQscan_RDS(self): """ """ #analyseQscan.py_FG_RDS_full_data/H1-analyseQscan_H1_931176926_116_rds-unspecified-gpstime.cache cacheList=list() cacheFiles=list() for sngl in self.coinc.sngls: timeString=str(float(sngl.time)).replace(".","_") myCacheMask="*%s*/%s-analyseQscan_%s_%s_rds*.cache"%\ (self.coinc.type,sngl.ifo,sngl.ifo,timeString) #Ignore the files with seis_rds in them for x in fnmatch.filter(self.fsys,myCacheMask): if not x.__contains__('seis_rds'): cacheList.append(x) #Read the cache file or files cacheFiles=self.__readCache__(cacheList) return cacheFiles
471,744
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)
471,745
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)
471,746
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 statistic coincTrigs = CoincInspiralUtils.coincInspiralTable(inspTriggers,'snr') try: inspInj = SimInspiralUtils.ReadSimInspiralFromFiles(files) coincTrigs.add_sim_inspirals(inspInj) #FIXME: name the exception! except: pass
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 statistic coincTrigs = CoincInspiralUtils.coincInspiralTable(inspTrigs,'snr') try: inspInj = SimInspiralUtils.ReadSimInspiralFromFiles(files) coincTrigs.add_sim_inspirals(inspInj) #FIXME: name the exception! except: pass
471,747
def now(): return datetime.now()
def now(): return datetime.now()
471,748
def updateTypeMaps(namespace): """ Updates the type maps with a new namespace. **Must** be executed at least once, **before** node class file generation. """ global JAVA_TYPE_MAP JAVA_TYPE_MAP = { # Base types namespace + 'boolean': 'Boolean', namespace + 'dateTime': 'String', namespace + 'string': 'String', namespace + 'integer': 'Integer', namespace + 'positiveInteger': 'Integer', namespace + 'nonNegativeInteger': 'Integer', namespace + 'float': 'Double', namespace + 'anyURI': 'String', namespace + 'hexBinary': 'String', # Hacks 'NamingConvention': 'String', 'PercentFraction': 'Double', 'MIMEtype': 'String', 'Leader': 'Experimenter', 'Contact': 'Experimenter', 'Pump': 'Laser', } global JAVA_BASE_TYPE_MAP JAVA_BASE_TYPE_MAP = { 'UniversallyUniqueIdentifier': DEFAULT_BASE_CLASS }
def updateTypeMaps(namespace): """ Updates the type maps with a new namespace. **Must** be executed at least once, **before** node class file generation. """ global JAVA_TYPE_MAP JAVA_TYPE_MAP = { # Base types namespace + 'boolean': 'Boolean', namespace + 'dateTime': 'String', namespace + 'string': 'String', namespace + 'integer': 'Integer', namespace + 'positiveInteger': 'Integer', namespace + 'nonNegativeInteger': 'Integer', namespace + 'float': 'Double', namespace + 'anyURI': 'String', namespace + 'hexBinary': 'String', # Hacks 'NamingConvention': 'String', 'PercentFraction': 'Double', 'MIMEtype': 'String', 'Leader': 'Experimenter', 'Contact': 'Experimenter', 'Pump': 'Laser', } global JAVA_BASE_TYPE_MAP JAVA_BASE_TYPE_MAP = { 'UniversallyUniqueIdentifier': DEFAULT_BASE_CLASS }
471,749
def updateTypeMaps(namespace): """ Updates the type maps with a new namespace. **Must** be executed at least once, **before** node class file generation. """ global JAVA_TYPE_MAP JAVA_TYPE_MAP = { # Base types namespace + 'boolean': 'Boolean', namespace + 'dateTime': 'String', namespace + 'string': 'String', namespace + 'integer': 'Integer', namespace + 'positiveInteger': 'Integer', namespace + 'nonNegativeInteger': 'Integer', namespace + 'float': 'Double', namespace + 'anyURI': 'String', namespace + 'hexBinary': 'String', # Hacks 'NamingConvention': 'String', 'PercentFraction': 'Double', 'MIMEtype': 'String', 'Leader': 'Experimenter', 'Contact': 'Experimenter', 'Pump': 'Laser', } global JAVA_BASE_TYPE_MAP JAVA_BASE_TYPE_MAP = { 'UniversallyUniqueIdentifier': DEFAULT_BASE_CLASS }
def updateTypeMaps(namespace): """ Updates the type maps with a new namespace. **Must** be executed at least once, **before** node class file generation. """ global JAVA_TYPE_MAP JAVA_TYPE_MAP = { # Base types namespace + 'boolean': 'Boolean', namespace + 'dateTime': 'String', namespace + 'string': 'String', namespace + 'integer': 'Integer', namespace + 'positiveInteger': 'Integer', namespace + 'nonNegativeInteger': 'Integer', namespace + 'float': 'Double', namespace + 'anyURI': 'String', namespace + 'hexBinary': 'String', # Hacks} global JAVA_BASE_TYPE_MAP JAVA_BASE_TYPE_MAP = { 'UniversallyUniqueIdentifier': DEFAULT_BASE_CLASS }
471,750
def updateTypeMaps(namespace): """ Updates the type maps with a new namespace. **Must** be executed at least once, **before** node class file generation. """ global JAVA_TYPE_MAP JAVA_TYPE_MAP = { # Base types namespace + 'boolean': 'Boolean', namespace + 'dateTime': 'String', namespace + 'string': 'String', namespace + 'integer': 'Integer', namespace + 'positiveInteger': 'Integer', namespace + 'nonNegativeInteger': 'Integer', namespace + 'float': 'Double', namespace + 'anyURI': 'String', namespace + 'hexBinary': 'String', # Hacks 'NamingConvention': 'String', 'PercentFraction': 'Double', 'MIMEtype': 'String', 'Leader': 'Experimenter', 'Contact': 'Experimenter', 'Pump': 'Laser', } global JAVA_BASE_TYPE_MAP JAVA_BASE_TYPE_MAP = { 'UniversallyUniqueIdentifier': DEFAULT_BASE_CLASS }
defglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' updateTypeMaps(namespace):global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' """global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' Updatesglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' theglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' typeglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' mapsglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' withglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' aglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' newglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' namespace.global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' **Must**global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' beglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' executedglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' atglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' leastglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' once,global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' **before**global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' nodeglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' classglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' fileglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' generation.global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' """global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' globalglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' JAVA_TYPE_MAPglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' JAVA_TYPE_MAPglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' =global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' {global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' #global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' Baseglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' typesglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' namespaceglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' +global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'boolean':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'Boolean',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' namespaceglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' +global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'dateTime':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'String',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' namespaceglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' +global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'string':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'String',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' namespaceglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' +global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'integer':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'Integer',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' namespaceglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' +global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'positiveInteger':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'Integer',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' namespaceglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' +global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'nonNegativeInteger':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'Integer',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' namespaceglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' +global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'float':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'Double',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' namespaceglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' +global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'anyURI':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'String',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' namespaceglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' +global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'hexBinary':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'String',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' #global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' Hacksglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'NamingConvention':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'String',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'PercentFraction':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'Double',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'MIMEtype':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'String',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'Leader':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'Experimenter',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'Contact':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'Experimenter',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'Pump':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'Laser',global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' }global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' globalglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' JAVA_BASE_TYPE_MAPglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' JAVA_BASE_TYPE_MAPglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' =global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' {global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' 'UniversallyUniqueIdentifier':global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' DEFAULT_BASE_CLASSglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' }global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser'
471,751
def _get_metadataStoreType(self): # FIXME: No more node #javaType = self.javaType #if javaType[-4:] == "Node": # return "String" return javaType
def _get_metadataStoreType(self): # FIXME: No more node #javaType = self.javaType #if javaType[-4:] == "Node": # return "String" return javaType
471,752
def _get_metadataStoreType(self): # FIXME: No more node #javaType = self.javaType #if javaType[-4:] == "Node": # return "String" return javaType
def _get_metadataStoreType(self): # FIXME: No more node #javaType = self.javaType #if javaType[-4:] == "Node": # return "String" return javaType
471,753
def _get_isReference(self): o = self.model.getObjectByName(self.type) if o is not None and o.base == "Reference": return True return False
def _get_isReference(self): o = self.model.getObjectByName(self.type) if o is not None: return o.isReference return False
471,754
def now(): return datetime.now()
def now(): return datetime.now()
471,755
def updateTypeMaps(namespace): """ Updates the type maps with a new namespace. **Must** be executed at least once, **before** node class file generation. """ global JAVA_PRIMITIVE_TYPE_MAP JAVA_PRIMITIVE_TYPE_MAP = { namespace + 'boolean': 'Boolean', namespace + 'dateTime': 'String', namespace + 'string': 'String', namespace + 'integer': 'Integer', namespace + 'long': 'Long', namespace + 'positiveInteger': 'PositiveInteger', namespace + 'nonNegativeInteger': 'NonNegativeInteger', namespace + 'float': 'Double', namespace + 'double': 'Double', namespace + 'anyURI': 'String', namespace + 'hexBinary': 'String', 'PercentFraction': 'PercentFraction', } global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' global JAVA_BASE_TYPE_MAP JAVA_BASE_TYPE_MAP = { 'UniversallyUniqueIdentifier': DEFAULT_BASE_CLASS }
def updateTypeMaps(namespace): """ Updates the type maps with a new namespace. **Must** be executed at least once, **before** node class file generation. """ global JAVA_PRIMITIVE_TYPE_MAP JAVA_PRIMITIVE_TYPE_MAP = { namespace + 'boolean': 'Boolean', namespace + 'dateTime': 'String', namespace + 'string': 'String', namespace + 'integer': 'Integer', namespace + 'long': 'Long', 'PositiveInt': 'PositiveInteger', 'NonNegativeInt': 'NonNegativeInteger', 'PositiveLong': 'PositiveLong', 'NonNegativeLong': 'NonNegativeLong', namespace + 'float': 'Double', namespace + 'double': 'Double', namespace + 'anyURI': 'String', namespace + 'hexBinary': 'String', 'PercentFraction': 'PercentFraction', } global JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' global JAVA_BASE_TYPE_MAP JAVA_BASE_TYPE_MAP = { 'UniversallyUniqueIdentifier': DEFAULT_BASE_CLASS }
471,756
def _get_javaType(self): try: # Hand back the type of enumerations if self.isEnumeration: javaType = self.name if len(self.delegate.values) == 0: # As we have no directly defined possible values we have # no reason to qualify our type explicitly. return self.type if javaType == "Type": # One of the OME XML unspecific "Type" properties which # can only be qualified by the parent. if self.type.endswith("string"): # We've been defined entirely inline, prefix our Java # type name with the parent type's name. return "%s%s" % (self.parent.name, javaType) # There's another type which describes us, use its name # as our Java type name. return self.type return javaType # Handle XML Schema types that directly map to Java types return JAVA_TYPE_MAP[self.type] except KeyError: # Hand back the type of references or complex types with the # useless OME XML 'Ref' suffix removed. if self.isBackReference or \ (not self.isAttribute and self.delegate.isComplex()): return self.REF_REGEX.sub('', self.type) # Hand back the type of complex types if not self.isAttribute and self.delegate.isComplex(): return self.type if not self.isEnumeration: # We have a property whose type was defined by a top level # simpleType. simpleTypeName = self.type return self.resolveJavaTypeFromSimpleType(simpleTypeName) logging.debug("%s dump: %s" % (self, self.__dict__)) logging.debug("%s delegate dump: %s" % (self, self.delegate.__dict__)) raise ModelProcessingError, \ "Unable to find %s Java type for %s" % (self.name, self.type)
def _get_javaType(self): try: # Hand back the type of enumerations if self.isEnumeration: javaType = self.name if len(self.delegate.values) == 0: # As we have no directly defined possible values we have # no reason to qualify our type explicitly. return self.type if javaType == "Type": # One of the OME XML unspecific "Type" properties which # can only be qualified by the parent. if self.type.endswith("string"): # We've been defined entirely inline, prefix our Java # type name with the parent type's name. return "%s%s" % (self.parent.name, javaType) # There's another type which describes us, use its name # as our Java type name. return self.type return javaType # Handle XML Schema types that directly map to Java types return JAVA_TYPE_MAP[self.type.replace('OME:', '')] except KeyError: # Hand back the type of references or complex types with the # useless OME XML 'Ref' suffix removed. if self.isBackReference or \ (not self.isAttribute and self.delegate.isComplex()): return self.REF_REGEX.sub('', self.type) # Hand back the type of complex types if not self.isAttribute and self.delegate.isComplex(): return self.type if not self.isEnumeration: # We have a property whose type was defined by a top level # simpleType. simpleTypeName = self.type return self.resolveJavaTypeFromSimpleType(simpleTypeName) logging.debug("%s dump: %s" % (self, self.__dict__)) logging.debug("%s delegate dump: %s" % (self, self.delegate.__dict__)) raise ModelProcessingError, \ "Unable to find %s Java type for %s" % (self.name, self.type)
471,757
def print_header(): print "\
def print_header(): print "\
471,758
def process_readings(): oucode = 0 olcode = 0 for line in open(source,'r'): items = line[:-1].split('\t') try: r = re.match(r'kKorea', items[1]) if r is not None: code = re.sub(r'U\+([0-9A-F]{2})([0-9A-F]{2})',r'\1\t\2',items[0]).split('\t') ucode = int(code[0],16) lcode = int(code[1],16) pron = items[2].split(' ')[0].capitalize() if oucode != ucode: print "],\nu'x%s':["%code[0], oucode = ucode olcode = -1 if (lcode - olcode) > 1: for i in range(lcode-olcode-1): print '"[?]",', olcode = lcode print '"'+pron+'",', except: continue
def process_readings(): oucode = 0 olcode = 0 for line in open(source,'r'): items = line[:-1].split('\t') try: r = re.match(r'kKorea', items[1]) if r is not None: code = re.sub(r'U\+([0-9A-F]{2})([0-9A-F]{2})',r'\1\t\2',items[0]).split('\t') ucode = int(code[0],16) lcode = int(code[1],16) pron = items[2].split(' ')[0].capitalize() if oucode != ucode: if firsttime: firsttime = False print "CODEPOINTS = { \nu'x%s':["%code[0], else: print "],\nu'x%s':["%code[0], oucode = ucode olcode = -1 if (lcode - olcode) > 1: for i in range(lcode-olcode-1): print '"[?]",', olcode = lcode print '"'+pron+'",', except: continue
471,759
def process_readings(): oucode = 0 olcode = 0 for line in open(source,'r'): items = line[:-1].split('\t') try: r = re.match(r'kKorea', items[1]) if r is not None: code = re.sub(r'U\+([0-9A-F]{2})([0-9A-F]{2})',r'\1\t\2',items[0]).split('\t') ucode = int(code[0],16) lcode = int(code[1],16) pron = items[2].split(' ')[0].capitalize() if oucode != ucode: print "],\nu'x%s':["%code[0], oucode = ucode olcode = -1 if (lcode - olcode) > 1: for i in range(lcode-olcode-1): print '"[?]",', olcode = lcode print '"'+pron+'",', except: continue
def process_readings(): oucode = 0 olcode = 0 for line in open(source,'r'): items = line[:-1].split('\t') try: r = re.match(r'kKorea', items[1]) if r is not None: code = re.sub(r'U\+([0-9A-F]{2})([0-9A-F]{2})',r'\1\t\2',items[0]).split('\t') ucode = int(code[0],16) lcode = int(code[1],16) pron = items[2].split(' ')[0].capitalize() if oucode != ucode: print "],\nu'x%s':["%code[0], oucode = ucode olcode = -1 if (lcode - olcode) > 1: for i in range(lcode-olcode-1): print "'',", olcode = lcode print '"'+pron+'",', except: continue
471,760
def process_readings(): oucode = 0 olcode = 0 for line in open(source,'r'): items = line[:-1].split('\t') try: r = re.match(r'kKorea', items[1]) if r is not None: code = re.sub(r'U\+([0-9A-F]{2})([0-9A-F]{2})',r'\1\t\2',items[0]).split('\t') ucode = int(code[0],16) lcode = int(code[1],16) pron = items[2].split(' ')[0].capitalize() if oucode != ucode: print "],\nu'x%s':["%code[0], oucode = ucode olcode = -1 if (lcode - olcode) > 1: for i in range(lcode-olcode-1): print '"[?]",', olcode = lcode print '"'+pron+'",', except: continue
def process_readings(): oucode = 0 olcode = 0 for line in open(source,'r'): items = line[:-1].split('\t') try: r = re.match(r'kKorea', items[1]) if r is not None: code = re.sub(r'U\+([0-9A-F]{2})([0-9A-F]{2})',r'\1\t\2',items[0]).split('\t') ucode = int(code[0],16) lcode = int(code[1],16) pron = items[2].split(' ')[0].capitalize() if oucode != ucode: print "],\nu'x%s':["%code[0], oucode = ucode olcode = -1 if (lcode - olcode) > 1: for i in range(lcode-olcode-1): print '"[?]",', olcode = lcode print "'"+pron+"',", except: continue
471,761
def __init__(self): self.codepoints = CODEPOINTS self.codepoints.update(JACODES)
def __init__(self): self.codepoints = CODEPOINTS self.codepoints.update(JACODES)
471,762
def __init__(self): self.codepoints = CODEPOINTS self.codepoints.update(JACODES)
def __init__(self): self.codepoints = CODEPOINTS self.codepoints.update(JACODES)
471,763
def process_readings(self, source, fout): oucode = 0
defpmap = { ord(u'â'):'a',ord(u'à'):'a',ord(u'ắ'):'a',ord(u'ă'):'a',ord(u'ấ'):'a', ord(u'ü'):'u',ord(u'ụ'):'u',ord(u'ú'):'u',ord(u'ử'):'u',ord(u'ư'):'u', ord(u'ù'):'u', ord(u'é'):'e', ord(u'ọ'):'o',ord(u'ố'):'o',ord(u'ộ'):'o',ord(u'ơ'):'o',ord(u'ớ'):'o', ord(u'ớ'):'o', } r1 = re.compile(r'U\+([0-9A-F]{2})([0-9A-F]{2}\b)') process_readings(self,pmap = { ord(u'â'):'a',ord(u'à'):'a',ord(u'ắ'):'a',ord(u'ă'):'a',ord(u'ấ'):'a', ord(u'ü'):'u',ord(u'ụ'):'u',ord(u'ú'):'u',ord(u'ử'):'u',ord(u'ư'):'u', ord(u'ù'):'u', ord(u'é'):'e', ord(u'ọ'):'o',ord(u'ố'):'o',ord(u'ộ'):'o',ord(u'ơ'):'o',ord(u'ớ'):'o', ord(u'ớ'):'o', } r1 = re.compile(r'U\+([0-9A-F]{2})([0-9A-F]{2}\b)') source,pmap = { ord(u'â'):'a',ord(u'à'):'a',ord(u'ắ'):'a',ord(u'ă'):'a',ord(u'ấ'):'a', ord(u'ü'):'u',ord(u'ụ'):'u',ord(u'ú'):'u',ord(u'ử'):'u',ord(u'ư'):'u', ord(u'ù'):'u', ord(u'é'):'e', ord(u'ọ'):'o',ord(u'ố'):'o',ord(u'ộ'):'o',ord(u'ơ'):'o',ord(u'ớ'):'o', ord(u'ớ'):'o', } r1 = re.compile(r'U\+([0-9A-F]{2})([0-9A-F]{2}\b)') fout):pmap = { ord(u'â'):'a',ord(u'à'):'a',ord(u'ắ'):'a',ord(u'ă'):'a',ord(u'ấ'):'a', ord(u'ü'):'u',ord(u'ụ'):'u',ord(u'ú'):'u',ord(u'ử'):'u',ord(u'ư'):'u', ord(u'ù'):'u', ord(u'é'):'e', ord(u'ọ'):'o',ord(u'ố'):'o',ord(u'ộ'):'o',ord(u'ơ'):'o',ord(u'ớ'):'o', ord(u'ớ'):'o', } r1 = re.compile(r'U\+([0-9A-F]{2})([0-9A-F]{2}\b)') oucodepmap = { ord(u'â'):'a',ord(u'à'):'a',ord(u'ắ'):'a',ord(u'ă'):'a',ord(u'ấ'):'a', ord(u'ü'):'u',ord(u'ụ'):'u',ord(u'ú'):'u',ord(u'ử'):'u',ord(u'ư'):'u', ord(u'ù'):'u', ord(u'é'):'e', ord(u'ọ'):'o',ord(u'ố'):'o',ord(u'ộ'):'o',ord(u'ơ'):'o',ord(u'ớ'):'o', ord(u'ớ'):'o', } r1 = re.compile(r'U\+([0-9A-F]{2})([0-9A-F]{2}\b)') =pmap = { ord(u'â'):'a',ord(u'à'):'a',ord(u'ắ'):'a',ord(u'ă'):'a',ord(u'ấ'):'a', ord(u'ü'):'u',ord(u'ụ'):'u',ord(u'ú'):'u',ord(u'ử'):'u',ord(u'ư'):'u', ord(u'ù'):'u', ord(u'é'):'e', ord(u'ọ'):'o',ord(u'ố'):'o',ord(u'ộ'):'o',ord(u'ơ'):'o',ord(u'ớ'):'o', ord(u'ớ'):'o', } r1 = re.compile(r'U\+([0-9A-F]{2})([0-9A-F]{2}\b)') 0
471,764
def process_readings(self, source, fout): oucode = 0
def process_readings(self, source, fout): oucode = 0
471,765
def process_readings(self, source, fout): oucode = 0
def process_readings(self, source, fout): oucode = 0
471,766
def process_readings(self, source, fout): oucode = 0
def process_readings(self, source, fout): oucode = 0
471,767
def expand (file, entry, type = -1):
def expand (file, entry, type = -1):
471,768
def expand (file, entry):
def expand (file, entry):
471,769
def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', dest='get_categories', action="store_true", default=False, help='Show video categories') parser.add_option('-s', '--split-only', dest='split_only', action="store_true", default=False, help='Split videos without uploading') parser.add_option('-n', '--no-split', dest='no_split', action="store_true", default=False, help='Skip video split') parser.add_option('-u', '--get-upload-form-info', dest='get_upload_form_data', action="store_true", default=False, help="Don't upload, just get the form info") parser.add_option('', '--private', dest='private', action="store_true", default=False, help='Set uploaded video as private') parser.add_option('', '--location', dest='location', type="string", default=None, metavar="COORDINATES", help='Video location (lat, lon). example: "37.0,-122.0"') options, args = parser.parse_args(arguments) if options.get_categories: print " ".join(Youtube.get_categories().keys()) return elif options.split_only: video_path, = args for path in split_youtube_video(video_path): print path return elif len(args) != 7: parser.print_usage() return 1 encoding = get_encoding() email, password0, video_path, title, description, category, skeywords = \ [unicode(s, encoding) for s in args] from ipdb import set_trace; set_trace() debug(title) password = (sys.stdin.readline().strip() if password0 == "-" else password0) videos = ([video_path] if options.no_split else list(split_youtube_video(video_path))) debug("connecting to Youtube API") yt = Youtube(DEVELOPER_KEY, email, password) keywords = filter(bool, [s.strip() for s in re.split('[,;\s]+', skeywords)]) for index, splitted_video_path in enumerate(videos): complete_title = ("%s [%d/%d]" % (title, index+1, len(videos)) if len(videos) > 1 else title) args = [splitted_video_path, complete_title, description, category, keywords] kwargs = dict(private=options.private, location=parse_location(options.location)) if options.get_upload_form_data: data = yt.get_upload_form_data(*args, **kwargs) print "|".join([splitted_video_path, data["token"], data["post_url"]]) else: debug("start upload: %s (%s)" % (splitted_video_path, complete_title)) entry = yt.upload_video(*args, **kwargs) print entry.GetHtmlLink().href.replace("&feature=youtube_gdata", "")
def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', dest='get_categories', action="store_true", default=False, help='Show video categories') parser.add_option('-s', '--split-only', dest='split_only', action="store_true", default=False, help='Split videos without uploading') parser.add_option('-n', '--no-split', dest='no_split', action="store_true", default=False, help='Skip video split') parser.add_option('-u', '--get-upload-form-info', dest='get_upload_form_data', action="store_true", default=False, help="Don't upload, just get the form info") parser.add_option('', '--private', dest='private', action="store_true", default=False, help='Set uploaded video as private') parser.add_option('', '--location', dest='location', type="string", default=None, metavar="COORDINATES", help='Video location (lat, lon). example: "37.0,-122.0"') options, args = parser.parse_args(arguments) if options.get_categories: print " ".join(Youtube.get_categories().keys()) return elif options.split_only: video_path, = args for path in split_youtube_video(video_path): print path return elif len(args) != 7: parser.print_usage() return 1 encoding = get_encoding() email, password0, video_path, title, description, category, skeywords = \ [unicode(s, encoding) for s in args] password = (sys.stdin.readline().strip() if password0 == "-" else password0) videos = ([video_path] if options.no_split else list(split_youtube_video(video_path))) debug("connecting to Youtube API") yt = Youtube(DEVELOPER_KEY, email, password) keywords = filter(bool, [s.strip() for s in re.split('[,;\s]+', skeywords)]) for index, splitted_video_path in enumerate(videos): complete_title = ("%s [%d/%d]" % (title, index+1, len(videos)) if len(videos) > 1 else title) args = [splitted_video_path, complete_title, description, category, keywords] kwargs = dict(private=options.private, location=parse_location(options.location)) if options.get_upload_form_data: data = yt.get_upload_form_data(*args, **kwargs) print "|".join([splitted_video_path, data["token"], data["post_url"]]) else: debug("start upload: %s (%s)" % (splitted_video_path, complete_title)) entry = yt.upload_video(*args, **kwargs) print entry.GetHtmlLink().href.replace("&feature=youtube_gdata", "")
471,770
def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', dest='get_categories', action="store_true", default=False, help='Show video categories') parser.add_option('-s', '--split-only', dest='split_only', action="store_true", default=False, help='Split videos without uploading') parser.add_option('-n', '--no-split', dest='no_split', action="store_true", default=False, help='Skip video split') parser.add_option('-u', '--get-upload-form-info', dest='get_upload_form_data', action="store_true", default=False, help="Don't upload, just get the form info") options, args = parser.parse_args(arguments) if options.get_categories: print " ".join(Youtube.get_categories().keys()) return elif options.split_only: video_path, = args for path in split_youtube_video(video_path): print path return elif len(args) != 7: parser.print_usage() return 1 email, password0, video_path, title, description, category, skeywords = args password = (sys.stdin.read().strip() if password0 == "-" else password0) videos = ([video_path] if options.no_split else list(split_youtube_video(video_path))) debug("connecting to Youtube API") yt = Youtube(DEVELOPER_KEY, email, password) keywords = filter(bool, map(str.strip, re.split('[,;\s]+', skeywords))) for index, splitted_video_path in enumerate(videos): if len(videos) > 1: complete_title = "%s [%d/%d]" % (title, index+1, len(videos)) else: complete_title = title args = [splitted_video_path, complete_title, description, category, keywords] if options.get_upload_form_data: data = yt.get_upload_form_data(*args) print "|".join([splitted_video_path, data["token"], data["post_url"]]) else: debug("start upload: %s (%s)" % (splitted_video_path, complete_title)) entry = yt.upload_video(*args) print entry.GetHtmlLink().href.replace("&feature=youtube_gdata", "")
def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', dest='get_categories', action="store_true", default=False, help='Show video categories') parser.add_option('-s', '--split-only', dest='split_only', action="store_true", default=False, help='Split videos without uploading') parser.add_option('-n', '--no-split', dest='no_split', action="store_true", default=False, help='Skip video split') parser.add_option('-u', '--get-upload-form-info', dest='get_upload_form_data', action="store_true", default=False, help="Don't upload, just get the form info") options, args = parser.parse_args(arguments) if options.get_categories: print " ".join(Youtube.get_categories().keys()) return elif options.split_only: video_path, = args for path in split_youtube_video(video_path): print path return elif len(args) != 7: parser.print_usage() return 1 email, password0, video_path, title, description, category, skeywords = args password = (sys.stdin.readline().strip() if password0 == "-" else password0) videos = ([video_path] if options.no_split else list(split_youtube_video(video_path))) debug("connecting to Youtube API") yt = Youtube(DEVELOPER_KEY, email, password) keywords = filter(bool, map(str.strip, re.split('[,;\s]+', skeywords))) for index, splitted_video_path in enumerate(videos): if len(videos) > 1: complete_title = "%s [%d/%d]" % (title, index+1, len(videos)) else: complete_title = title args = [splitted_video_path, complete_title, description, category, keywords] if options.get_upload_form_data: data = yt.get_upload_form_data(*args) print "|".join([splitted_video_path, data["token"], data["post_url"]]) else: debug("start upload: %s (%s)" % (splitted_video_path, complete_title)) entry = yt.upload_video(*args) print entry.GetHtmlLink().href.replace("&feature=youtube_gdata", "")
471,771
def debug(obj): """Write obj to standard error.""" sys.stderr.write("--- " + str(obj) + "\n")
def debug(obj): """Write obj to standard error.""" string = str(obj.encode(get_encoding()) if isinstance(obj, unicode) else obj) sys.stderr.write("--- " + string + "\n") def get_encoding(): return sys.stdout.encoding or locale.getpreferredencoding()
471,772
def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', dest='get_categories', action="store_true", default=False, help='Show video categories') parser.add_option('-s', '--split-only', dest='split_only', action="store_true", default=False, help='Split videos without uploading') parser.add_option('-n', '--no-split', dest='no_split', action="store_true", default=False, help='Skip video split') parser.add_option('-u', '--get-upload-form-info', dest='get_upload_form_data', action="store_true", default=False, help="Don't upload, just get the form info") parser.add_option('', '--private', dest='private', action="store_true", default=False, help='Set uploaded video as private') parser.add_option('', '--location', dest='location', type="string", default=None, metavar="COORDINATES", help='Video location (lat, lon). example: "37.0,-122.0"') options, args = parser.parse_args(arguments) if options.get_categories: print " ".join(Youtube.get_categories().keys()) return elif options.split_only: video_path, = args for path in split_youtube_video(video_path): print path return elif len(args) != 7: parser.print_usage() return 1 encoding = sys.stdout.encoding or locale.getpreferredencoding() email, password0, video_path, title, description, category, skeywords = \ [unicode(s, encoding) for s in args] password = (sys.stdin.readline().strip() if password0 == "-" else password0) videos = ([video_path] if options.no_split else list(split_youtube_video(video_path))) debug("connecting to Youtube API") yt = Youtube(DEVELOPER_KEY, email, password) keywords = filter(bool, [s.strip() for s in re.split('[,;\s]+', skeywords)]) for index, splitted_video_path in enumerate(videos): complete_title = ("%s [%d/%d]" % (title, index+1, len(videos)) if len(videos) > 1 else title) args = [splitted_video_path, complete_title, description, category, keywords] kwargs = dict(private=options.private, location=parse_location(options.location)) debug("kwargs = %s" % kwargs) if options.get_upload_form_data: data = yt.get_upload_form_data(*args, **kwargs) print "|".join([splitted_video_path, data["token"], data["post_url"]]) else: debug("start upload: %s (%s)" % (splitted_video_path, complete_title)) entry = yt.upload_video(*args, **kwargs) print entry.GetHtmlLink().href.replace("&feature=youtube_gdata", "")
def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', dest='get_categories', action="store_true", default=False, help='Show video categories') parser.add_option('-s', '--split-only', dest='split_only', action="store_true", default=False, help='Split videos without uploading') parser.add_option('-n', '--no-split', dest='no_split', action="store_true", default=False, help='Skip video split') parser.add_option('-u', '--get-upload-form-info', dest='get_upload_form_data', action="store_true", default=False, help="Don't upload, just get the form info") parser.add_option('', '--private', dest='private', action="store_true", default=False, help='Set uploaded video as private') parser.add_option('', '--location', dest='location', type="string", default=None, metavar="COORDINATES", help='Video location (lat, lon). example: "37.0,-122.0"') options, args = parser.parse_args(arguments) if options.get_categories: print " ".join(Youtube.get_categories().keys()) return elif options.split_only: video_path, = args for path in split_youtube_video(video_path): print path return elif len(args) != 7: parser.print_usage() return 1 encoding = get_encoding() email, password0, video_path, title, description, category, skeywords = \ [unicode(s, encoding) for s in args] password = (sys.stdin.readline().strip() if password0 == "-" else password0) videos = ([video_path] if options.no_split else list(split_youtube_video(video_path))) debug("connecting to Youtube API") yt = Youtube(DEVELOPER_KEY, email, password) keywords = filter(bool, [s.strip() for s in re.split('[,;\s]+', skeywords)]) for index, splitted_video_path in enumerate(videos): complete_title = ("%s [%d/%d]" % (title, index+1, len(videos)) if len(videos) > 1 else title) args = [splitted_video_path, complete_title, description, category, keywords] kwargs = dict(private=options.private, location=parse_location(options.location)) debug("kwargs = %s" % kwargs) if options.get_upload_form_data: data = yt.get_upload_form_data(*args, **kwargs) print "|".join([splitted_video_path, data["token"], data["post_url"]]) else: debug("start upload: %s (%s)" % (splitted_video_path, complete_title)) entry = yt.upload_video(*args, **kwargs) print entry.GetHtmlLink().href.replace("&feature=youtube_gdata", "")
471,773
def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', dest='get_categories', action="store_true", default=False, help='Show video categories') parser.add_option('-s', '--split-only', dest='split_only', action="store_true", default=False, help='Split videos without uploading') parser.add_option('-n', '--no-split', dest='no_split', action="store_true", default=False, help='Skip video split') parser.add_option('-u', '--get-upload-form-info', dest='get_upload_form_data', action="store_true", default=False, help="Don't upload, just get the form info") parser.add_option('', '--private', dest='private', action="store_true", default=False, help='Set uploaded video as private') parser.add_option('', '--location', dest='location', type="string", default=None, metavar="COORDINATES", help='Video location (lat, lon). example: "37.0,-122.0"') options, args = parser.parse_args(arguments) if options.get_categories: print " ".join(Youtube.get_categories().keys()) return elif options.split_only: video_path, = args for path in split_youtube_video(video_path): print path return elif len(args) != 7: parser.print_usage() return 1 encoding = sys.stdout.encoding or locale.getpreferredencoding() email, password0, video_path, title, description, category, skeywords = \ [unicode(s, encoding) for s in args] password = (sys.stdin.readline().strip() if password0 == "-" else password0) videos = ([video_path] if options.no_split else list(split_youtube_video(video_path))) debug("connecting to Youtube API") yt = Youtube(DEVELOPER_KEY, email, password) keywords = filter(bool, [s.strip() for s in re.split('[,;\s]+', skeywords)]) for index, splitted_video_path in enumerate(videos): complete_title = ("%s [%d/%d]" % (title, index+1, len(videos)) if len(videos) > 1 else title) args = [splitted_video_path, complete_title, description, category, keywords] kwargs = dict(private=options.private, location=parse_location(options.location)) debug("kwargs = %s" % kwargs) if options.get_upload_form_data: data = yt.get_upload_form_data(*args, **kwargs) print "|".join([splitted_video_path, data["token"], data["post_url"]]) else: debug("start upload: %s (%s)" % (splitted_video_path, complete_title)) entry = yt.upload_video(*args, **kwargs) print entry.GetHtmlLink().href.replace("&feature=youtube_gdata", "")
def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', dest='get_categories', action="store_true", default=False, help='Show video categories') parser.add_option('-s', '--split-only', dest='split_only', action="store_true", default=False, help='Split videos without uploading') parser.add_option('-n', '--no-split', dest='no_split', action="store_true", default=False, help='Skip video split') parser.add_option('-u', '--get-upload-form-info', dest='get_upload_form_data', action="store_true", default=False, help="Don't upload, just get the form info") parser.add_option('', '--private', dest='private', action="store_true", default=False, help='Set uploaded video as private') parser.add_option('', '--location', dest='location', type="string", default=None, metavar="COORDINATES", help='Video location (lat, lon). example: "37.0,-122.0"') options, args = parser.parse_args(arguments) if options.get_categories: print " ".join(Youtube.get_categories().keys()) return elif options.split_only: video_path, = args for path in split_youtube_video(video_path): print path return elif len(args) != 7: parser.print_usage() return 1 encoding = sys.stdout.encoding or locale.getpreferredencoding() email, password0, video_path, title, description, category, skeywords = \ [unicode(s, encoding) for s in args] password = (sys.stdin.readline().strip() if password0 == "-" else password0) videos = ([video_path] if options.no_split else list(split_youtube_video(video_path))) debug("connecting to Youtube API") yt = Youtube(DEVELOPER_KEY, email, password) keywords = filter(bool, [s.strip() for s in re.split('[,;\s]+', skeywords)]) for index, splitted_video_path in enumerate(videos): complete_title = ("%s [%d/%d]" % (title, index+1, len(videos)) if len(videos) > 1 else title) args = [splitted_video_path, complete_title, description, category, keywords] kwargs = dict(private=options.private, location=parse_location(options.location)) if options.get_upload_form_data: data = yt.get_upload_form_data(*args, **kwargs) print "|".join([splitted_video_path, data["token"], data["post_url"]]) else: debug("start upload: %s (%s)" % (splitted_video_path, complete_title)) entry = yt.upload_video(*args, **kwargs) print entry.GetHtmlLink().href.replace("&feature=youtube_gdata", "")
471,774
def RepositoryName(self): """FullName after removing the local path to the repository.
def RepositoryName(self): """FullName after removing the local path to the repository.
471,775
def RepositoryName(self): """FullName after removing the local path to the repository.
def RepositoryName(self): """FullName after removing the local path to the repository.
471,776
def RepositoryName(self): """FullName after removing the local path to the repository.
def RepositoryName(self): """FullName after removing the local path to the repository.
471,777
def RepositoryName(self): """FullName after removing the local path to the repository.
def RepositoryName(self): """FullName after removing the local path to the repository.
471,778
def id (about, host): # this might turn into a cache that gets dumped to file and # supports more than two fixed hosts in time. cache = IDS_MAIN if host == FLUIDDB_PATH else IDS_SAND return cache[about]
def id(about, host): # this might turn into a cache that gets dumped to file and # supports more than two fixed hosts in time. cache = IDS_MAIN if host == FLUIDDB_PATH else IDS_SAND return cache[about]
471,779
def _get_http(timeout): try: http = Http (timeout=timeout) except TypeError: # The user's version of http2lib is old. Omit the timeout. http = Http () return http
def _get_http(timeout): try: http = Http(timeout=timeout) except TypeError: # The user's version of http2lib is old. Omit the timeout. http = Http () return http
471,780
def _get_http(timeout): try: http = Http (timeout=timeout) except TypeError: # The user's version of http2lib is old. Omit the timeout. http = Http () return http
def _get_http(timeout): try: http = Http (timeout=timeout) except TypeError: # The user's version of http2lib is old. Omit the timeout. http = Http() return http
471,781
def _get_url(host, path, hash, kw): url = host + urllib.quote (path) if hash: url = '%s?%s' % (url, urllib.urlencode (hash)) elif kw: url = '%s?%s' % (url, urllib.urlencode (kw)) return url
def _get_url(host, path, hash, kw): url = host + urllib.quote(path) if hash: url = '%s?%s' % (url, urllib.urlencode (hash)) elif kw: url = '%s?%s' % (url, urllib.urlencode (kw)) return url
471,782
def _get_url(host, path, hash, kw): url = host + urllib.quote (path) if hash: url = '%s?%s' % (url, urllib.urlencode (hash)) elif kw: url = '%s?%s' % (url, urllib.urlencode (kw)) return url
def _get_url(host, path, hash, kw): url = host + urllib.quote (path) if hash: url = '%s?%s' % (url, urllib.urlencode(hash)) elif kw: url = '%s?%s' % (url, urllib.urlencode (kw)) return url
471,783
def _get_url(host, path, hash, kw): url = host + urllib.quote (path) if hash: url = '%s?%s' % (url, urllib.urlencode (hash)) elif kw: url = '%s?%s' % (url, urllib.urlencode (kw)) return url
def _get_url(host, path, hash, kw): url = host + urllib.quote (path) if hash: url = '%s?%s' % (url, urllib.urlencode (hash)) elif kw: url = '%s?%s' % (url, urllib.urlencode(kw)) return url
471,784
def __init__ (self, hash): for k in hash: self.__dict__[k] = hash[k]
def __init__(self, hash): for k in hash: self.__dict__[k] = hash[k]
471,785
def __str__ (self): keys = self.__dict__.keys () keys.sort () return '\n'.join (['%20s: %s' % (key, str (self.__dict__[key])) for key in keys])
def __str__(self): keys = self.__dict__.keys() keys.sort() return '\n'.join(['%20s: %s' % (key, str(self.__dict__[key])) for key in keys])
471,786
def __init__ (self, name, value=None): self.name = name self.value = value
def __init__(self, name, value=None): self.name = name self.value = value
471,787
def __str__ (self): return ('Tag "%s", value "%s" of type %s' % (self.name, str (self.value), str (type (self.value))))
def __str__(self): return ('Tag "%s", value "%s" of type %s' % (self.name, str (self.value), str (type (self.value))))
471,788
def __str__ (self): return ('Tag "%s", value "%s" of type %s' % (self.name, str (self.value), str (type (self.value))))
def __str__ (self): return ('Tag "%s", value "%s" of type %s' % (self.name, str (self.value), str (type (self.value))))
471,789
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.password = lines[1].strip () f.close () except: raise ProblemReadingCredentialsFileError, ('Failed to read' ' credentials from %s.' % str (filename)) else: raise CredentialsFileNotFoundError, ('Couldn\'t find or ' 'read credentials from %s.' % str (filename))
def __init__(self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.password = lines[1].strip () f.close () except: raise ProblemReadingCredentialsFileError, ('Failed to read' ' credentials from %s.' % str (filename)) else: raise CredentialsFileNotFoundError, ('Couldn\'t find or ' 'read credentials from %s.' % str (filename))
471,790
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.password = lines[1].strip () f.close () except: raise ProblemReadingCredentialsFileError, ('Failed to read' ' credentials from %s.' % str (filename)) else: raise CredentialsFileNotFoundError, ('Couldn\'t find or ' 'read credentials from %s.' % str (filename))
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file() if os.path.exists(filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.password = lines[1].strip () f.close () except: raise ProblemReadingCredentialsFileError, ('Failed to read' ' credentials from %s.' % str (filename)) else: raise CredentialsFileNotFoundError, ('Couldn\'t find or ' 'read credentials from %s.' % str (filename))
471,791
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.password = lines[1].strip () f.close () except: raise ProblemReadingCredentialsFileError, ('Failed to read' ' credentials from %s.' % str (filename)) else: raise CredentialsFileNotFoundError, ('Couldn\'t find or ' 'read credentials from %s.' % str (filename))
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open(filename) lines = f.readlines() self.username = lines[0].strip() self.password = lines[1].strip() f.close() except: raise ProblemReadingCredentialsFileError, ('Failed to read' ' credentials from %s.' % str (filename)) else: raise CredentialsFileNotFoundError, ('Couldn\'t find or ' 'read credentials from %s.' % str (filename))
471,792
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.password = lines[1].strip () f.close () except: raise ProblemReadingCredentialsFileError, ('Failed to read' ' credentials from %s.' % str (filename)) else: raise CredentialsFileNotFoundError, ('Couldn\'t find or ' 'read credentials from %s.' % str (filename))
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.password = lines[1].strip () f.close () except: raise ProblemReadingCredentialsFileError, ('Failed to read' ' credentials from %s.' % str(filename)) else: raise CredentialsFileNotFoundError, ('Couldn\'t find or ' 'read credentials from %s.' % str (filename))
471,793
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.password = lines[1].strip () f.close () except: raise ProblemReadingCredentialsFileError, ('Failed to read' ' credentials from %s.' % str (filename)) else: raise CredentialsFileNotFoundError, ('Couldn\'t find or ' 'read credentials from %s.' % str (filename))
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.password = lines[1].strip () f.close () except: raise ProblemReadingCredentialsFileError, ('Failed to read' ' credentials from %s.' % str (filename)) else: raise CredentialsFileNotFoundError, ('Couldn\'t find or ' 'read credentials from %s.' % str (filename))
471,794
def __init__ (self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials () self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith ('http'): self.host = 'http://%s' % host # the following based on fluiddb.py userpass = '%s:%s' % (credentials.username, credentials.password) auth = 'Basic %s' % userpass.encode ('base64').strip() self.headers = { 'Authorization' : auth }
def __init__(self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials () self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith ('http'): self.host = 'http://%s' % host # the following based on fluiddb.py userpass = '%s:%s' % (credentials.username, credentials.password) auth = 'Basic %s' % userpass.encode ('base64').strip() self.headers = { 'Authorization' : auth }
471,795
def __init__ (self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials () self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith ('http'): self.host = 'http://%s' % host # the following based on fluiddb.py userpass = '%s:%s' % (credentials.username, credentials.password) auth = 'Basic %s' % userpass.encode ('base64').strip() self.headers = { 'Authorization' : auth }
def __init__ (self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials() self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith ('http'): self.host = 'http://%s' % host # the following based on fluiddb.py userpass = '%s:%s' % (credentials.username, credentials.password) auth = 'Basic %s' % userpass.encode ('base64').strip() self.headers = { 'Authorization' : auth }
471,796
def __init__ (self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials () self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith ('http'): self.host = 'http://%s' % host # the following based on fluiddb.py userpass = '%s:%s' % (credentials.username, credentials.password) auth = 'Basic %s' % userpass.encode ('base64').strip() self.headers = { 'Authorization' : auth }
def __init__ (self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials () self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith('http'): self.host = 'http://%s' % host # the following based on fluiddb.py userpass = '%s:%s' % (credentials.username, credentials.password) auth = 'Basic %s' % userpass.encode ('base64').strip() self.headers = { 'Authorization' : auth }
471,797
def __init__ (self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials () self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith ('http'): self.host = 'http://%s' % host # the following based on fluiddb.py userpass = '%s:%s' % (credentials.username, credentials.password) auth = 'Basic %s' % userpass.encode ('base64').strip() self.headers = { 'Authorization' : auth }
def __init__ (self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials () self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith ('http'): self.host = 'http://%s' % host # the following based on fluiddb.py userpass = '%s:%s' % (credentials.username, credentials.password) auth = 'Basic %s' % userpass.encode('base64').strip() self.headers = { 'Authorization' : auth }
471,798
def set_connection_from_global (self): """Sets the host on the basis of the global variable flags, if that exists. Used to enable the tests to run against alternate hosts.""" self.host = choose_host () self.debug = choose_debug_mode () self.timeout = choose_http_timeout ()
def set_connection_from_global(self): """Sets the host on the basis of the global variable flags, if that exists. Used to enable the tests to run against alternate hosts.""" self.host = choose_host () self.debug = choose_debug_mode () self.timeout = choose_http_timeout ()
471,799