def CreateDescription(self, part): desc = tableio.I3TableRowDescription() desc.add_field('x', tableio.types.Float64, 'm', 'x-position of particle') desc.add_field('y', tableio.types.Float64, 'm', 'y-position of particle') desc.add_field('z', tableio.types.Float64, 'm', 'z-position of particle') desc.add_field('time', tableio.types.Float64, 'ns', 'origin time of particle') desc.add_field('zenith', tableio.types.Float64, 'radian', 'zenith angle of particle origin') desc.add_field('azimuth', tableio.types.Float64, 'radian', 'azimuthal angle of particle origin') desc.add_field('energy', tableio.types.Float64, 'GeV', 'energy of particle') desc.add_field('speed', tableio.types.Float64, 'Gm/s', 'particle speed') desc.add_field('length', tableio.types.Float64, 'm', 'length of track') # skip: major_id/minor_id desc.add_field('type', tableio.I3Datatype(self.booked.ParticleType), '', '') desc.add_field('shape', tableio.I3Datatype(self.booked.ParticleShape), '', '') desc.add_field('location', tableio.I3Datatype(self.booked.LocationType), '', '') desc.add_field('fit_status', tableio.I3Datatype(self.booked.FitStatus), '', '') return desc
def CreateDescription(self, meparams): desc = tableio.I3TableRowDescription() desc.add_field("N", tableio.types.Float64, "", "Normalization of Exp. or TomF function") desc.add_field("N_err", tableio.types.Float64, "", "Uncertainty of normalization N") desc.add_field("b", tableio.types.Float64, "", "Slope of Exp. or TomF function") desc.add_field("b_err", tableio.types.Float64, "", "Uncertainty of slope b") desc.add_field("gamma", tableio.types.Float64, "", "Exponent of TomF function") desc.add_field("gamma_err", tableio.types.Float64, "", "Uncertainty of exponent gamma") desc.add_field("nDOMs", tableio.types.Float64, "", "Number of DOMs used for energy loss reconstr.") desc.add_field("rllh", tableio.types.Float64, "", "Rllh of the fit") desc.add_field("chi2", tableio.types.Float64, "", "Chi square of the fit") desc.add_field("chi2ndof", tableio.types.Float64, "", "Chi square per deg of freedom") desc.add_field("peak_energy", tableio.types.Float64, "GeV", "Peak energy of the eloss dist.") desc.add_field("peak_sigma", tableio.types.Float64, "GeV", "Uncertainty of the peak_energy") desc.add_field("mean", tableio.types.Float64, "GeV", "Mean energy loss") desc.add_field("median", tableio.types.Float64, "GeV", "Median energy loss") desc.add_field("bin_width", tableio.types.Float64, "", "Bin width of the eloss dist.") return desc
def CreateDescription(self, part): desc = tableio.I3TableRowDescription() desc.add_field("LocalMST", tableio.types.Float64, "s", "Local siderial time (GMST)") desc.add_field("LocalAntiS", tableio.types.Float64, "s", "Local anti-siderial time (GMAST)") desc.add_field("LocalExtS", tableio.types.Float64, "s", "Local extend-siderial time (GMEST)") desc.add_field("ModJulDay", tableio.types.Float64, "d", "Modified Julian Day") desc.add_field("LLHAzimuthDeg", tableio.types.Float32, "deg", "Log-likelyhood azimuth angle") desc.add_field("LLHZenithDeg", tableio.types.Float32, "deg", "Log-likelyhood zenith angle") desc.add_field("LFAzimuthDeg", tableio.types.Float32, "deg", "LineFit azimuth angle") desc.add_field("LFZenithDeg", tableio.types.Float32, "deg", "LineFit zenith angle") desc.add_field("LinLLHOpeningAngleDeg", tableio.types.Float32, "deg", "Opening angle between LLHReco and LineFit") desc.add_field("RADeg", tableio.types.Float32, "deg", "Right Ascension") desc.add_field("DecDeg", tableio.types.Float32, "deg", "Declination") desc.add_field("RAAntiS", tableio.types.Float32, "deg", "Antisiderial RA") desc.add_field("DecAntiS", tableio.types.Float32, "deg", "Antisiderial Dec") desc.add_field("RAExtS", tableio.types.Float32, "deg", "Extended-siderial RA") desc.add_field("RASolar", tableio.types.Float32, "deg", "RA solar time") desc.add_field("DecSolar", tableio.types.Float32, "deg", "Dec solar time") desc.add_field("RASun", tableio.types.Float32, "deg", "RA of Sun") desc.add_field("DecSun", tableio.types.Float32, "deg", "Dec of Sun") desc.add_field("RAMoon", tableio.types.Float32, "deg", "RA of Moon") desc.add_field("DecMoon", tableio.types.Float32, "deg", "Dec of Moon") desc.add_field("LogMuE", tableio.types.Float32, "log(E/GeV)", "Log of MuE energy reco") desc.add_field("RLogL", tableio.types.Float32, "", "RLogL quality of reconstruction") desc.add_field("CoG_X", tableio.types.Float32, "m", "CoG_X of LLHReco") desc.add_field("CoG_Y", tableio.types.Float32, "m", "CoG_Y of LLHReco") desc.add_field("CoG_Z", tableio.types.Float32, "m", "CoG_Z of LLHReco") desc.add_field("LDir", tableio.types.UInt32, "", "LDir-C") desc.add_field("RunId", tableio.types.UInt32, "", "Run ID") desc.add_field("NDirHits", tableio.types.UInt32, "", "Number of direct hits") desc.add_field("NChannels", tableio.types.UInt16, "", "Number of hit channels") desc.add_field("NStrings", tableio.types.UInt16, "", "Number of strings") desc.add_field("SubRunId", tableio.types.UInt16, "", "SubRunId") desc.add_field("IsGoodLineFit", tableio.types.Bool, "", "Is Good LineFit") desc.add_field("IsGoodLLH", tableio.types.Bool, "", "Is Good LLH fit") return desc
def CreateDescription(self, lfparams): desc = tableio.I3TableRowDescription() desc.add_field("primary_zenith", tableio.types.Float64, "", "") desc.add_field("primary_azimuth", tableio.types.Float64, "", "") desc.add_field("primary_energy", tableio.types.Float64, "", "") desc.add_field('primary_type', tableio.I3Datatype(I3Particle.ParticleType), '', '') desc.add_field("bias_factor", tableio.types.Float64, "", "") desc.add_field("bias_target", tableio.types.Float64, "", "") desc.add_field("weight", tableio.types.Float64, "", "") desc.add_field("max_x", tableio.types.Float64, "", "") return desc
def CreateDescription(self,dlsm): desc = tableio.I3TableRowDescription() # make this a "ragged" table desc.is_multi_row = True # grab an example DOMLaunch wf = self._get_nonempty(dlsm) # unrolling fields desc.add_field('string',tableio.types.Int16,'','String number') desc.add_field('om',tableio.types.UInt16,'','OM number') desc.add_field('index',tableio.types.UInt16,'','Index within the vector') # DOMLaunch fields desc.add_field('start_time',tableio.types.Float32,'ns','') desc.add_field('bin_width',tableio.types.Float32,'ns','') desc.add_field('source',tableio.I3Datatype(self.wf.Source),'','') desc.add_field('waveform',tableio.types.Float32,'','',len(wf.waveform)) return desc
def setUp(self): desc = tableio.I3TableRowDescription() self.types = { 'signed_char': tableio.types.Int8, 'unsigned_char': tableio.types.UInt8, 'signed_short': tableio.types.Int16, 'unsigned_short':tableio.types.UInt16, 'signed_int': tableio.types.Int32, 'unsigned_int': tableio.types.UInt32, 'signed_long': tableio.types.Int64, 'unsigned_long': tableio.types.UInt64, 'float': tableio.types.Float32, 'double': tableio.types.Float64, 'bool': tableio.types.Bool} # HACK: dial back longs on 32 bit systems for testing purposes if sys.maxsize == 2**31-1: self.types['signed_long'] = tableio.types.Int32 self.types['unsigned_long'] = tableio.types.UInt32 self.codes = { 'signed_char': 'b', 'unsigned_char': 'B', 'signed_short': 'h', 'unsigned_short':'H', 'signed_int': 'i', 'unsigned_int': 'I', 'signed_long': 'l', 'unsigned_long': 'L', 'float': 'f', 'double': 'd', 'bool': 'o'} self.conversions = {int: ['c','b','B','h','H','i'], int: ['I','h','H'], float: ['f','d'], bool: ['o']} for t,code in self.types.items(): desc.add_field(t,code,'','') desc.add_field('%s_vec'%t,code,'','',128) desc.add_field('trigger_type',tableio.I3Datatype(dataclasses.I3DOMLaunch.TriggerType),'','') self.desc = desc self.rows = tableio.I3TableRow(desc,1)
def CreateDescription(self, pamparams): desc = tableio.I3TableRowDescription() desc.add_field( 'Log10_S125', tableio.types.Float64, '', 'Logarithmic signal strength at 125m from shower core.') desc.add_field('Beta', tableio.types.Float64, '', 'Beta.') desc.add_field('RhoMu', tableio.types.Float64, '', 'Muon LDF signal strength at r_mu_ref.') desc.add_field('Chi2_ldf', tableio.types.Float64, '', 'Chi2 from LDF fit.') desc.add_field('ndof_ldf', tableio.types.Float64, '', 'Number of degrees of freedom from LDF fit.') desc.add_field('r_ref', tableio.types.Float64, '', 'Distance reference.') desc.add_field('Moliere', tableio.types.Float64, '', 'Moliere radius.') desc.add_field('r_mu_ref', tableio.types.Float64, '', 'Distance reference for muon LDF only.') desc.add_field('llh_ldf', tableio.types.Float64, '', 'Likelihood LDF.') desc.add_field('LDFtype', tableio.types.Float64, '', 'Flag for DLP/NKG.') desc.add_field('gamma', tableio.types.Float64, '', 'Zenith dependent parameter for muon LDF.') desc.add_field('omega', tableio.types.Float64, '', 'Zenith dependent parameter for muon LDF.') desc.add_field('Amp', tableio.types.Float64, '', 'Curvature amplitude.') desc.add_field('Chi2_time', tableio.types.Float64, '', 'Chi2 from LDF time fit.') desc.add_field('ndof_time', tableio.types.Float64, '', 'Number of degrees of freedom for time fit.') desc.add_field('llh_time', tableio.types.Float64, '', 'Likelihood from time fit.') desc.add_field('NX', tableio.types.Float64, '', 'Normalized X direction.') desc.add_field('NY', tableio.types.Float64, '', 'Normalized Y direction.') desc.add_field('Kappa', tableio.types.Float64, '', 'DLP parameter.') desc.add_field('Dcurve', tableio.types.Float64, '', 'Width of exponential nose of shower front..') desc.add_field('Ncurve', tableio.types.Float64, '', 'Normalization in exponential nose of shower front.') desc.add_field('ndof', tableio.types.Float64, '', 'Number of degrees of freedom.') return desc
def CreateDescription(self, meparams): desc = tableio.I3TableRowDescription() desc.add_field( "nDOMsCascade", tableio.types.Float64, "", "Number of DOMs available for the leading cascade energy reconstruction." ) desc.add_field("cascade_energy", tableio.types.Float64, "", "Reconstructed leading cascade energy.") desc.add_field( "cascade_energy_sigma", tableio.types.Float64, "", "Statistical error on the reconstructed leading cascade energy.") desc.add_field("cascade_position_x", tableio.types.Float64, "", "X coordinate of the position of the leading cascade.") desc.add_field("cascade_position_y", tableio.types.Float64, "", "Y coordinate of the position of the leading cascade.") desc.add_field("cascade_position_z", tableio.types.Float64, "", "Z coordinate of the position of the leading cascade.") desc.add_field("cascade_slant_depth", tableio.types.Float64, "", "Slant depth of the leading cascade.") return desc
def CreateDescription(self,dlsm): desc = tableio.I3TableRowDescription() # make this a "ragged" table desc.is_multi_row = True # grab an example DOMLaunch dl = self._get_nonempty(dlsm) # unrolling fields desc.add_field('string',tableio.types.Int16,'','String number') desc.add_field('om',tableio.types.UInt16,'','OM number') desc.add_field('index',tableio.types.UInt16,'','Index within the vector') # DOMLaunch fields desc.add_field('start_time',tableio.types.Float32,'ns','') desc.add_field('pedestal_sub',tableio.types.Bool,'','Has the pedestal been subtracted?') desc.add_field('lc_bit',tableio.types.Bool,'','') desc.add_field('trigger_type',tableio.I3Datatype(self.dl.TriggerType),'','') desc.add_field('trigger_mode',tableio.I3Datatype(self.dl.TriggerMode),'','') desc.add_field('raw_charge_stamp',tableio.types.Int32,'','',len(dl.GetRawChargeStamp())) for i in range(3): desc.add_field('raw_atwd_%d'%i,tableio.types.Int32,'counts','Uncalibrated ATWD digitizer counts',128) desc.add_field('raw_fadc',tableio.types.UInt16,'counts','Uncalibrated fADC digitizer counts',256) return desc
def CreateDescription(self, tc_values): desc = tableio.I3TableRowDescription() desc.add_field("timelength_fwhm", tableio.types.Float64, "ns", I3TimeCharacteristicsValues.timelength_fwhm.__doc__ ) desc.add_field("timelength_last_first", tableio.types.Float64, "ns", I3TimeCharacteristicsValues.timelength_last_first.__doc__ ) desc.add_field("timelength_maxgap", tableio.types.Float64, "m", I3TimeCharacteristicsValues.timelength_maxgap.__doc__ ) desc.add_field("zpattern", tableio.types.Float64, "value", I3TimeCharacteristicsValues.zpattern.__doc__ ) return desc
def CreateDescription(self, fivect): desc = tableio.I3TableRowDescription() desc.IsMultiRow = True desc.add_field("string", tableio.types.Int32, "", "string number of the flashing DOM") desc.add_field("om", tableio.types.UInt32, "", "OM number of the flashing DOM") desc.add_field( "flash_time", tableio.types.Float64, "ns", "Time (in nsec) in 25 nsec units, of the LED flash time.") desc.add_field("mask", tableio.types.UInt32, "bitmask", "indicates which LEDs were flashing") desc.add_field("width", tableio.types.Int32, "", "flasher width") desc.add_field("rate", tableio.types.Int32, "", "flasher rate") desc.add_field("brightness", tableio.types.Int32, "", "brightness level (1..127)") desc.add_field("atwd_bin_size", tableio.types.Float64, "ns", "bin width of the ATWD3") desc.add_field("raw_atwd3", tableio.types.Int64, "counts", "ATWD waveform of the LED current pulse", 128) return desc
def CreateDescription(self, obj): desc = tableio.I3TableRowDescription() desc.add_field("a", tableio.types.Float64, "", "Parameter A") desc.add_field("b", tableio.types.Float64, "", "Parameter B") return desc