From 7e53d636e48e53195438f0b78ff26d8198d77fe3 Mon Sep 17 00:00:00 2001 From: caes Date: Tue, 21 Jun 2016 05:07:31 -0400 Subject: [PATCH] added gnuplot script and modified some things --- inputfiles/calibration_final | 10 +++++----- scripts/gnuplot/psd_freq | 19 +++++++++++++++++++ scripts/power_lag_plot.pl | 24 ++++++++++++------------ 3 files changed, 36 insertions(+), 17 deletions(-) create mode 100644 scripts/gnuplot/psd_freq diff --git a/inputfiles/calibration_final b/inputfiles/calibration_final index 981e6a5..bb09f06 100644 --- a/inputfiles/calibration_final +++ b/inputfiles/calibration_final @@ -1,10 +1,10 @@ 2 -data/calibration/lc_drive.dat 0 -data/calibration/lc_1.dat 0 +data/calibration/lc_drive.dat 0 +data/calibration/lc_1.dat 0 8 0.005 0.019 0.0425 0.07 0.11 0.17 0.24 0.4 0.603 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 -0:1 1 -0 -0 +0:1 1 +0 +0 100 50 50 mcmc.dat \ No newline at end of file diff --git a/scripts/gnuplot/psd_freq b/scripts/gnuplot/psd_freq new file mode 100644 index 0000000..2ecbdd1 --- /dev/null +++ b/scripts/gnuplot/psd_freq @@ -0,0 +1,19 @@ + + +# plot 'file' with errorbars +# plot 'file' using 1:2:(sqrt($1)) with xerrorbars +# plot 'file' using 1:2:($1-$3):($1+$3):4:5 with xyerrorbars + +#plot 'tmp.sourcePSD' using 1:2:3:4 with xyerrorbars +plot 'tmp.reprocPSD' using 1:2:3:4 with xyerrorbars +#plot 'tmp.ccPSD' using 1:2:3:4 with xyerrorbars +set logscale xy +set xrange [0.005:0.603] +# set yrange [:1] +# (x, y, ydelta), +# (x, y, ylow, yhigh), +# (x, y, xdelta), +# (x, y, xlow, xhigh), +# (x, y, xdelta, ydelta), or +# (x, y, xlow, xhigh, ylow, yhigh). + pause -1 \ No newline at end of file diff --git a/scripts/power_lag_plot.pl b/scripts/power_lag_plot.pl index d872804..d368d9d 100755 --- a/scripts/power_lag_plot.pl +++ b/scripts/power_lag_plot.pl @@ -112,10 +112,10 @@ foreach ( sort { $a <=> $b } keys %function_bin ) { my $μ = my $σ = <$outputfile>; $μ =~ s/^([\-\+e0-9\.]+)+\s+[\-\+e0-9\.]+\s*$/$1/; $σ =~ s/^[\-\+e0-9\.]+\s+([\-\+e0-9\.]+)\s*$/$1/; - if ($μ<0) { - $μ = abs($μ); - $function_bin{$_}{"φdiff_μ"} = PI; - } +# if ($μ<0) { +# $μ = abs($μ); +# $function_bin{$_}{"φdiff_μ"} = PI; +# } $function_bin{$_}{"source_PSD_μ"} = $μ; $function_bin{$_}{"source_PSD_σ"} = $σ; if ($debug) { @@ -135,10 +135,10 @@ foreach ( sort { $a <=> $b } keys %function_bin ) { my $μ = my $σ = <$outputfile>; $μ =~ s/^([\-\+e0-9\.]+)+\s+[\-\+e0-9\.]+\s*$/$1/; $σ =~ s/^[\-\+e0-9\.]+\s+([\-\+e0-9\.]+)\s*$/$1/; - if ($μ<0) { - $μ = abs($μ); - $function_bin{$_}{"φdiff_μ"} = PI; - } +# if ($μ<0) { +# $μ = abs($μ); +# $function_bin{$_}{"φdiff_μ"} = PI; +# } $function_bin{$_}{"reproc_PSD_μ"} = $μ; $function_bin{$_}{"reproc_PSD_σ"} = $σ; if ($debug) { @@ -159,10 +159,10 @@ foreach ( sort { $a <=> $b } keys %function_bin ) { my $μ = my $σ = <$outputfile>; $μ =~ s/^([\-\+e0-9\.]+)+\s+[\-\+e0-9\.]+\s*$/$1/; $σ =~ s/^[\-\+e0-9\.]+\s+([\-\+e0-9\.]+)\s*$/$1/; - if ($μ<0) { - $μ = abs($μ); - $function_bin{$_}{"φdiff_μ"} = PI; - } +# if ($μ<0) { +# $μ = abs($μ); +# $function_bin{$_}{"φdiff_μ"} = PI; +# } $function_bin{$_}{"cc_PSD_μ"} = $μ; $function_bin{$_}{"cc_PSD_σ"} = $σ; if ($debug) {