コード例 #1
0
ファイル: handlers.py プロジェクト: gerhardpratt/waveserv
def get_segy_real (filename):
  '''
  Reads a SEG-Y file and returns all traces without additional metadata.
  '''

  sf = SEGYFile(filename, endian=endian, verbose=VERBOSE)
  traces = sf.readTraces()

  return traces
コード例 #2
0
ファイル: handlers.py プロジェクト: bsmithyman/waveserv
def get_segy_real(filename):
    '''
  Reads a SEG-Y file and returns all traces without additional metadata.
  '''

    sf = SEGYFile(filename, endian=endian, verbose=VERBOSE)
    traces = sf.readTraces()

    return traces
コード例 #3
0
ファイル: handlers.py プロジェクト: gerhardpratt/waveserv
def get_segy_time (filename):
  '''
  Reads a SEG-Y file and returns all traces, as well as the sample rate
  (read from the binary header).
  '''

  sf = SEGYFile(filename, endian=endian, verbose=VERBOSE)
  traces = sf.readTraces()

  return [traces, sf.bhead['hdt'], sf.trhead[0]['lagb']]
コード例 #4
0
ファイル: handlers.py プロジェクト: bsmithyman/waveserv
def get_segy_time(filename):
    '''
  Reads a SEG-Y file and returns all traces, as well as the sample rate
  (read from the binary header).
  '''

    sf = SEGYFile(filename, endian=endian, verbose=VERBOSE)
    traces = sf.readTraces()

    return [traces, sf.bhead['hdt'], sf.trhead[0]['lagb']]
コード例 #5
0
ファイル: sufix.py プロジェクト: valeryTech/pygeo
elif (not os.path.isfile(args[0])):
    parser.error('File %s does not exist!' % (args[0], ))

infile = args[0]

if (len(args) > 1):
    outfile = args[1]
else:
    outfile = infile + '.su'

if (options.verbose):
    print(
        '\nSEG-Y --> SU File Converter v1.0\nBrendan Smithyman, July 2011\n\n\tConverting \'%s\' to \'%s\'...\n'
        % (infile, outfile))

sf = SEGYFile(infile, verbose=options.verbose, majorheadersonly=False)
intr = sf.readTraces()
if (options.normalize):
    intr = sf.sNormalize(intr)

if (options.verbose):
    print('Generating output file.')

if (len(intr.shape) == 1):
    intr = [intr]

sf.writeSU(outfile, intr, sf.trhead)

if (options.verbose):
    print('Done!\n')
コード例 #6
0
ファイル: sufix.py プロジェクト: EvanBianco/pygeo
  parser.error('Please specify a valid filename to convert.')
elif (not os.path.isfile(args[0])):
  parser.error('File %s does not exist!'%(args[0],))

infile = args[0]

if (len(args) > 1):
  outfile = args[1]
else:
  outfile = infile + '.su'

if (options.verbose):
  print('\nSEG-Y --> SU File Converter v1.0\nBrendan Smithyman, July 2011\n\n\tConverting \'%s\' to \'%s\'...\n'%(infile, outfile))

sf = SEGYFile(infile, verbose=options.verbose, majorheadersonly=False)
intr = sf.readTraces()
if (options.normalize):
  intr = sf.sNormalize(intr)

if (options.verbose):
  print('Generating output file.')

if (len(intr.shape) == 1):
    intr = [intr]

sf.writeSU(outfile, intr, sf.trhead)

if (options.verbose):
  print('Done!\n')