From 201301828402b5b70efde383579359bc914a9787 Mon Sep 17 00:00:00 2001 From: othocaeS Date: Fri, 17 Jun 2016 11:32:34 -0400 Subject: [PATCH] developing script to plot psdlag output for mode=0 --- scripts/lc_plot.pl | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/scripts/lc_plot.pl b/scripts/lc_plot.pl index a1e1d6f..4d1a4b6 100755 --- a/scripts/lc_plot.pl +++ b/scripts/lc_plot.pl @@ -5,15 +5,33 @@ use Encode qw(encode decode); use feature 'say'; use locale; -if !${^UTF8LOCALE} { +if (!${^UTF8LOCALE}) { say "You are not using UTF-8 encoding. :(" } my $charset=$ENV{LANG}; -our $driving_curve_name=decode($charset,$ARGV[0]); -our @reprocessed_curves = []; -while (my $) -our $driving_curve_name=decode($charset,$ARGV[0]); -open $driving_curve_file,$driving_curve_name,< or die $!; +our $outputfilename=decode($charset,$ARGV[0]); +open $outputfile,'<',$outputfilename or die $!; + +my $star_linenum_1=0; +my $star_linenum_2=0; + +my $linenum=0; +while(<$outputfile>) { + $linenum++; + if ($_ =~ /^\*+$/) { + $star_linenum_1=$star_linenum_2; + $star_linenum_2 = $linenum; + } +} +say "Final set found between lines ", + $star_linenum_1, + " and ", + $star_linenum_2; +@power_curve_source = []; +@power_curve_reprocessed = []; +@cross__correlation_power_curve = []; +@phase_difference = []; +