Go to the list of seismic processes.      Go to SIOSEIS introduction.

Perl script to merge the magnetics with a listing of the SEG-Y file.


File "merge.rev.mag":

#!/usr/bin/perl
# usage:   merge_mag mag_file segy_file
# create a file with the rp number and magnetic value for the rp
# give a mag_file with the GMT and magnetics and a SEG-Y listing
# file with rp number and GMT.
#
open( SEGY, "lsd.line6.1x4") || die "Can't open lsd.line5: $!\n";
open( MAGGIE, "maggie.line6.1") || die "Can't open maggie: $!\n";
$index = 0;
while () {
        ($junk,@shotno[$index], @shottr[$index], @rpno[$index], @rptr[$index], @id[$inde
x], @range[$index], @delay[$index], @nsamps[$index], @si[$index], @yr[$index], @day[$ind
ex], @hr[$index], @min[$index], @sec[$index])
                = split(/\s+/,$_,14);
        $index++;
}
$nsegy = $index;

$index = 0;
while () {
        chop;
        (@myr[$index], @mday[$index], @mhr[$index], @mmin[$index], @msec[$index], @maggi
e[$index])
                = split(/\s+/,$_,6);
        $index++;
}
$nmaggie = $index;

$ndone = 0;
#$start = 0;
$start = $nsegy;
for( $m_index=0; $m_index<$nmaggie; $m_index++) {
#       for( $index=$start; $index<$nsegy; $index++) {
        for( $index=$start; $index>=0; $index--) {
                if( @mday[$m_index] == @day[$index] && @mhr[$m_index] == @hr[$index] && 
@mmin[$m_index] == @min[$index]) {
#                       print "fno ",@rpno[$index], " picks ",@maggie[$m_index], " end \
n";
                        @fno[$ndone] = @rpno[$index];
                        @picks[$ndone] = @maggie[$m_index];
                        $ndone++;
                        $start = $index;
#                       $index = $nsegy;
                        $index = 0;
                }
        }
}

#for( $index=0; $index<$ndone; $index++ ) {
for( $index=$ndone-1; $index>=0; $index-- ) {
        print "fno ",@fno[$index], " picks ",1.-(@picks[$index]/600.), " end \n";
}