#!/usr/bin/perl -w # RWB January 5, 2002 # Manage PSM data from test of wide-band source on Hoke Seamount. use strict; my ($ih,$imn,$fsec); # variables to be read from file # **** Set default paths for different types of data. # **** abdus:/usr/data/bland/ is hdb1; abdus:/usr/data/mild/ is hdc1. my $inf= 'r0131319.46m'; # 2-hr PSM raw-data file my $outf='r0131319.54H'; # Detector output for a HOKE arrival. my $mpath='/usr/data/mild/pioneer/2001/'; # m files (raw data) my $Hpath='/usr/data/bland/pioneer/2001/'; # H files mak1hok(); # END of main script sub mak1hok() { # Read a m-file, select data for a HOKE source, and detect it. Write # an output file. my $id; my $str1; # input buffer my ($idlcom,$stat1); # command and return status for spawned IDL job. $id=313; # All the signals were on this day. open( INF,'; # Off the line of headings. while() { ($ih,$imn,$fsec,$inf)=split(/\s+/); print "\$ih = $ih\n"; print "\$imn = $imn\n"; print "\$fsec = $fsec\n"; print "\$inf = $inf\n"; substr($outf,-6,2)=sprintf("%02d",$ih); # Put in the hour. substr($outf,-3,2)=sprintf("%02d",$imn); # Put in the minute. print "output file: $mpath$outf\n"; open( TEMP,'>ptemp1.tmp' ); print TEMP ".rnew mkhok\n"; print TEMP ".rnew mkhok\n"; print TEMP "mkhok,'$mpath$inf','$mpath$outf',$id,$ih,$imn,$fsec\n"; print TEMP "exit\n"; close( TEMP ); $idlcom = "idl ptemp1.tmp"; # IDL command system($idlcom); unlink( "ptemp1.tmp" ); } } # End of subroutine makemp3.