$| = 1; #autoflushing print comands have no buffer print "\nOpto Board Irradiation Quick Plotter\n"; print "\nWhich Optoboard do you want to plot? "; print "\n1) 1103 (AOC 10G) "; print "\n2) 1106 (Optowell) "; print "\n3) 1112 (Optowell) "; print "\n4) 1113 (AOC 5G) \n"; print "\nEnter (1,2,3, or 4): "; chomp(my $selnum = ); if ($selnum == 1) { $boardnum = 1103; $vcsel = "AOC-10G"; } if ($selnum == 2) { $boardnum = 1106; $vcsel = "Optowell"; } if ($selnum == 3) { $boardnum = 1112; $vcsel = "Optowell"; } if ($selnum == 4) { $boardnum = 1113; $vcsel = "AOC-5G"; } print "\nDo you want a key on the plots (y/n)?: "; chomp(my $key = ); print "\nDo you want to make the optical power file (y/n)?: "; chomp(my $makefiles = ); print "\nOnly plot optical powers (y/n)?: "; chomp(my $onlyop = ); #open the data file and create the plot files open(my $in, '<', "$boardnum.tab" ) or die "We can't find the datafle, sorry: $!\n"; #open(my $in, '<', "1107.tab" ) or die "We can't find the datafle, sorry: $!\n"; open(my $out1, '>', "data.1" ) or die "Can't write a junk file: $!\n"; open(my $out2, '>', "data.2" ) or die "Can't write a junk file: $!\n"; open(my $out3, '>', "data.3" ) or die "Can't write a junk file: $!\n"; open(my $out4, '>', "data.4" ) or die "Can't write a junk file: $!\n"; open(my $out5, '>', "data.5" ) or die "Can't write a junk file: $!\n"; open(my $out6, '>', "data.6" ) or die "Can't write a junk file: $!\n"; open(my $out7, '>', "data.7" ) or die "Can't write a junk file: $!\n"; open(my $out8, '>', "clock.1" ) or die "Can't write a junk file: $!\n"; open(my $out9, '>', "clock.2" ) or die "Can't write a junk file: $!\n"; open(my $out10, '>', "clock.3" ) or die "Can't write a junk file: $!\n"; open(my $out11, '>', "clock.4" ) or die "Can't write a junk file: $!\n"; open(my $out12, '>', "clock.5" ) or die "Can't write a junk file: $!\n"; open(my $out13, '>', "clock.6" ) or die "Can't write a junk file: $!\n"; open(my $out14, '>', "clock.7" ) or die "Can't write a junk file: $!\n"; open(my $out15, '>', "ivvdc.1" ) or die "Can't write a junk file: $!\n"; open(my $out16, '>', "ipin.1" ) or die "Can't write a junk file: $!\n"; open(my $out17, '>', "iset.1" ) or die "Can't write a junk file: $!\n"; open(my $out18, '>', "vvdc.1" ) or die "Can't write a junk file: $!\n"; open(my $out19, '>', "e1.1" ) or die "Can't write a junk file: $!\n"; open(my $out20, '>', "e2.1" ) or die "Can't write a junk file: $!\n"; open(my $out21, '>', "e3.1" ) or die "Can't write a junk file: $!\n"; open(my $out22, '>', "e4.1" ) or die "Can't write a junk file: $!\n"; open(my $out23, '>', "e5.1" ) or die "Can't write a junk file: $!\n"; open(my $out24, '>', "e6.1" ) or die "Can't write a junk file: $!\n"; open(my $out25, '>', "e7.1" ) or die "Can't write a junk file: $!\n"; open(my $out26, '>', "te.1" ) or die "Can't write a junk file: $!\n"; open(my $out27, '>', "tsiset1.1" ) or die "Can't write a junk file: $!\n"; open(my $out28, '>', "tsiset2.1" ) or die "Can't write a junk file: $!\n"; open(my $out29, '>', "tsiset3.1" ) or die "Can't write a junk file: $!\n"; open(my $out30, '>', "tsiset4.1" ) or die "Can't write a junk file: $!\n"; open(my $out31, '>', "tsiset5.1" ) or die "Can't write a junk file: $!\n"; open(my $out32, '>', "tsiset6.1" ) or die "Can't write a junk file: $!\n"; open(my $out33, '>', "tsiset7.1" ) or die "Can't write a junk file: $!\n"; open(my $out34, '>', "temp.1" ) or die "Can't write a junk file: $!\n"; open(my $out35, '>', "idim.1" ) or die "Can't write a junk file: $!\n"; open(my $out36, '>', "thresh1.1" ) or die "Can't write a junk file: $!\n"; open(my $out37, '>', "thresh2.1" ) or die "Can't write a junk file: $!\n"; open(my $out38, '>', "thresh3.1" ) or die "Can't write a junk file: $!\n"; open(my $out39, '>', "thresh4.1" ) or die "Can't write a junk file: $!\n"; open(my $out40, '>', "thresh5.1" ) or die "Can't write a junk file: $!\n"; open(my $out41, '>', "thresh6.1" ) or die "Can't write a junk file: $!\n"; open(my $out42, '>', "thresh7.1" ) or die "Can't write a junk file: $!\n"; open(my $out43, '>', "optemp.1" ) or die "Can't write a junk file: $!\n"; open(my $out44, '>', "optemp.2" ) or die "Can't write a junk file: $!\n"; open(my $out45, '>', "optemp.3" ) or die "Can't write a junk file: $!\n"; open(my $out46, '>', "optemp.4" ) or die "Can't write a junk file: $!\n"; open(my $out47, '>', "optemp.5" ) or die "Can't write a junk file: $!\n"; open(my $out48, '>', "optemp.6" ) or die "Can't write a junk file: $!\n"; open(my $out49, '>', "optemp.7" ) or die "Can't write a junk file: $!\n"; open(my $out50, '>', "optemp.8" ) or die "Can't write a junk file: $!\n"; open(my $out51, '>', "optemp.9" ) or die "Can't write a junk file: $!\n"; open(my $out52, '>', "optemp.10" ) or die "Can't write a junk file: $!\n"; open(my $out53, '>', "optemp.11" ) or die "Can't write a junk file: $!\n"; open(my $out54, '>', "optemp.12" ) or die "Can't write a junk file: $!\n"; open(my $out55, '>', "optemp.13" ) or die "Can't write a junk file: $!\n"; open(my $out56, '>', "optemp.14" ) or die "Can't write a junk file: $!\n"; my $n = 0; my $place = 0; # read in the data file (every line) foreach (<$in>) { $n++; my ($timestamp,$board,$notes,$bias1,$dp1,$cp1,$bias2,$dp2,$cp2,$bias3,$dp3,$cp3,$bias4,$dp4,$cp4,$bias5,$dp5,$cp5,$bias6,$dp6,$cp6,$bias7,$dp7,$cp7,$ivvdc,$ipin,$iset,$vvdc,$e1,$e2,$e3,$e4,$e5,$e6,$e7,$te,$tsiset1,$tsiset2,$tsiset3,$tsiset4,$tsiset5,$tsiset6,$tsiset7,$temp,$idim,$zero,$thresh1,$thresh2,$thresh3,$thresh4,$thresh5,$thresh6,$thresh7) = split /\t/; # adjust the time stamp to 24hr time @datestamp = split(/\s/,$timestamp); $datestamp = @datestamp[0]; $timestamp = @datestamp[1]; $ampm = @datestamp[2]; if($ampm eq "PM") { @mst = split(/:/,$timestamp); $mst = $mst[0]; $mins = $mst[1]; if ($mst == 12) { $mst = $mst; } else { $mst = $mst + 12; } $timestamp = $mst.":".$mins; } if($ampm eq "AM") { $timestamp=$timestamp; @mst = split(/:/,$timestamp); $mst = $mst[0]; $mins = $mst[1]; if($mst == 12) { $mst = 0; } $timestamp=$mst.":".$mins; } # save the data points print $out1 "$datestamp\t$timestamp\t$dp1\n"; print $out2 "$datestamp\t$timestamp\t$dp2\n"; print $out3 "$datestamp\t$timestamp\t$dp3\n"; print $out4 "$datestamp\t$timestamp\t$dp4\n"; print $out5 "$datestamp\t$timestamp\t$dp5\n"; print $out6 "$datestamp\t$timestamp\t$dp6\n"; print $out7 "$datestamp\t$timestamp\t$dp7\n"; print $out8 "$datestamp\t$timestamp\t$cp1\n"; print $out9 "$datestamp\t$timestamp\t$cp2\n"; print $out10 "$datestamp\t$timestamp\t$cp3\n"; print $out11 "$datestamp\t$timestamp\t$cp4\n"; print $out12 "$datestamp\t$timestamp\t$cp5\n"; print $out13 "$datestamp\t$timestamp\t$cp6\n"; print $out14 "$datestamp\t$timestamp\t$cp7\n"; print $out15 "$datestamp\t$timestamp\t$ivvdc\n"; print $out16 "$datestamp\t$timestamp\t$ipin\n"; print $out17 "$datestamp\t$timestamp\t$iset\n"; print $out18 "$datestamp\t$timestamp\t$vvdc\n"; print $out19 "$datestamp\t$timestamp\t$e1\n"; print $out20 "$datestamp\t$timestamp\t$e2\n"; print $out21 "$datestamp\t$timestamp\t$e3\n"; print $out22 "$datestamp\t$timestamp\t$e4\n"; print $out23 "$datestamp\t$timestamp\t$e5\n"; print $out24 "$datestamp\t$timestamp\t$e6\n"; print $out25 "$datestamp\t$timestamp\t$e7\n"; print $out26 "$datestamp\t$timestamp\t$te\n"; print $out27 "$datestamp\t$timestamp\t$tsiset1\n"; print $out28 "$datestamp\t$timestamp\t$tsiset2\n"; print $out29 "$datestamp\t$timestamp\t$tsiset3\n"; print $out30 "$datestamp\t$timestamp\t$tsiset4\n"; print $out31 "$datestamp\t$timestamp\t$tsiset5\n"; print $out32 "$datestamp\t$timestamp\t$tsiset6\n"; print $out33 "$datestamp\t$timestamp\t$tsiset7\n"; print $out34 "$datestamp\t$timestamp\t$temp\n"; print $out35 "$datestamp\t$timestamp\t$idim\n"; print $out36 "$datestamp\t$timestamp\t$thresh1\n"; print $out37 "$datestamp\t$timestamp\t$thresh2\n"; print $out38 "$datestamp\t$timestamp\t$thresh3\n"; print $out39 "$datestamp\t$timestamp\t$thresh4\n"; print $out40 "$datestamp\t$timestamp\t$thresh5\n"; print $out41 "$datestamp\t$timestamp\t$thresh6\n"; print $out42 "$datestamp\t$timestamp\t$thresh7\n"; print $out43 "$temp\t$dp1\n"; print $out44 "$temp\t$dp2\n"; print $out45 "$temp\t$dp3\n"; print $out46 "$temp\t$dp4\n"; print $out47 "$temp\t$dp5\n"; print $out48 "$temp\t$dp6\n"; print $out49 "$temp\t$dp7\n"; print $out50 "$temp\t$cp1\n"; print $out51 "$temp\t$cp2\n"; print $out52 "$temp\t$cp3\n"; print $out53 "$temp\t$cp4\n"; print $out54 "$temp\t$cp5\n"; print $out55 "$temp\t$cp6\n"; print $out56 "$temp\t$cp7\n"; } close($in); close($out1); close($out2); close($out3); close($out4); close($out5); close($out6); close($out7); close($out8); close($out9); close($out10); close($out11); close($ou12); close($out13); close($out14); close($out15); close($out16); close($out17); close($out18); close($out19); close($out20); close($out21); close($out22); close($out23); close($out24); close($out25); close($out26); close($out27); close($out28); close($out29); close($out30); close($out31); close($out32); close($out33); close($out34); close($out35); close($out36); close($out37); close($out38); close($out39); close($out40); close($out41); close($out42); close($out43); close($out44); close($out45); close($out46); close($out47); close($out48); close($out49); close($out50); close($out51); close($out52); close($out53); close($out54); close($out55); close($out56); # plot the optical powers # write the command file for gnuplot open($out, '>', "gnuplotcommand.xxx") or die "Can't write 'gnuplotcommand.xxx': $!\n"; if($makefiles =~ /y/) { print $out "set terminal png\n"; print $out "set output 'optical-powers-$boardnum-$vcsel.png'\n"; } print $out "set xdata time\n"; print $out "set timefmt '%m/%d/%Y\t%H:%M'\n"; #lets the plot know the format of the time stamp print $out "set format x '%m/%d-%H:%M'\n"; # tells the plot what to display print $out "set title '$boardnum ($vcsel)' font 'Helvetica,12'\n"; #print $out "set title '$boardnum ($vcsel)'\n"; print $out "set ylabel 'Optical Power (mW)' font 'Helvetica,12'\n"; #print $out "set ylabel 'Optical Power (mW)'\n"; print $out "set yrange [0:*]\n"; # plots from zero to auto #print $out "set ytics autofreq font Helvetica,12\n"; print $out "set ytics autofreq\n"; if ($key =~ /y/) { print $out "set key outside\n"; } else { print $out "set key 1000000000,20000000000,2000000000\n"; } print $out "set xtics nomirror rotate 90\n"; #rotate the x tick marks #print $out "set xtics autofreq font 'Helvetica,12'\n"; print $out "set xtics autofreq\n"; print $out "plot 'data.1' using 1:3,'data.2' using 1:3, 'data.3' using 1:3, 'data.4' using 1:3, 'data.5' using 1:3, 'data.6' using 1:3, 'data.7' using 1:3 , 'clock.1' using 1:3, 'clock.2' using 1:3, 'clock.3' using 1:3, 'clock.4' using 1:3, 'clock.5' using 1:3, 'clock.6' using 1:3, 'clock.7' using 1:3\n"; close($out); #run gnuplot system("gnuplot -persist gnuplotcommand.xxx"); #delete the temp files unlink("gnuplotcommand.xxx"); unlink("data.1","data.2","data.3","data.4","data.5","data.6","data.7"); unlink("clock.1","clock.2","clock.3","clock.4","clock.5","clock.6","clock.7"); if ($onlyop =~ /n/) { # plot ivvdc # write the command file for gnuplot open($out, '>', "gnuplotcommand.xxx") or die "Can't write 'gnuplotcommand.xxx': $!\n"; print $out "set xdata time\n"; print $out "set timefmt '%m/%d/%Y\t%H:%M'\n"; #lets the plot know the format of the time stamp print $out "set format x '%m/%d-%H:%M'\n"; # tells the plot what to display #print $out "set title '$boardnum ($vcsel)' font 'Helvetica,12'\n"; print $out "set title '$boardnum ($vcsel)'\n"; #print $out "set ylabel 'Optical Power (mW)' font 'Helvetica,12'\n"; print $out "set ylabel 'I_VVDC (mA)'\n"; #print $out "set yrange [0:*]\n"; # plots from zero to auto #print $out "set ytics autofreq font 'Helvetica,12'\n"; print $out "set ytics autofreq\n"; if ($key =~ /y/) { print $out "set key outside\n"; } else { print $out "set key 1000000000,20000000000,2000000000\n"; } print $out "set xtics nomirror rotate 90\n"; #rotate the x tick marks #print $out "set xtics autofreq font 'Helvetica,12'\n"; print $out "set xtics autofreq\n"; print $out "plot 'ivvdc.1' using 1:3\n"; close($out); #run gnuplot system("gnuplot -persist gnuplotcommand.xxx"); #delete the temp files unlink("gnuplotcommand.xxx"); } unlink("ivvdc.1"); if ($onlyop =~ /n/) { # plot ipin # write the command file for gnuplot open($out, '>', "gnuplotcommand.xxx") or die "Can't write 'gnuplotcommand.xxx': $!\n"; print $out "set xdata time\n"; print $out "set timefmt '%m/%d/%Y\t%H:%M'\n"; #lets the plot know the format of the time stamp print $out "set format x '%m/%d-%H:%M'\n"; # tells the plot what to display #print $out "set title '$boardnum ($vcsel)' font 'Helvetica,12'\n"; print $out "set title '$boardnum ($vcsel)'\n"; #print $out "set ylabel 'Optical Power (mW)' font 'Helvetica,12'\n"; print $out "set ylabel 'I_pin (uA)'\n"; #print $out "set yrange [0:*]\n"; # plots from zero to auto #print $out "set ytics autofreq font 'Helvetica,12'\n"; print $out "set ytics autofreq\n"; if ($key =~ /y/) { print $out "set key outside\n"; } else { print $out "set key 1000000000,20000000000,2000000000\n"; } print $out "set xtics nomirror rotate 90\n"; #rotate the x tick marks #print $out "set xtics autofreq font 'Helvetica,12'\n"; print $out "set xtics autofreq\n"; print $out "plot 'ipin.1' using 1:3\n"; close($out); #run gnuplot system("gnuplot -persist gnuplotcommand.xxx"); #delete the temp files unlink("gnuplotcommand.xxx"); } unlink("ipin.1"); if ($onlyop =~ /n/) { # plot iset # write the command file for gnuplot open($out, '>', "gnuplotcommand.xxx") or die "Can't write 'gnuplotcommand.xxx': $!\n"; print $out "set xdata time\n"; print $out "set timefmt '%m/%d/%Y\t%H:%M'\n"; #lets the plot know the format of the time stamp print $out "set format x '%m/%d-%H:%M'\n"; # tells the plot what to display #print $out "set title '$boardnum ($vcsel)' font 'Helvetica,12'\n"; print $out "set title '$boardnum ($vcsel)'\n"; #print $out "set ylabel 'Optical Power (mW)' font 'Helvetica,12'\n"; print $out "set ylabel 'I_set (mA)'\n"; #print $out "set yrange [0:*]\n"; # plots from zero to auto #print $out "set ytics autofreq font 'Helvetica,12'\n"; print $out "set ytics autofreq\n"; if ($key =~ /y/) { print $out "set key outside\n"; } else { print $out "set key 1000000000,20000000000,2000000000\n"; } print $out "set xtics nomirror rotate 90\n"; #rotate the x tick marks #print $out "set xtics autofreq font 'Helvetica,12'\n"; print $out "set xtics autofreq\n"; print $out "plot 'iset.1' using 1:3\n"; close($out); #run gnuplot system("gnuplot -persist gnuplotcommand.xxx"); #delete the temp files unlink("gnuplotcommand.xxx"); } unlink("iset.1"); if ($onlyop =~ /n/) { # plot vvdc # write the command file for gnuplot open($out, '>', "gnuplotcommand.xxx") or die "Can't write 'gnuplotcommand.xxx': $!\n"; print $out "set xdata time\n"; print $out "set timefmt '%m/%d/%Y\t%H:%M'\n"; #lets the plot know the format of the time stamp print $out "set format x '%m/%d-%H:%M'\n"; # tells the plot what to display #print $out "set title '$boardnum ($vcsel)' font 'Helvetica,12'\n"; print $out "set title '$boardnum ($vcsel)'\n"; #print $out "set ylabel 'Optical Power (mW)' font 'Helvetica,12'\n"; print $out "set ylabel 'VVDC (V)'\n"; #print $out "set yrange [0:*]\n"; # plots from zero to auto #print $out "set ytics autofreq font 'Helvetica,12'\n"; print $out "set ytics autofreq\n"; if ($key =~ /y/) { print $out "set key outside\n"; } else { print $out "set key 1000000000,20000000000,2000000000\n"; } print $out "set xtics nomirror rotate 90\n"; #rotate the x tick marks #print $out "set xtics autofreq font 'Helvetica,12'\n"; print $out "set xtics autofreq\n"; print $out "plot 'vvdc.1' using 1:3\n"; close($out); #run gnuplot system("gnuplot -persist gnuplotcommand.xxx"); #delete the temp files unlink("gnuplotcommand.xxx"); } unlink("vvdc.1"); if ($onlyop =~ /n/) { # plot errors per channel # write the command file for gnuplot open($out, '>', "gnuplotcommand.xxx") or die "Can't write 'gnuplotcommand.xxx': $!\n"; print $out "set xdata time\n"; print $out "set timefmt '%m/%d/%Y\t%H:%M'\n"; #lets the plot know the format of the time stamp print $out "set format x '%m/%d-%H:%M'\n"; # tells the plot what to display #print $out "set title '$boardnum ($vcsel)' font 'Helvetica,12'\n"; print $out "set title '$boardnum ($vcsel)'\n"; #print $out "set ylabel 'Optical Power (mW)' font 'Helvetica,12'\n"; print $out "set ylabel 'errors (in 100ms)'\n"; print $out "set yrange [0:*]\n"; # plots from zero to auto #print $out "set ytics autofreq font 'Helvetica,12'\n"; print $out "set ytics autofreq\n"; if ($key =~ /y/) { print $out "set key outside\n"; } else { print $out "set key 1000000000,20000000000,2000000000\n"; } print $out "set xtics nomirror rotate 90\n"; #rotate the x tick marks #print $out "set xtics autofreq font 'Helvetica,12'\n"; print $out "set xtics autofreq\n"; print $out "plot 'e1.1' using 1:3,'e2.1' using 1:3,'e3.1' using 1:3,'e4.1' using 1:3,'e5.1' using 1:3,'e6.1' using 1:3,'e7.1' using 1:3\n"; close($out); #run gnuplot system("gnuplot -persist gnuplotcommand.xxx"); #delete the temp files unlink("gnuplotcommand.xxx"); } unlink("e1.1","e2.1","e3.1","e4.1","e5.1","e6.1","e7.1"); if ($onlyop =~ /n/) { # plot total errors # write the command file for gnuplot open($out, '>', "gnuplotcommand.xxx") or die "Can't write 'gnuplotcommand.xxx': $!\n"; print $out "set xdata time\n"; print $out "set timefmt '%m/%d/%Y\t%H:%M'\n"; #lets the plot know the format of the time stamp print $out "set format x '%m/%d-%H:%M'\n"; # tells the plot what to display print $out "set title '$boardnum ($vcsel)' font 'Helvetica,12'\n"; print $out "set title '$boardnum ($vcsel)'\n"; #print $out "set ylabel 'Optical Power (mW)' font 'Helvetica,12'\n"; print $out "set ylabel 'total errors on Opto Board (in 100ms)'\n"; print $out "set yrange [0:*]\n"; # plots from zero to auto #print $out "set ytics autofreq font 'Helvetica,12'\n"; print $out "set ytics autofreq\n"; if ($key =~ /y/) { print $out "set key outside\n"; } else { print $out "set key 1000000000,20000000000,2000000000\n"; } print $out "set xtics nomirror rotate 90\n"; #rotate the x tick marks #print $out "set xtics autofreq font 'Helvetica,12'\n"; print $out "set xtics autofreq\n"; print $out "plot 'te.1' using 1:3\n"; close($out); #run gnuplot system("gnuplot -persist gnuplotcommand.xxx"); #delete the temp files unlink("gnuplotcommand.xxx"); } unlink("te.1"); if ($onlyop =~ /n/) { # plot test stand iset # write the command file for gnuplot open($out, '>', "gnuplotcommand.xxx") or die "Can't write 'gnuplotcommand.xxx': $!\n"; print $out "set xdata time\n"; print $out "set timefmt '%m/%d/%Y\t%H:%M'\n"; #lets the plot know the format of the time stamp print $out "set format x '%m/%d-%H:%M'\n"; # tells the plot what to display #print $out "set title '$boardnum ($vcsel)' font 'Helvetica,12'\n"; print $out "set title '$boardnum ($vcsel)'\n"; #print $out "set ylabel 'Optical Power (mW)' font 'Helvetica,12'\n"; print $out "set ylabel 'Test Stand Iset'\n"; print $out "set yrange [0:*]\n"; # plots from zero to auto #print $out "set ytics autofreq font 'Helvetica,12'\n"; print $out "set ytics autofreq\n"; if ($key =~ /y/) { print $out "set key outside\n"; } else { print $out "set key 1000000000,20000000000,2000000000\n"; } print $out "set xtics nomirror rotate 90\n"; #rotate the x tick marks #print $out "set xtics autofreq font 'Helvetica,12'\n"; print $out "set xtics autofreq\n"; print $out "plot 'tsiset1.1' using 1:3,'tsiset2.1' using 1:3,'tsiset3.1' using 1:3,'tsiset4.1' using 1:3,'tsiset5.1' using 1:3,'tsiset6.1' using 1:3,'tsiset7.1' using 1:3\n"; close($out); #run gnuplot system("gnuplot -persist gnuplotcommand.xxx"); #delete the temp files unlink("gnuplotcommand.xxx"); } unlink("tsiset1.1","tsiset2.1","tsiset3.1","tsiset4.1","tsiset5.1","tsiset6.1","tsiset7.1"); if ($onlyop =~ /n/) { # plot test stand iset # write the command file for gnuplot open($out, '>', "gnuplotcommand.xxx") or die "Can't write 'gnuplotcommand.xxx': $!\n"; print $out "set xdata time\n"; print $out "set timefmt '%m/%d/%Y\t%H:%M'\n"; #lets the plot know the format of the time stamp print $out "set format x '%m/%d-%H:%M'\n"; # tells the plot what to display #print $out "set title '$boardnum ($vcsel)' font 'Helvetica,12'\n"; print $out "set title '$boardnum ($vcsel)'\n"; #print $out "set ylabel 'Optical Power (mW)' font 'Helvetica,12'\n"; print $out "set ylabel 'Test Stand Iset'\n"; print $out "set yrange [0:*]\n"; # plots from zero to auto #print $out "set ytics autofreq font 'Helvetica,12'\n"; print $out "set ytics autofreq\n"; if ($key =~ /y/) { print $out "set key outside\n"; } else { print $out "set key 1000000000,20000000000,2000000000\n"; } print $out "set xtics nomirror rotate 90\n"; #rotate the x tick marks #print $out "set xtics autofreq font 'Helvetica,12'\n"; print $out "set xtics autofreq\n"; print $out "plot 'tsiset1.1' using 1:3,'tsiset2.1' using 1:3,'tsiset3.1' using 1:3,'tsiset4.1' using 1:3,'tsiset5.1' using 1:3,'tsiset6.1' using 1:3,'tsiset7.1' using 1:3\n"; close($out); #run gnuplot system("gnuplot -persist gnuplotcommand.xxx"); #delete the temp files unlink("gnuplotcommand.xxx"); } unlink("tsiset1.1","tsiset2.1","tsiset3.1","tsiset4.1","tsiset5.1","tsiset6.1","tsiset7.1"); if ($onlyop =~ /n/) { # plot temp # write the command file for gnuplot open($out, '>', "gnuplotcommand.xxx") or die "Can't write 'gnuplotcommand.xxx': $!\n"; print $out "set xdata time\n"; print $out "set timefmt '%m/%d/%Y\t%H:%M'\n"; #lets the plot know the format of the time stamp print $out "set format x '%m/%d-%H:%M'\n"; # tells the plot what to display #print $out "set title '$boardnum ($vcsel)' font 'Helvetica,12'\n"; print $out "set title '$boardnum ($vcsel)'\n"; #print $out "set ylabel 'Temperature (C)' font 'Helvetica,12'\n"; print $out "set ylabel 'Temperature (C)'\n"; #print $out "set yrange [0:*]\n"; # plots from zero to auto #print $out "set ytics autofreq font 'Helvetica,12'\n"; print $out "set ytics autofreq\n"; if ($key =~ /y/) { print $out "set key outside\n"; } else { print $out "set key 1000000000,20000000000,2000000000\n"; } print $out "set xtics nomirror rotate 90\n"; #rotate the x tick marks #print $out "set xtics autofreq font 'Helvetica,12'\n"; print $out "set xtics autofreq\n"; print $out "plot 'temp.1' using 1:3\n"; close($out); #run gnuplot system("gnuplot -persist gnuplotcommand.xxx"); #delete the temp files unlink("gnuplotcommand.xxx"); } unlink("temp.1"); if ($onlyop =~ /n/) { # plot idim # write the command file for gnuplot open($out, '>', "gnuplotcommand.xxx") or die "Can't write 'gnuplotcommand.xxx': $!\n"; print $out "set xdata time\n"; print $out "set timefmt '%m/%d/%Y\t%H:%M'\n"; #lets the plot know the format of the time stamp print $out "set format x '%m/%d-%H:%M'\n"; # tells the plot what to display #print $out "set title '$boardnum ($vcsel)' font 'Helvetica,12'\n"; print $out "set title '$boardnum ($vcsel)'\n"; #print $out "set ylabel 'GaAs PIN Idim (uA)' font 'Helvetica,12'\n"; print $out "set ylabel 'GaAs PIN Idim (uA)'\n"; #print $out "set yrange [0:*]\n"; # plots from zero to auto #print $out "set ytics autofreq font 'Helvetica,12'\n"; print $out "set ytics autofreq\n"; if ($key =~ /y/) { print $out "set key outside\n"; } else { print $out "set key 1000000000,20000000000,2000000000\n"; } print $out "set xtics nomirror rotate 90\n"; #rotate the x tick marks #print $out "set xtics autofreq font 'Helvetica,12'\n"; print $out "set xtics autofreq\n"; print $out "plot 'idim.1' using 1:3\n"; close($out); #run gnuplot system("gnuplot -persist gnuplotcommand.xxx"); #delete the temp files unlink("gnuplotcommand.xxx"); } unlink("idim.1"); if ($onlyop =~ /n/) { # plot thresholds # write the command file for gnuplot open($out, '>', "gnuplotcommand.xxx") or die "Can't write 'gnuplotcommand.xxx': $!\n"; print $out "set xdata time\n"; print $out "set timefmt '%m/%d/%Y\t%H:%M'\n"; #lets the plot know the format of the time stamp print $out "set format x '%m/%d-%H:%M'\n"; # tells the plot what to display #print $out "set title '$boardnum ($vcsel)' font 'Helvetica,12'\n"; print $out "set title '$boardnum ($vcsel)'\n"; #print $out "set ylabel 'Optical Power (mW)' font 'Helvetica,12'\n"; print $out "set ylabel 'BER Threshod (uA)'\n"; print $out "set yrange [0:*]\n"; # plots from zero to auto #print $out "set ytics autofreq font 'Helvetica,12'\n"; print $out "set ytics autofreq\n"; if ($key =~ /y/) { print $out "set key outside\n"; } else { print $out "set key 1000000000,20000000000,2000000000\n"; } print $out "set xtics nomirror rotate 90\n"; #rotate the x tick marks #print $out "set xtics autofreq font 'Helvetica,12'\n"; print $out "set xtics autofreq\n"; print $out "plot 'thresh1.1' using 1:3,'thresh2.1' using 1:3,'thresh3.1' using 1:3,'thresh4.1' using 1:3,'thresh5.1' using 1:3,'thresh6.1' using 1:3,'thresh7.1' using 1:3\n"; close($out); #run gnuplot system("gnuplot -persist gnuplotcommand.xxx"); #delete the temp files unlink("gnuplotcommand.xxx"); } unlink("thresh1.1","thresh2.1","thresh3.1","thresh4.1","thresh5.1","thresh6.1","thresh7.1"); if ($onlyop =~ /n/) { # plot optical power vs temp # write the command file for gnuplot open($out, '>', "gnuplotcommand.xxx") or die "Can't write 'gnuplotcommand.xxx': $!\n"; print $out "set title '$boardnum ($vcsel)'\n"; print $out "set ylabel 'Optical Power (mW)'\n"; print $out "set xlabel 'Temperature (C)'\n"; if ($key =~ /y/) { print $out "set key outside\n"; } else { print $out "set key 1000000000,20000000000,2000000000\n"; } print $out "plot 'optemp.1','optemp.2','optemp.3','optemp.4','optemp.5','optemp.6','optemp.7','optemp.8','optemp.9','optemp.10','optemp.11','optemp.12','optemp.13','optemp.14'\n"; close($out); #run gnuplot system("gnuplot -persist gnuplotcommand.xxx"); #delete the temp files unlink("gnuplotcommand.xxx"); } unlink("optemp.1","optemp.2","optemp.3","optemp.4","optemp.5","optemp.6","optemp.7","optemp.8","optemp.9","optemp.10","optemp.11","optemp.12","optemp.13","optemp.14");