How to use the construct.SBInt16 function in construct

To help you get started, we’ve selected a few construct examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PIC-IRIS / PH5 / ph5 / core / segy_h.py View on Github external
construct.SBInt32("recElevation"),
                             # Source elevation
                             construct.SBInt32("sourceSurfaceElevation"),
                             construct.SBInt32("sourceDepth"),  # Source depth
                             # Elevation at receiver group
                             construct.SBInt32("datumElevRec"),
                             # Source elevation
                             construct.SBInt32("datumElevSource"),
                             # Water depth at source
                             construct.SBInt32("sourceWaterDepth"),
                             # Water depth at group
                             construct.SBInt32("recWaterDepth"),
                             # Elevation and depth scalar
                             construct.SBInt16("elevationScale"),
                             # Coordinate scalar
                             construct.SBInt16("coordScale"),
                             # X coordinate of source
                             construct.SBInt32("sourceLongOrX"),
                             # Y coordinate of source
                             construct.SBInt32("sourceLatOrY"),
                             # X coordinate of receiver group
                             construct.SBInt32("recLongOrX"),
                             # Y coordinate of receiver group
                             construct.SBInt32("recLatOrY"),
                             # Coordinate system
                             construct.SBInt16("coordUnits"),
                             # Weathering velocity
                             construct.SBInt16("weatheringVelocity"),
                             # Sub-weathering velocity
                             construct.SBInt16("subWeatheringVelocity"),
                             # Uphole time at source in ms
                             construct.SBInt16("sourceUpholeTime"),
github PIC-IRIS / PH5 / ph5 / core / segy_h.py View on Github external
# Sweep frequency at end
                             construct.SBInt16("sweepEnd"),
                             # Sweep length in ms
                             construct.SBInt16("sweepLength"),
                             construct.SBInt16("sweepType"),  # Sweep type
                             # Sweep taper at start, ms
                             construct.SBInt16("sweepTaperAtStart"),
                             # Sweep taper at end, ms
                             construct.SBInt16("sweepTaperAtEnd"),
                             construct.SBInt16("taperType"),  # Taper type
                             # Alias filter frequency, Hz
                             construct.SBInt16("aliasFreq"),
                             # Alias filter slope, dB/octave
                             construct.SBInt16("aliasSlope"),
                             # Notch filter frequency, Hz
                             construct.SBInt16("notchFreq"),
                             # Notch filter slope, dB/octave
                             construct.SBInt16("notchSlope"),
                             # Low-cut frequency, Hz
                             construct.SBInt16("lowCutFreq"),
                             # High-cut frequency, Hz
                             construct.SBInt16("hiCutFreq"),
                             # Low-cut slope, dB/octave
                             construct.SBInt16("lowCutSlope"),
                             # High-cut slope, dB/octave
                             construct.SBInt16("hiCutSlope"),
                             construct.SBInt16("year"),  # Year
                             construct.SBInt16("day"),  # Day of Year
                             construct.SBInt16("hour"),  # Hour
                             construct.SBInt16("minute"),  # Minute
                             construct.SBInt16("second"),  # Seconds
                             # Time bias code
github PIC-IRIS / PH5 / ph5 / core / segy_h.py View on Github external
# Sub-weathering velocity
                             construct.SBInt16("subWeatheringVelocity"),
                             # Uphole time at source in ms
                             construct.SBInt16("sourceUpholeTime"),
                             # Uphole time at group in ms
                             construct.SBInt16("recUpholeTime"),
                             # Source static correction in ms
                             construct.SBInt16("sourceStaticCor"),
                             # Group static correction in ms
                             construct.SBInt16("recStaticCor"),
                             # Total static applied in ms
                             construct.SBInt16("totalStatic"),
                             construct.SBInt16("lagTimeA"),  # Lag time A, ms
                             construct.SBInt16("lagTimeB"),  # Lag time B, ms
                             # Delay recording time, ms
                             construct.SBInt16("delay"),
                             # Mute start time, ms
                             construct.SBInt16("muteStart"),
                             construct.SBInt16("muteEnd"),  # Mute end time, ms
                             # *** Number of samples ***
                             construct.UBInt16("sampleLength"),
                             # *** Sample interval, us ***
                             construct.SBInt16("deltaSample"),
                             construct.SBInt16("gainType"),  # Gain type
                             construct.SBInt16("gainConst"),  # Gain constant
                             construct.SBInt16("initialGain"),  # Early gain
                             construct.SBInt16("correlated"),  # Correlated?
                             # Sweep frequency at start
                             construct.SBInt16("sweepStart"),
                             # Sweep frequency at end
                             construct.SBInt16("sweepEnd"),
                             # Sweep length in ms
