Exemple #1
0
class OXTS(IsDescription):
    """HFS5 OXTS table model"""
    timestamp    = StringCol(32)
    lat          = Float64Col()
    lon          = Float64Col()
    alt          = Float64Col()
    roll         = Float64Col()
    pitch        = Float64Col()
    yaw          = Float64Col()
    vn           = Float64Col()
    ve           = Float64Col()
    vf           = Float64Col()
    vl           = Float64Col()
    vu           = Float64Col()
    ax           = Float64Col()
    ay           = Float64Col()
    az           = Float64Col()
    af           = Float64Col()
    al           = Float64Col()
    au           = Float64Col()
    wx           = Float64Col()
    wy           = Float64Col()
    wz           = Float64Col()
    wf           = Float64Col()
    wl           = Float64Col()
    wu           = Float64Col()
    pos_accuracy = Float64Col()
    vel_accuracy = Float64Col()
    navstat      = UInt8Col()
    numsats      = UInt8Col()
    posmode      = UInt8Col()
    velmode      = UInt8Col()
    orimode      = UInt8Col()
Exemple #2
0
class Array(IsDescription):
    """Row descriptor class for Pytables array data table.

    Contains parameter information for each selected telescope
    in the data.

    Attributes
    ----------
    tel_id : UInt8Col
        UInt8 placeholder type for the telescope id (in the array)
    tel_x : Float32Col
        Float32 placeholder type for the telescope position x coordinate
        relative to the center of the array.
    tel_y : Float32Col
        Float32 placeholder type for the telescope position y coordinate
        relative to the center of the array.
    tel_z : Float32Col
        Float32 placeholder type for the telescope position z coordinate
        (height) relative to the CORSIKA observatory altitude.
    tel_type : StringCol
        String placeholder type for the telescope type name (i.e. 'LST')
    run_array_direction: Float32Col(2)
        Float32 tuple placeholder type for the array pointing direction for
        a given run (az,alt)
    """

    tel_id = UInt8Col()
    tel_x = Float32Col()
    tel_y = Float32Col()
    tel_z = Float32Col()
    tel_type = StringCol(8)
    run_array_direction = Float32Col(2)
Exemple #3
0
class Record(tables.IsDescription):
    var1 = StringCol(itemsize=4, dflt=b"abcd", pos=0)
    var2 = StringCol(itemsize=1, dflt=b"a", pos=1)
    var3 = BoolCol(dflt=1)
    var4 = Int8Col(dflt=1)
    var5 = UInt8Col(dflt=1)
    var6 = Int16Col(dflt=1)
    var7 = UInt16Col(dflt=1)
    var8 = Int32Col(dflt=1)
    var9 = UInt32Col(dflt=1)
    var10 = Int64Col(dflt=1)
    var11 = Float32Col(dflt=1.0)
    var12 = Float64Col(dflt=1.0)
    var13 = ComplexCol(itemsize=8, dflt=(1. + 0.j))
    var14 = ComplexCol(itemsize=16, dflt=(1. + 0.j))
    if hasattr(tables, 'Float16Col'):
        var15 = tables.Float16Col(dflt=1.0)
    if hasattr(tables, 'Float96Col'):
        var16 = tables.Float96Col(dflt=1.0)
    if hasattr(tables, 'Float128Col'):
        var17 = tables.Float128Col(dflt=1.0)
    if hasattr(tables, 'Complex196Col'):
        var18 = tables.ComplexCol(itemsize=24, dflt=(1. + 0.j))
    if hasattr(tables, 'Complex256Col'):
        var19 = tables.ComplexCol(itemsize=32, dflt=(1. + 0.j))
class EventTableRow(IsDescription):
    """Describe row format for event table.

    Contains event-level information, mostly from Monte Carlo simulation
    parameters. NOTE: Additional columns are added dynamically to some tables,
    see the github wiki page for the full table/data format descriptions.

    Attributes
    ----------
    event_id : tables.UInt32Col
        Shower event id.
    obs_id : tables.UInt32Col
        Shower observation (run) id. Replaces old "run_id" in ctapipe r0
        container.
    shower_primary_id : tables.UInt8Col
        Particle type id for the shower primary particle. From Monte Carlo
        simulation parameters.
    core_x : tables.Float32Col
        Shower core position x coordinate. From Monte Carlo simulation
        parameters.
    core_y : tables.Float32Col
        Shower core position y coordinate. From Monte Carlo simulation
        parameters.
    h_first_int : tables.Float32Col
        Height of shower primary particle first interaction. From Monte Carlo
        simulation parameters.
    mc_energy : tables.Float32Col
        Energy of the shower primary particle in TeV. From Monte Carlo simulation
        parameters.
    log_mc_energy : tables.Float32Col
        Energy of the shower primary particle in log(TeV). From Monte Carlo simulation
        parameters.
    az : tables.Float32Col
        Shower azimuth angle. From Monte Carlo simulation parameters.
    alt : tables.Float32Col
        Shower altitude (zenith) angle. From Monte Carlo simulation parameters.
    array_pointing_az : tables.Float32Col
        Array pointing azimuth angle.
    array_pointing_alt : tables.Float32Col
        Array pointing altitude (zenith) angle.
    delta_direction : tables.Float32Col(2)
        Angular distance of the shower azimuth and the array pointing.

    """

    event_id = UInt32Col()
    obs_id = UInt32Col()
    shower_primary_id = UInt8Col()
    core_x = Float32Col()
    core_y = Float32Col()
    h_first_int = Float32Col()
    x_max = Float32Col()
    mc_energy = Float32Col()
    log_mc_energy = Float32Col()
    az = Float32Col()
    alt = Float32Col()
    array_pointing_az = Float32Col()
    array_pointing_alt = Float32Col()
    delta_direction = Float32Col(2)
