/* This is a very basic ufh script to "prep" some finite difference model data consisting of a split spread, 481 traces/rec, and a trace at 0-range. Group interval is 27.5 */ func Begin() { /* initialize variable */ TotalTraces = 1; RelativeTraces = 1; RNum = 1; DepthIndex = -241; } func OnLineHeader() /* done nothing to line header - output it */ { output(LH); } func OnTrace() { /* for each input trace - prep */ RecordRollAlong = ((RelativeTraces - 1)%481) + 1; Tr.DstSgn = 27.5 * (RecordRollAlong - 241); Tr.DphInd = DepthIndex + RelativeTraces; Tr.RecNum = RNum; Tr.SrcLoc = RNum; output(Tr); /* output "prepped" trace */ /* we could print out info to stderr to monitor our prep print( "TotalTraces = ", TotalTraces, " RelativeTraces = ", RelativeTraces, " Tr.DstSgn = ", Tr.DstSgn, " Tr.DphInd = ", Tr.DphInd, "\n"); */ if((TotalTraces%481) == 0){ /* update rolling index variables */ ++RNum; DepthIndex = DepthIndex + 40; RelativeTraces = 1; } else { ++RelativeTraces; } TotalTraces++; }