github PIC-IRIS / PH5 / ph5 / core / segy_h.py View on Github external
construct.SBInt16("sourceStaticCor"),
                             # Group static correction in ms
                             construct.SBInt16("recStaticCor"),
                             # Total static applied in ms
                             construct.SBInt16("totalStatic"),
                             construct.SBInt16("lagTimeA"),  # Lag time A, ms
                             construct.SBInt16("lagTimeB"),  # Lag time B, ms
                             # Delay recording time, ms
                             construct.SBInt16("delay"),
                             # Mute start time, ms
                             construct.SBInt16("muteStart"),
                             construct.SBInt16("muteEnd"),  # Mute end time, ms
                             # *** Number of samples ***
                             construct.UBInt16("sampleLength"),
                             # *** Sample interval, us ***
                             construct.SBInt16("deltaSample"),
                             construct.SBInt16("gainType"),  # Gain type
                             construct.SBInt16("gainConst"),  # Gain constant
                             construct.SBInt16("initialGain"),  # Early gain
                             construct.SBInt16("correlated"),  # Correlated?
                             # Sweep frequency at start
                             construct.SBInt16("sweepStart"),
                             # Sweep frequency at end
                             construct.SBInt16("sweepEnd"),
                             # Sweep length in ms
                             construct.SBInt16("sweepLength"),
                             construct.SBInt16("sweepType"),  # Sweep type
                             # Sweep taper at start, ms
                             construct.SBInt16("sweepTaperAtStart"),
                             # Sweep taper at end, ms
                             construct.SBInt16("sweepTaperAtEnd"),
                             construct.SBInt16("taperType"),  # Taper type
github PIC-IRIS / PH5 / ph5 / core / segy_h.py View on Github external
construct.SBInt16("coordUnits"),
                             # Weathering velocity
                             construct.SBInt16("weatheringVelocity"),
                             # Sub-weathering velocity
                             construct.SBInt16("subWeatheringVelocity"),
                             # Uphole time at source in ms
                             construct.SBInt16("sourceUpholeTime"),
                             # Uphole time at group in ms
                             construct.SBInt16("recUpholeTime"),
                             # Source static correction in ms
                             construct.SBInt16("sourceStaticCor"),
                             # Group static correction in ms
                             construct.SBInt16("recStaticCor"),
                             # Total static applied in ms
                             construct.SBInt16("totalStatic"),
                             construct.SBInt16("lagTimeA"),  # Lag time A, ms
                             construct.SBInt16("lagTimeB"),  # Lag time B, ms
                             # Delay recording time, ms
                             construct.SBInt16("delay"),
                             # Mute start time, ms
                             construct.SBInt16("muteStart"),
                             construct.SBInt16("muteEnd"),  # Mute end time, ms
                             # *** Number of samples ***
                             construct.UBInt16("sampleLength"),
                             # *** Sample interval, us ***
                             construct.SBInt16("deltaSample"),
                             construct.SBInt16("gainType"),  # Gain type
                             construct.SBInt16("gainConst"),  # Gain constant
                             construct.SBInt16("initialGain"),  # Early gain
                             construct.SBInt16("correlated"),  # Correlated?
                             # Sweep frequency at start
                             construct.SBInt16("sweepStart"),
github PIC-IRIS / PH5 / ph5 / core / segy_h.py View on Github external
construct.SBInt16("year"),  # Year
                             construct.SBInt16("day"),  # Day of Year
                             construct.SBInt16("hour"),  # Hour
                             construct.SBInt16("minute"),  # Minute
                             construct.SBInt16("second"),  # Seconds
                             # Time bias code
                             construct.SBInt16("timeBasisCode"),
                             # Trace weighting for LSB
                             construct.SBInt16("traceWeightingFactor"),
                             # Geophone group number
                             construct.UBInt16("phoneRollPos1"),
                             # Geophone group number (field)
                             construct.UBInt16("phoneFirstTrace"),
                             # Geophone group number, last trace (field)
                             construct.UBInt16("phoneLastTrace"),
                             construct.SBInt16("gapSize"),  # Gap size
                             construct.SBInt16("taperOvertravel"))
    # Over travel
    return TRACE
