/* ufh script to inject dead traces after trace 56 and trace 146 (original numbering) */ func Begin() { } func OnLineHeader() { TraceLength = LH.NumSmp; /* store number samples per trace */ RecLength = LH.NumTrc; /* store number traces per record */ output(LH); /* output line header unchanged */ } func OnTrace() /* operate on each trace sequentially */ { if(Tr.TrcNum < 56){ /* do nothing to first 55 traces */ output(Tr); } else if(Tr.TrcNum == 56){ /* first key trace */ output(Tr); /* output it unchanged */ for(i=0;i 56 && Tr.TrcNum < 145){ /* do nothing to next trcs */ Tr.TrcNum = Tr.TrcNum + 1; /* since we've injected 1 trc */ output(Tr); } else if(Tr.TrcNum == 145){ Tr.TrcNum = Tr.TrcNum + 1; output(Tr); for(i=0;i 145 && Tr.TrcNum < RecLength-1){ Tr.TrcNum = Tr.trcNum + 2; output(Tr); } } func End(){ }