[cig-commits] r16245 - seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot

carltape at geodynamics.org carltape at geodynamics.org
Tue Feb 9 15:55:51 PST 2010


Author: carltape
Date: 2010-02-09 15:55:51 -0800 (Tue, 09 Feb 2010)
New Revision: 16245

Modified:
   seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis.pl
   seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_all.pl
   seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_multi.pl
Log:
Updates plotting scripts for seismogram comparisons.


Modified: seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis.pl
===================================================================
--- seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis.pl	2010-02-09 23:52:49 UTC (rev 16244)
+++ seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis.pl	2010-02-09 23:55:51 UTC (rev 16245)
@@ -51,7 +51,7 @@
 if (!$opt_s) {$opt_s = "SYN"}
 if ($opt_i) {($eid,$Tmin,$Tmax) = split(/\//,$opt_i);}
 
-# final four files are: window file 1, window file 2, measurement file 1, measurement file 2
+# final files are window and measurement files
 if(@ARGV < 3) {die("EXIT: must have at least three files -- smodel, window file, measurement file");}
 @allfiles = @ARGV;
 $nfiles = @allfiles;
@@ -96,7 +96,7 @@
 #---------------------------
 # ADDITIONAL USER INPUT
 
-$iplot_win = 0;      # plot windows
+$iplot_win = 1;      # plot windows
 $iplot_dTlabel = 0;  # plot CC measurement for dT
 $iplot_dAlabel = 0;  # plot CC measurement for dlnA
 $iplot_sigma = 0;
@@ -106,7 +106,7 @@
 $ifault = 1;         # plot faults (southern California)
 $ilims = 0;          # plot limits next to axis label
 $iletter = 0;        # plot a letter for a publication figure
-$letter = "b";
+$letter = "B";
 
 $sdX = 4.5; $sdY = 1.4; $origin = "-X2.25 -Y5.5";
 $labfsize = 10;               # font size for model tag (e.g., "Z-m16")
@@ -114,14 +114,26 @@
 $fpen = "1.0p";
 $pen = "1.0p";		      # KEY: line thickness for seismograms (1.5 for slides, 1.0 for figures)
 $scale = 1.2;                 # KEY: scaling for plotting seismograms
+$winfo = "-W0.5p -G230/230/230"; # specs for gray windows
+$winfo2 = "-W3p";              # specs for secondary windows (bold outlines)
 
+# plot a secondary set of windows (14236768)
+$iplot_win2 = 0;
+if ($iplot_win2 == 1) {
+  # FLEXWIN picks
+  $winfile2 = "/home/carltape/SOCAL_ADJOINT/RUNS/14236768/m16/WINDOW_T003_T030/MEASUREMENT_WINDOWS_14236768_T003_T030_m16";
+  if (not -f $winfile2) {die("\n check if window file $winfile2 exists\n");}
+}
+
 # time ticks for seismograms
 if ($trange >= 100) {$ttick1 = 20; $ttick2 = 10;}
 elsif ($trange < 100 && $trange > 60) {$ttick1 = 10; $ttick2 = 10;}
 else {$ttick1 = 10; $ttick2 = 2;}
+$annotsize = 10;
 
 #if($iplot_dTlabel==1 || $iplot_dAlabel==1) {$iplot_win = 1;}
 if($nseis==3) {$sdX = 3.0; $sdY = 1.2; $origin = "-X4 -Y5.5"; }
+#$scale = 1.1; $sdX = 6.5; $sdY = 1.2; $origin = "-X0.5 -Y5.5";  # for single seis (14236768)
 
 # science paper figure
 #$iplot_win = 0; $iplot_dTlabel = 0; $iplot_dAlabel = 0; $iplot_sigma = 0; $iletter = 1; $letter = "B"; $pen = "1p";  # 14096196
@@ -167,7 +179,7 @@
 #---------------------------
 
 # set GMT defaults
-`gmtset BASEMAP_TYPE plain PAPER_MEDIA letter ANNOT_FONT_SIZE = 9p LABEL_FONT_SIZE = 9p PAGE_ORIENTATION = landscape PLOT_DEGREE_FORMAT D FRAME_PEN $fpen TICK_PEN $tpen`;
+`gmtset BASEMAP_TYPE plain PAPER_MEDIA letter MEASURE_UNIT inch ANNOT_FONT_SIZE $annotsize LABEL_FONT_SIZE $annotsize PAGE_ORIENTATION landscape PLOT_DEGREE_FORMAT D FRAME_PEN $fpen TICK_PEN $tpen`;
 
 #$name = "${sta}_${net}_win_adj_${klab}";
 $name = "${eid}_${Ttag}_${sta}_${net}_${smodel1}_iwin${iplot_win}_seis_${nseis}";
@@ -327,11 +339,45 @@
 # loop over sets of seismograms (
 for ($kk = $kmin; $kk <= $kmax; $kk++) {
 
+  my(@Twinb2); my(@Twine2);
+  my(@Rwinb2); my(@Rwine2);
+  my(@Zwinb2); my(@Zwine2);
+  my($undef);
+
+  $smodel = $smodels[$kk-1];
+  $winfile = $winfiles[$kk-1];
+
+  # SYNTHETICS -- component label always has the form BH_,
+  # even if the data file is something else (HH_, LH_).
+  # We assume that ALL componenets exist.
+  $s_tag = "semd.sac.${smodel}.${Ttag}";
+  $Tlab = "$sta.$net.BHT";
+  $Rlab = "$sta.$net.BHR";
+  $Zlab = "$sta.$net.BHZ";
+  $Tsyn = `ls ${opt_s}/${Tlab}*${s_tag}`; chomp($Tsyn);
+  $Rsyn = `ls ${opt_s}/${Rlab}*${s_tag}`; chomp($Rsyn);
+  $Zsyn = `ls ${opt_s}/${Zlab}*${s_tag}`; chomp($Zsyn);
+
+
+
+}   # for loop
+
+#================================================
+
+# loop over sets of seismograms (
+for ($kk = $kmin; $kk <= $kmax; $kk++) {
+
   my(@Twinb); my(@Twine);
   my(@Rwinb); my(@Rwine);
   my(@Zwinb); my(@Zwine);
   my($undef);
 
+  if($iplot_win2 == 1) {
+    my(@Twinb2); my(@Twine2);
+    my(@Rwinb2); my(@Rwine2);
+    my(@Zwinb2); my(@Zwine2);
+  }
+
   $smodel = $smodels[$kk-1];
   $winfile = $winfiles[$kk-1];
   $measfile = $measfiles[$kk-1];
@@ -362,7 +408,6 @@
     #$shift = "-X$dX -Y$dY";
   }
 
-
   # SYNTHETICS -- component label always has the form BH_,
   # even if the data file is something else (HH_, LH_).
   # We assume that ALL componenets exist.
@@ -465,6 +510,56 @@
   }
   #print "Vertical component: nrline = $nrline, nZ = $nZ\n";
 
+  # secondary window file
+  if ($iplot_win2==1) {
+    $ntline=`grep -n \"$Tsyn\" $winfile2 | awk -F: '{ print \$1 }'`;
+    chomp($ntline);
+    if ($ntline) {
+      $nline=$ntline;
+      $nline=$nline+1;
+      $nT2=`sed -n ${nline}p $winfile2`;
+      for ($i=0; $i < $nT2; $i++) {
+	$nline=$nline+1;
+	$win=`sed -n ${nline}p $winfile2`; chomp($win);
+	(undef,$winb,$wine)=split(/ +/,$win);
+	push @Twinb2, "$winb";
+	push @Twine2, "$wine";
+      }
+    }
+
+    $nrline=`grep -n \"$Rsyn\" $winfile2 | awk -F: '{ print \$1 }'`;
+    chomp($nrline);
+    if ($nrline) {
+      $nline=$nrline;
+      $nline=$nline+1;
+      $nR2=`sed -n ${nline}p $winfile2`;
+      for ($i=0; $i < $nR2; $i++) {
+	$nline=$nline+1;
+	$win=`sed -n ${nline}p $winfile2`;
+	chomp($win);
+	(undef,$winb,$wine)=split(/ +/,$win);
+	push @Rwinb2, "$winb";
+	push @Rwine2, "$wine";
+      }
+    }
+
+    $nzline=`grep -n \"$Zsyn\" $winfile2 | awk -F: '{ print \$1 }'`;
+    chomp($nzline);
+    if ($nzline) {
+      $nline=$nzline;
+      $nline=$nline+1;
+      $nZ2=`sed -n ${nline}p $winfile2`;
+      for ($i=0; $i < $nZ2; $i++) {
+	$nline=$nline+1;
+	$win=`sed -n ${nline}p $winfile2`;
+	chomp($win);
+	(undef,$winb,$wine)=split(/ +/,$win);
+	push @Zwinb2, "$winb";
+	push @Zwine2, "$wine";
+      }
+    }
+  }
+
   #==========================================
 
   # pssac2 scaling
@@ -543,6 +638,7 @@
       $dXi = 7.5;
     } else {
       $dXi = 5.75;
+      #$dXi = 2; # for single seis (14236768)
     }
     `psbasemap -X$dXi -Y1 $proj $bounds -K $Bseis > $ps_file`;
   } else {
@@ -557,11 +653,18 @@
   if ($ntline) {
     if ($iplot_win==1) {
       for ($i=0; $i<$nT; $i++) {
-	open(GMT,"|psxy $proj $bounds -W2 -G220/220/220 -O -K >> $ps_file");
-	print GMT "$Twinb[$i] 0\n $Twine[$i] 0\n $Twine[$i] 2\n $Twinb[$i] 2\n";
+	open(GMT,"|psxy $proj $bounds $winfo -O -K >> $ps_file");
+	print GMT "$Twinb[$i] 0\n $Twine[$i] 0\n $Twine[$i] 2\n $Twinb[$i] 2\n $Twinb[$i] 0\n";
 	close(GMT);
       }
     }
+    if ($iplot_win2==1) {
+      for ($i=0; $i<$nT2; $i++) {
+	open(GMT,"|psxy $proj $bounds $winfo2 -O -K >> $ps_file");
+	print GMT "$Twinb2[$i] 0\n $Twine2[$i] 0\n $Twine2[$i] 2\n $Twinb2[$i] 2\n $Twinb2[$i] 0\n";
+	close(GMT);
+      }
+    }
   }
   if ($Tflag==1) {
     `pssac2 $proj $Tdat $bounds -Ent-3 -M${sizeT} $black_pen -N -K -O >> $ps_file`;
@@ -605,11 +708,18 @@
   if ($nrline) {
     if ($iplot_win==1) {
       for ($i=0; $i<$nR; $i++) {
-	open(GMT,"|psxy $proj $bounds -W2 -G220/220/220 -O -K >> $ps_file");
-	print GMT "$Rwinb[$i] 0\n $Rwine[$i] 0\n $Rwine[$i] 2\n $Rwinb[$i] 2\n";
+	open(GMT,"|psxy $proj $bounds $winfo -O -K >> $ps_file");
+	print GMT "$Rwinb[$i] 0\n $Rwine[$i] 0\n $Rwine[$i] 2\n $Rwinb[$i] 2\n $Rwinb[$i] 0\n";
 	close(GMT);
       }
     }
+    if ($iplot_win2==1) {
+      for ($i=0; $i<$nR2; $i++) {
+	open(GMT,"|psxy $proj $bounds $winfo2 -O -K >> $ps_file");
+	print GMT "$Rwinb2[$i] 0\n $Rwine2[$i] 0\n $Rwine2[$i] 2\n $Rwinb2[$i] 2\n $Rwinb2[$i] 0";
+	close(GMT);
+      }
+    }
   }
   if ($Rflag==1) {
     `pssac2 $proj $Rdat $bounds -Ent-3 -M${sizeR} $black_pen -N -K -O >> $ps_file`;
@@ -653,11 +763,18 @@
   if ($nzline) {
     if ($iplot_win==1) {
       for ($i=0; $i<$nZ; $i++) {
-	open(GMT,"|psxy $proj $bounds -W2 -G220/220/220 -O -K >> $ps_file");
-	print GMT "$Zwinb[$i] 0\n $Zwine[$i] 0\n $Zwine[$i] 2\n $Zwinb[$i] 2\n";
+	open(GMT,"|psxy $proj $bounds $winfo -O -K >> $ps_file");
+	print GMT "$Zwinb[$i] 0\n $Zwine[$i] 0\n $Zwine[$i] 2\n $Zwinb[$i] 2\n $Zwinb[$i] 0\n";
 	close(GMT);
       }
     }
+    if ($iplot_win2==1) {
+      for ($i=0; $i<$nZ2; $i++) {
+	open(GMT,"|psxy $proj $bounds $winfo2 -O -K >> $ps_file");
+	print GMT "$Zwinb2[$i] 0\n $Zwine2[$i] 0\n $Zwine2[$i] 2\n $Zwinb2[$i] 2\n $Zwinb2[$i] 0\n";
+	close(GMT);
+      }
+    }
   }
   if ($Zflag==1) {
     `pssac2 $proj $Zdat $bounds -Ent-3 -M${sizeZ}  $black_pen -N -K -O $Bseis >> $ps_file`;
@@ -665,6 +782,14 @@
   `pssac2 $proj $Zsyn $bounds -Ent-3 -M${sizeZ2} $red_pen -N -O -K >> $ps_file`;
   #if ($nzline && ($iplot_recon==1)) {`pssac2 $proj $Zrecon $bounds -Ent-3 -M${sizeZ3} $recon_pen -N -K -O >> $ps_file`;}
   `psbasemap $proj $bounds -K -O $Bseis >> $ps_file`; # replot basemap
+  # GJI figure (14236768)
+#  if ($nzline) {
+#      for ($i=0; $i<$nZ; $i++) {
+#        $j = $i+1; $xmid = ($Zwinb[$i] + $Zwine[$i])/2;
+#        `psxy $bounds $proj -Sc16p -W1p -G255 -N -K -O >> $ps_file <<EOF\n$xmid 2\nEOF\n`;
+#        `pstext $bounds $proj -N -K -O >> $ps_file <<EOF\n$xmid 2 14 0 1 CM $j\nEOF\n`;
+#      }
+#  }
 
   # labels
   if ($nzline) {
@@ -717,7 +842,7 @@
 #`convert $ps_file $jpg_file ; xv $jpg_file &`;
 `ps2pdf $ps_file`;
 #`rm $ps_file`;       # remove PS file
-#system("ghostview ${ps_file} &");
+system("gv ${ps_file} &");
 
 print "done with ${name}.pdf\n";
 

Modified: seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_all.pl
===================================================================
--- seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_all.pl	2010-02-09 23:52:49 UTC (rev 16244)
+++ seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_all.pl	2010-02-09 23:55:51 UTC (rev 16245)
@@ -8,30 +8,64 @@
 # and plots the data and synthetics by calling plot_seis.pl
 #
 # EXAMPLE:
-#    plot_seis_all.pl -t 6/30 m16 m00 m99
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 26/26 -t 6/30 m16 m99
 #    plot_seis_all.pl -t 6/30 m16 m00
 #    plot_seis_all.pl -t 6/30 m00 m99
 #
 # Using multi:
-#    plot_seis_all.pl -t 6/30 m16 m04 m01 m00 m99        # nature paper 9983429 - DAN (new)
-#    plot_seis_all.pl -t 6/30 m16 m08 m04 m01 m00        # nature paper 9983429 - DAN (old)
-#    plot_seis_all.pl -t 6/30 m16 m08 m04 m01 m00 m99    # nature paper 9983429 - DAN (full)
-#    plot_seis_all.pl -t 6/30 m16 m00 m99                # nature paper 9983429 - DAN
-#    plot_seis_all.pl -t 6/30 m16                        # nature paper 14179736
+#    plot_seis_all.pl -t 6/30 m16 m04 m01 m00 m99        # 9983429 - DAN (new)
+#    plot_seis_all.pl -t 6/30 m16 m08 m04 m01 m00        # 9983429 - DAN (old)
+#    plot_seis_all.pl -t 6/30 m16 m08 m04 m01 m00 m99    # 9983429 - DAN (full)
+#    plot_seis_all.pl -t 6/30 m16 m00 m99                # 9983429 - DAN
+#    plot_seis_all.pl -t 6/30 m16                        # 14179736
 #
+# For GJI paper:
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 1/1 -t 6/30 m16 m04 m01 m00 m99 # b
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 5/5 -t 3/30 m16 m04 m01 m00 m99 # b
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 8/8 -t 6/30 m16 m00 m99 # BLANK
+#
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 7/7 -t 6/30 m16 m99 # b
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 26/26 -t 6/30 m16 # b
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 26/26 -t 3/30 m16 # c
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 26/26 -t 2/30 m16 # d
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 26/26 -t 2/30 m99 # e
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 8/8 -t 6/30 m16 m00 m99 # b
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 21/21 -t 2/30 m16 m00 m99 # b
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 13/13 -t 6/30 m16 m00 m99 # b
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 17/17 -t 6/30 m16 m00 m99 # b
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 87/87 -t 6/30 m16 # NONE
+#
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 5/5 -t 6/30 m16 m00 m99 # b - win
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 9/9 -t 6/30 m16 m00 m99 # b - win
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 83/83 -t 6/30 m16 m00 m99 # b - win
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 27/27 -t 6/30 m16 m00 m99 # b - win
+#    plot_seis_all.pl -f INPUT/plot_seis_input_reflection -i 2/2 -t 3/30 m16 m00 m99 # b - win
+#    plot_seis_all.pl -f INPUT/plot_seis_input_reflection -i 3/3 -t 3/30 m16 # b - win
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 25/25 -t 2/30 m16 m00 m99 # b - win
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 3/3 -t 6/30 m16 m00 m99 # b - win
+#
+# Worst VR in dataset:
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 88/88 -t 6/30 m16 m00
+#    plot_seis_all.pl -f INPUT/plot_seis_input -i 89/89 -t 6/30 m16 m00
+#
+# All reflections:
+#    plot_seis_all.pl -f INPUT/plot_seis_input_reflection -i 1/20 -t 3/30 m16 m00 m99
+#
 #-----------------------------------
 
 use Getopt::Std;
 
 sub Usage{
   print STDERR <<END;
-  plot_seis_all.pl -t Tmin/Tmax smodels
+  plot_seis_all.pl -f file -i imin/imax -t Tmin/Tmax smodels
 END
   exit(1);
 }
 
 if (@ARGV == 0) { Usage(); }
-if (!getopts('t:')) {die('Check input arguments\n');}
+if (!getopts('f:t:i:')) {die('Check input arguments\n');}
+if ($opt_f) {$fileinput = $opt_f;}
+if ($opt_i) {($imin,$imax) = split(/\//,$opt_i);}
 if ($opt_t) {($Tmin,$Tmax) = split(/\//,$opt_t);}
 
 @smodels = @ARGV;
@@ -44,6 +78,7 @@
 $Ttag = "${sTmin}_${sTmax}";
 
 $pwd = $ENV{PWD};
+$imulti = 0;   # KEY COMMAND
 
 print "-- comparing seismograms from $nmod models --> @smodels --\n";
 print "-- bandpass $Ttag --\n";
@@ -125,12 +160,12 @@
 # 14096196   SCI2 CI   90/180
 # 14096196   SMM CI    0/70
 
-$finput = "plot_seis_input";
+#$finput = "plot_seis_input";
 #$finput = "plot_seis_input_reflection";
 #$finput = "plot_seis_input_science";
 #$finput = "plot_seis_input_anisotropy";
 
-$fileinput = "INPUT/$finput";
+#$fileinput = "INPUT/$finput";
 if (not -f $fileinput) {die("check if fileinput $fileinput exist or not\n")}
 open(IN,"$fileinput"); @flines = <IN>; close(IN);
 $nseis = @flines;
@@ -147,15 +182,19 @@
 #=============================================
 # GENERATE GMT FIGURES
 
-$imin = 1; $imax = $nseis;
+#$imin = 1; $imax = $nseis;
 #$imin = 1; $imax = 10;
-$imin = 8; $imax = $imin;
+#$imin = 1; $imax = $imin;
 
-if($imin > $nseis) {die("imin is larger than nseis");}
+if($imin > $nseis) {print "imin is larger than nseis ($imin, $nseis)\n"; $imin = $nseis;}
+if($imax > $nseis) {print "imax is larger than nseis ($imax, $nseis)\n"; $imax = $nseis;}
 
 $cshfile = "plot_seis_all.csh";
 open(CSH,">$cshfile");
 
+# remove previous links
+`rm DATA/* SYN/*`;
+
 for ($i = $imin; $i <= $imax; $i++) {
 
   ($eid,$sta,$net,$lcut) = split(" ", at flines[$i-1]);
@@ -169,27 +208,28 @@
   if (not -f $cmtfile) {die("check if cmtfile $cmtfile exist or not\n")}
   if (not -f $stafile) {die("check if stafile $stafile exist or not\n")}
 
-  # remove previous links
-  `rm DATA/* SYN/*`;
-
   for ($kk = 1; $kk <= $nmod; $kk++) {
     # check window and measurement files
     $smodel = $smodels[$kk-1];
     $mdir = "${smodel}";
 
-    if($smodel eq "m00") {$mdir = "${smodel}_SAVE";}   # KEY FOR NOW
-    if(0==1) {
+    #if($smodel eq "m00") {$mdir = "${smodel}_SAVE";}   # KEY FOR NOW
+    if(1==1) {
        #if($smodel eq "m16") {$mdir = "${smodel}_DAN_all";}
-       #if($smodel eq "m16") {$mdir = "${smodel}_RVR_all";}
-       if($smodel eq "m16") {$mdir = "${smodel}_EDW2_all";}
+       #$mdir = "${smodel}_RVR_all";
+       $mdir = "${smodel}_SMS_S";
+       #$mdir = "${smodel}_SMM_reflection";
+       #$mdir = "${smodel}_WGR_rayleigh";
+       #$mdir = "${smodel}_EDW2_all";
+
        #if($smodel eq "m16") {$mdir = "${smodel}_SMM_reflection";}
     }
     print "$kk -- $smodel -- $mdir --\n";
 
     $winfile = "${dir_run}/${eid}/${mdir}/WINDOW_${Ttag}/MEASUREMENT_WINDOWS_${eid}_${Ttag}_${smodel}";
     $measfile = "${dir_run}/${eid}/${mdir}/MEASURE_${Ttag}/${eid}_${Ttag}_${smodel}_window_chi";
-    if (not -f $winfile) {die("check if winfile $winfile exist or not\n")}
-    if (not -f $measfile) {die("check if measfile $measfile exist or not\n")}
+    #if (not -f $winfile) {die("check if winfile $winfile exist or not\n")}
+    #if (not -f $measfile) {die("check if measfile $measfile exist or not\n")}
     $winfiles[$kk-1]  = $winfile;
     $measfiles[$kk-1] = $measfile;
 
@@ -199,6 +239,7 @@
     `ln -s $syndir/*$sta*BHZ* SYN`; `ln -s $syndir/*$sta*BHR* SYN`; `ln -s $syndir/*$sta*BHT* SYN`;
   }
   print "-- @smodels --\n-- @winfiles --\n-- @measfiles --\n";
+  #die("TESTING");
 
   # link the data into the temporary directory
   $datadir = "${dir_data0}/${eid}/PROCESSED/PROCESSED_${Ttag}";
@@ -206,21 +247,24 @@
   `ln -s $datadir/*$sta*BHZ* DATA`; `ln -s $datadir/*$sta*BHR* DATA`; `ln -s $datadir/*$sta*BHT* DATA`;
   `ln -s $datadir/*$sta*HHZ* DATA`; `ln -s $datadir/*$sta*HHR* DATA`; `ln -s $datadir/*$sta*HHT* DATA`;
 
-  #$lcut = "0/260";
+  #$lcut = "0/200";  # KEY
+  #$lcut = "0/150"; 
 
-   # KEY: plot 1, 2, or 3 sets of ZRT seismograms with map
-   `plot_seis.pl -m $cmtfile -n $stanet -l $lcut -a $stafile -d DATA -s SYN -i ${eid}/${Ts} @smodels @winfiles @measfiles`;
-   #print CSH "plot_seis.pl -m $cmtfile -n $stanet -l $lcut -a $stafile -d DATA -s SYN -i ${eid}/${Ts} @smodels @winfiles @measfiles\n";
+  if ($imulti==0) {
+    # KEY: plot 1, 2, or 3 sets of ZRT seismograms with map
+    #`plot_seis.pl -m $cmtfile -n $stanet -l $lcut -a $stafile -d DATA -s SYN -i ${eid}/${Ts} @smodels @winfiles @measfiles`;
+    print CSH "plot_seis.pl -m $cmtfile -n $stanet -l $lcut -a $stafile -d DATA -s SYN -i ${eid}/${Ts} @smodels @winfiles @measfiles\n";
+  } else {
+    # KEY: plot any number of sets of ZRT seismograms (no map)
+    `plot_seis_multi.pl -m $cmtfile -n $stanet -l $lcut -d DATA -s SYN -i ${eid}/${Ts} @smodels @winfiles @measfiles`;
+    #print CSH "plot_seis_multi.pl -m $cmtfile -n $stanet -l $lcut -d DATA -s SYN -i ${eid}/${Ts} @smodels @winfiles @measfiles\n";
+  }
 
-   # KEY: plot any number of sets of ZRT seismograms (no map)
-   #`plot_seis_multi.pl -m $cmtfile -n $stanet -l $lcut -d DATA -s SYN -i ${eid}/${Ts} @smodels @winfiles @measfiles`;
-   #print CSH "plot_seis_multi.pl -m $cmtfile -n $stanet -l $lcut -d DATA -s SYN -i ${eid}/${Ts} @smodels @winfiles @measfiles\n";
-
 }
 
 close(CSH);
 #print "csh -f $cshfile\n";
-#system("csh -f $cshfile");
+system("csh -f $cshfile");
 
 #================================================
 print "\n done with plot_seis_all.pl\n\n";

Modified: seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_multi.pl
===================================================================
--- seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_multi.pl	2010-02-09 23:52:49 UTC (rev 16244)
+++ seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_multi.pl	2010-02-09 23:55:51 UTC (rev 16245)
@@ -107,15 +107,19 @@
 $tpen = "1.0p";
 $fpen = "1.0p";
 $pen = "0.5p";           # line thickness for seismograms
+$winfo = "-W1p -G230/230/230"; # specs for gray windows
 
 # time ticks for seismograms
 if ($trange >= 100) {$ttick1 = 20; $ttick2 = 10;}
 elsif ($trange < 100 && $trange > 60) {$ttick1 = 10; $ttick2 = 10;}
 else {$ttick1 = 10; $ttick2 = 2;}
 
-# nature paper figure
-$sdY = 1.0; $iplot_win = 1; $iplot_dTlabel = 1; $iplot_dAlabel = 0; $iplot_sigma = 0; $iletter = 1; $letter = "b"; $pen = "1p";
+# science paper figure
+$sdY = 1.0; $iplot_win = 1; $iplot_dTlabel = 1; $iplot_dAlabel = 0; $iplot_sigma = 0; $iletter = 1; $letter = "B"; $pen = "1p";
 
+# GJI paper figure
+$sdY = 1.2; $iplot_win = 0; $iplot_dTlabel = 0; $iplot_dAlabel = 0; $iplot_sigma = 0; $iletter = 1; $letter = "b"; $pen = "1p";
+
 # simple version
 #$sdY = 1.0; $iplot_win = 0; $iplot_dTlabel = 1; $iplot_dAlabel = 0; $iplot_sigma = 0; $iletter = 0; $pen = "1p";
 
@@ -432,7 +436,7 @@
 if ($ntline) {
   if ($iplot_win==1) {
     for ($i=0; $i<$nT; $i++) {
-      open(GMT,"|psxy $proj $bounds -W2 -G220/220/220 -O -K >> $ps_file");
+      open(GMT,"|psxy $proj $bounds $winfo -O -K >> $ps_file");
       print GMT "$Twinb[$i] 0\n $Twine[$i] 0\n $Twine[$i] 2\n $Twinb[$i] 2\n";
       #print GMT "$Twinb[$i] 0\n";
       #print GMT "$Twine[$i] 0\n";
@@ -472,7 +476,7 @@
 if ($nrline) {
   if ($iplot_win==1) {
     for ($i=0; $i<$nR; $i++) {
-      open(GMT,"|psxy $proj $bounds -W2 -G220/220/220 -O -K >> $ps_file");
+      open(GMT,"|psxy $proj $bounds $winfo -O -K >> $ps_file");
       print GMT "$Rwinb[$i] 0\n $Rwine[$i] 0\n $Rwine[$i] 2\n $Rwinb[$i] 2\n";
       close(GMT);
     }
@@ -508,7 +512,7 @@
 if ($nzline) {
   if ($iplot_win==1) {
     for ($i=0; $i<$nZ; $i++) {
-      open(GMT,"|psxy $proj $bounds -W2 -G220/220/220 -O -K >> $ps_file");
+      open(GMT,"|psxy $proj $bounds $winfo -O -K >> $ps_file");
       print GMT "$Zwinb[$i] 0\n $Zwine[$i] 0\n $Zwine[$i] 2\n $Zwinb[$i] 2\n";
       close(GMT);
     }
@@ -558,7 +562,7 @@
 #`convert $ps_file $jpg_file ; xv $jpg_file &`;
 `ps2pdf $ps_file`;
 #`rm $ps_file`;       # remove PS file
-#system("ghostview ${ps_file} &");
+system("gv ${ps_file} &");
 
 print "done with ${name}.pdf\n";
 



More information about the CIG-COMMITS mailing list