live = getlive(offsets) loffs = offsets[live] lpicks = picks[live] lrpicks = lpicks / 1000. - timereduce(loffs, 4500, 0) otraces = sfo[:] s2Dtraces = sfs2D[:] s00traces = sfs00[:] s28traces = sfs28[:] lotraces = otraces[live] ls2Dtraces = s2Dtraces[live] ls00traces = s00traces[live] ls28traces = s28traces[live] lnotraces = sfo.sNormalize(lotraces) lns2Dtraces = sfo.sNormalize(ls2Dtraces) lns00traces = sfo.sNormalize(ls00traces) lns28traces = sfo.sNormalize(ls28traces) dto = sfo.trhead[0]['dt'] / 1000000. dts2D = sfs2D.trhead[0]['dt'] / 1000000. dts00 = sfs00.trhead[0]['dt'] / 1000000. dts28 = sfs28.trhead[0]['dt'] / 1000000. matplotlib.rcParams.update({'font.size': 20}) fig = plt.figure() fig.subplots_adjust(hspace=0.7) ax1 = fig.add_subplot(5, 1, 1, aspect=100)
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')
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')
live = getlive(offsets) loffs = offsets[live] lpicks = picks[live] lrpicks = lpicks/1000. - timereduce(loffs, 4500, 0) otraces = sfo[:] s2Dtraces = sfs2D[:] s00traces = sfs00[:] s28traces = sfs28[:] lotraces = otraces[live] ls2Dtraces = s2Dtraces[live] ls00traces = s00traces[live] ls28traces = s28traces[live] lnotraces = sfo.sNormalize(lotraces) lns2Dtraces = sfo.sNormalize(ls2Dtraces) lns00traces = sfo.sNormalize(ls00traces) lns28traces = sfo.sNormalize(ls28traces) dto = sfo.trhead[0]['dt']/1000000. dts2D = sfs2D.trhead[0]['dt']/1000000. dts00 = sfs00.trhead[0]['dt']/1000000. dts28 = sfs28.trhead[0]['dt']/1000000. matplotlib.rcParams.update({'font.size': 20}) fig = plt.figure() fig.subplots_adjust(hspace=0.7) ax1 = fig.add_subplot(5,1,1, aspect=100)