github PIC-IRIS / PH5 / ph5 / core / segy_h.py View on Github external
# Alias filter frequency, Hz
                             construct.SBInt16("aliasFreq"),
                             # Alias filter slope, dB/octave
                             construct.SBInt16("aliasSlope"),
                             # Notch filter frequency, Hz
                             construct.SBInt16("notchFreq"),
                             # Notch filter slope, dB/octave
                             construct.SBInt16("notchSlope"),
                             # Low-cut frequency, Hz
                             construct.SBInt16("lowCutFreq"),
                             # High-cut frequency, Hz
                             construct.SBInt16("hiCutFreq"),
                             # Low-cut slope, dB/octave
                             construct.SBInt16("lowCutSlope"),
                             # High-cut slope, dB/octave
                             construct.SBInt16("hiCutSlope"),
                             construct.SBInt16("year"),  # Year
                             construct.SBInt16("day"),  # Day of Year
                             construct.SBInt16("hour"),  # Hour
                             construct.SBInt16("minute"),  # Minute
                             construct.SBInt16("second"),  # Seconds
                             # Time bias code
                             construct.SBInt16("timeBasisCode"),
                             # Trace weighting for LSB
                             construct.SBInt16("traceWeightingFactor"),
                             # Geophone group number
                             construct.UBInt16("phoneRollPos1"),
                             # Geophone group number (field)
                             construct.UBInt16("phoneFirstTrace"),
                             # Geophone group number, last trace (field)
                             construct.UBInt16("phoneLastTrace"),
                             construct.SBInt16("gapSize"),  # Gap size
github PIC-IRIS / PH5 / ph5 / core / segy_h.py View on Github external
def passcal_header():
    TRACE = construct.Struct("TRACE",
                             construct.String("station_name", 6),
                             construct.String("sensor_serial", 8),
                             construct.String("channel_name", 4),
                             construct.SBInt16("totalStaticHi"),
                             construct.SBInt32("samp_rate"),
                             construct.SBInt16("data_form"),
                             construct.SBInt16("m_secs"),
                             construct.SBInt16("trigyear"),
                             construct.SBInt16("trigday"),
                             construct.SBInt16("trighour"),
                             construct.SBInt16("trigminute"),
                             construct.SBInt16("trigsecond"),
                             construct.SBInt16("trigmills"),
                             construct.BFloat32("scale_fac"),
                             construct.UBInt16("inst_no"),
                             construct.SBInt16("unassigned"),
                             construct.SBInt32("num_samps"),
                             construct.SBInt32("max"),
                             construct.SBInt32("min"))

    return TRACE
github PIC-IRIS / PH5 / ph5 / core / segy_h.py View on Github external
def seg_header():
    TRACE = construct.Struct("TRACE",
                             # X coordinate of ensemble
                             construct.SBInt32("Xcoor"),
                             # Y coordinate of ensemble
                             construct.SBInt32("Ycoor"),
                             # Same as lino in reel header
                             construct.SBInt32("Inn"),
                             construct.SBInt32("Cnn"),  # Same as cdp
                             construct.SBInt32("Spn"),  # Shot point number
                             # Scaler to apply to Spn
                             construct.SBInt16("Scal"),
                             # Trace value measurement units
                             construct.SBInt16("Tvmu"),
                             # Transduction constant mantissa
                             construct.SBInt32("Tucmant"),
                             # Transduction constant exponent
                             construct.SBInt16("Tucexp"),
                             construct.SBInt16("Tdu"),  # Transduction units
                             # Device/Trace identifier
                             construct.SBInt16("Dti"),
                             construct.SBInt16("Tscaler"),  # Time scalar
                             # Source Type/Orientation
                             construct.SBInt16("Sto"),
                             # Source Energy direction
                             construct.String("Sed", 6),
                             # Source measurement mantissa
                             construct.SBInt32("Smsmant"),
                             # Source measurement exponent
                             construct.SBInt16("Smsexp"),
github lukleh / TwistedBot / twistedbot / packets.py View on Github external
Bool("use_provided_title"),
                ),
    101: Struct("close window",
                UBInt8("window_id"),
                ),
    102: Struct("click window",
                SBInt8("window_id"),
                SBInt16("slot"),
                SBInt8("mouse_button"),
                SBInt16("action_number"),
                Bool("hold_shift"),
                slotdata,
                ),
    103: Struct("set slot",
                SBInt8("window_id"),
                SBInt16("slot"),
                slotdata,
                ),
    104: Struct("set window items",
                SBInt8("window_id"),
                SBInt16("length"),
                MetaArray(lambda context: context["length"], slotdata),
                ),
    105: Struct("update window property",
                UBInt8("window_id"),
                UBInt16("bar"),
                UBInt16("progress"),
                ),
    106: Struct("confirm transaction",
                SBInt8("window_id"),
                SBInt16("action_number"),
                Bool("confirmed"),