| All, could anyone please help me. I am running the following script and i get the error message "sushw: fgettr.c: bad first header sustatic: fgettr.c: bad first header sufilter: fgettr.c: bad first header suwind: fgettr.c: bad first header. Can you help me fix the script? The script is the following: segyread tape=profile2pos8ch1_reloc.segy conv=1 endian=1 verbose=1 vblock=1065 trmin=498 trmax=498 | segyclean \ | sugain mbal=1 > temp.su awk '{print $2*1000}' 498obs8 | a2b n1=1 > cretac8plus.b sushw < temp.su key=tstat infile=cretac8plus.b \ | sustatic hdrs=1 sign=1 \ | sufilter f=3,5,17,21 amps=0,1,1,0 \ | suwind key=offset min=0 max=35000 tmin=0 tmax=0.2 dt=0.004 > temp.su What i want it to do is bring a certain pick of the 498th trace of a specific segy file to time zero and put all that into a file called temp.su so that when i run the command sumax < temp.su output=ascii verbose=1 outpar=amp1 i will get the amplitude of the pick which i have specified in file 498obs8. If you need more information let me know. Thank you very much. Georgios Moukos |
_______________________________________________
seisunix mailing list
seis...@mailman.mines.edu
https://mailman.mines.edu/mailman/listinfo/seisunix
Unsubscribe: seisunix-u...@mailman.mines.edu
Hi Georgios,
Can you read the data properly (segyread)?
Try to execute this command :
sushw < temp.su key=tstat infile=cretac8plus.b >new_temp.su
and see whether you still get the error message.
If yes, probably problem in reading the file.
Regards,
Leo
# MYSCRIPT - combines pick times and a SEGY file to create a text file of amplitudes at the picked locations.## Requires a text file with one pick per SEGY trace# also requires a SEGY file of course## Georgios Moukos - 2011/05/24 (the week before Barcelona's epic defeat by Manchester United)# set parameters
f=3,5,17,21# generate statics file from a text file
awk '{print $2*1000}' 498obs8 | a2b n1=1 > cretac8plus.b
# if498obs8 contains picks for each trace. then we have made a binary header file cretac8plus.b which we can use in sustat to move the picks to time zero, for all traces.
# Read and apply balancing to all traces, bandpass filter the full trace and save in .SU format
segyread tape=profile2pos8ch1_reloc.segy conv=1 endian=1 verbose=1 vblock=1065 |
segyclean |
sugain mbal=1 |sufilter f=$f > temp.su# file now contains all traces from the SEGY file, with the mean subtracted from each trace, and a bandpass filter applied.
# set static header from file, apply static correction and get the amplitude of the first sample in the trace.
sushw < temp.su key=tstat infile=cretac8plus.b |
sustatic hdrs=1 sign=1 |
suwind tmax=0 |
suascii bare=1 >amplitudes.txt# amplitudes.txt should now contain a list of amplitudes from the first sample of each trace. The first sample is the picked value, as we used the picks to apply a static shift upwards.