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
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
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']]
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']]
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')
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')