Пример #1
0
 def read_binary_header (self) :
     buf = self.read_buf (400)
     b = segy_h.Reel (self.endianess)
     
     ret = {}
     container = b.parse (buf)
         
     keys = segy_h.Reel ().__keys__
     for k in keys :
         what = "container.{0}".format (k)
         ret[k] = eval (what)
         
     return ret
Пример #2
0
def print_binary_header(container):
    if not container: return
    keys = segy_h.Reel().__keys__
    print "---------- Binary Header ----------"
    for k in keys:
        what = "container.{0}".format(k)
        print "{0:<20}\t---\t{1}".format(k, eval(what))
Пример #3
0
def read_binary_header():
    buf = FH.read(400)
    b = segy_h.Reel(ENDIAN)

    ret = None
    try:
        ret = b.parse(buf)
    except Exception as e:
        sys.stderr.write("Error: {0}\n".format(e))

    return ret
Пример #4
0
def read_binary_header():
    buf = FH.read(400)
    b = segy_h.Reel(ENDIAN)

    ret = None
    try:
        ret = b.parse(buf)
    except Exception as e:
        LOGGER.error(e)

    return ret
Пример #5
0
    def __init__(
        self,
        #start_point,     #   Starting point integer
        #length_points,   #   Number of points
        #das_t,           #   Das_t row
        sort_t,  #   Sort_t row
        #array_t,         #   Array_t row
        #time_t,          #   Time_t row
        event_t,  #   Event_t row
        #response_t,      #   Response_t row
        #receiver_t,      #   Receiver_t row (orientation)
        #offset_t,        #   Offset_t
        pas='******',  #   'P' -> PASSCAL extended header
        #   'S' -> SEG extended header
        #   'U' -> Menlo USGS extended header
        #   'I' -> SIOSEIS
        #   'N' -> iNova firefly
        length_points=0,
        seq=1,  #   Line sequence number
        user=False,  #   Populate trace header with user coordinates
        utm=False):  #   Populate trace header with UTM coordinates

        self.start_point = 0
        self.length_points = length_points
        if length_points == 0:
            self.length_points_all = 0
        else:
            self.length_points_all = length_points

        self.das_t = None
        self.sample_rate = None
        self.channel_number = 1
        self.sort_t = sort_t
        #self.array_t = array_t
        self.time_t = None
        self.event_t = event_t
        self.response_t = None
        self.offset_t = None
        self.pas = pas
        self.utm = utm
        self.user = user
        self.seq = seq
        self.text_header = segy_h.Text()
        self.reel_header = segy_h.Reel()
        #   Allow non-standard SEG-Y
        self.break_standard = False
        self.trace_type = None  #   Current data trace type (int, float)
        self.trace_byteorder = None  #   Current data trace byteorder
        #   *XXX*   Appear to not be used
        #self.tra = {}
        self.ext = {}