Exemple #5
0
class User(IsDescription):
    id = Int32Col()
    name = StringCol(16)
    age = UInt8Col()
    reputation = UInt16Col()
    creation_date = Time32Col()
    views = UInt16Col()
    upvotes = UInt16Col()
    downvotes = UInt16Col()
class Particle(IsDescription):
    name = StringCol(16)   # 16-character String
    idnumber = Int64Col()      # Signed 64-bit integer
    ADCcount = UInt16Col()     # Unsigned short integer
    TDCcount = UInt8Col()      # unsigned byte
    grid_i = Int32Col()      # 32-bit integer
    grid_j = Int32Col()      # 32-bit integer
    pressure = Float32Col()    # float  (single-precision)
    energy = Float64Col()    # double (double-precision)
Exemple #7
0
    class Info(tables.IsDescription):  # 1
        _v_pos = 1
        name = StringCol(itemsize=2)
        value = ComplexCol(itemsize=16, pos=0)  # 0
        y2 = FloatCol(pos=1)  # 1
        z2 = UInt8Col()

        class Info2(tables.IsDescription):
            y3 = Time64Col(shape=2)
            name = StringCol(itemsize=2)
            value = ComplexCol(itemsize=16, shape=2)
Exemple #8
0
class Post(IsDescription):
    id = Int32Col()
    post_type_id = UInt8Col()
    parent_id = Int32Col()
    accepted_answer_id = Int32Col()
    creation_date = Time32Col()
    score = UInt32Col()
    viewcount = UInt32Col()
    owner_user_id = Int32Col()
    answer_count = UInt16Col()
    favorite_count = UInt16Col()
    tags = StringCol(itemsize=25, shape=(5, ))
Exemple #9
0
    def setup_spec_table(self):
        if not hasattr(self.node, "spec_table"):
            description = {}
            description["pm_index"] = UInt32Col(pos=0)
            description["rt"] = Float32Col(pos=1)
            description["ms_level"] = UInt8Col(pos=2)
            description["start"] = UInt64Col(pos=3)
            description["size"] = UInt32Col(pos=4)
            spec_table = self.file_.create_table(self.node,
                                                 'spec_table',
                                                 description,
                                                 filters=filters)

            # every colums which appears in a where method call should/must be indexed !
            # this is not only for performance but for correct lookup as well (I had strange bugs
            # else)
            spec_table.cols.pm_index.create_index()
            spec_table.cols.rt.create_index()
Exemple #10
0
class Event(IsDescription):
    """Row descriptor class for Pytables event table.
    
    Contains event-level parameters, mostly from Monte Carlo simulation
    parameters.
    
    Attributes
    ----------
    event_number : UInt32Col
        UInt32 placeholder type for the shower event id
    run_number : UInt32Col
        UInt32 placeholder type for the run number
    particle_id : UInt8Col
        UInt8 placeholder type for the CORSIKA-simulated primary particle type
        code.
    core_x : Float64Col
        Float64 placeholder type for the Monte Carlo shower core
        position x coordinate.
    core_y : Float64Col
        Float64 placeholder type for the Monte Carlo shower core
        position y coordinate.
    h_first_int : Float64Col
        Float64 placeholder type for the Monte Carlo height of first
        interaction of the primary particle.
    mc_energy : Float64Col
        Float64 placeholder type for the Monte Carlo energy of the
        primary particle.
    az : Float32Col
        Float32 placeholder type for the shower azimuth angle.
    alt : Float32Col
        Float32 placeholder type for the shower altitude (zenith) angle
    """
    event_number = UInt32Col()
    run_number = UInt32Col()
    particle_id = UInt8Col()
    core_x = Float32Col()
    core_y = Float32Col()
    h_first_int = Float32Col()
    mc_energy = Float32Col()
    az = Float32Col()
    alt = Float32Col()
Exemple #11
0
class TestTDescr(tables.IsDescription):
    """A description that has several nested columns."""

    x = Int32Col(dflt=0, shape=2, pos=0)  # 0
    y = FloatCol(dflt=1, shape=(2, 2))
    z = UInt8Col(dflt=1)
    z3 = EnumCol({'r': 4, 'g': 2, 'b': 1}, 'r', 'int32', shape=2)
    color = StringCol(itemsize=4, dflt=b"ab", pos=2)
    info = Info()

    class Info(tables.IsDescription):  # 1
        _v_pos = 1
        name = StringCol(itemsize=2)
        value = ComplexCol(itemsize=16, pos=0)  # 0
        y2 = FloatCol(pos=1)  # 1
        z2 = UInt8Col()

        class Info2(tables.IsDescription):
            y3 = Time64Col(shape=2)
            name = StringCol(itemsize=2)
            value = ComplexCol(itemsize=16, shape=2)
Exemple #12
0
 class Test(IsDescription):
     posted_dow = UInt8Col(pos=0)
     jobtype = UInt8Col(pos=1)
     location = UInt8Col(pos=2)
     date = StringCol(20, pos=3)
     country = StringCol(2, pos=4)
Exemple #13
0
 class _Nodes(IsDescription):
     seqid = UInt8Col()
     start = UInt32Col()
     stop = UInt32Col()
Exemple #14
0
class Event(IsDescription):
    id = Int32Col()
    timestamp = Time32Col()
    event_type = UInt8Col()
    event_id = Int32Col()
Exemple #15
0
class Vote(IsDescription):
    id = Int32Col()
    post_id = Int32Col()
    vote_type_id = UInt8Col()
    creation_date = Time32Col()
Exemple #16
0
class TimestampedZeoDesc(IsDescription):
    timestamp = UInt32Col()
    timestamp_subsec = Float32Col()
    version = UInt8Col()