added gnuplot script and modified some things

This commit is contained in:
caes 2016-06-21 05:07:31 -04:00
parent 9055ee9b6e
commit 7e53d636e4
3 changed files with 36 additions and 17 deletions

19
scripts/gnuplot/psd_freq Normal file
View File

@ -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

View File

@ -112,10 +112,10 @@ foreach ( sort { $a <=> $b } keys %function_bin ) {
my $μ = my $σ = <$outputfile>; my $μ = my $σ = <$outputfile>;
$μ =~ s/^([\-\+e0-9\.]+)+\s+[\-\+e0-9\.]+\s*$/$1/; $μ =~ s/^([\-\+e0-9\.]+)+\s+[\-\+e0-9\.]+\s*$/$1/;
$σ =~ s/^[\-\+e0-9\.]+\s+([\-\+e0-9\.]+)\s*$/$1/; $σ =~ s/^[\-\+e0-9\.]+\s+([\-\+e0-9\.]+)\s*$/$1/;
if ($μ<0) { # if ($μ<0) {
$μ = abs($μ); # $μ = abs($μ);
$function_bin{$_}{"φdiff_μ"} = PI; # $function_bin{$_}{"φdiff_μ"} = PI;
} # }
$function_bin{$_}{"source_PSD_μ"} = $μ; $function_bin{$_}{"source_PSD_μ"} = $μ;
$function_bin{$_}{"source_PSD_σ"} = $σ; $function_bin{$_}{"source_PSD_σ"} = $σ;
if ($debug) { if ($debug) {
@ -135,10 +135,10 @@ foreach ( sort { $a <=> $b } keys %function_bin ) {
my $μ = my $σ = <$outputfile>; my $μ = my $σ = <$outputfile>;
$μ =~ s/^([\-\+e0-9\.]+)+\s+[\-\+e0-9\.]+\s*$/$1/; $μ =~ s/^([\-\+e0-9\.]+)+\s+[\-\+e0-9\.]+\s*$/$1/;
$σ =~ s/^[\-\+e0-9\.]+\s+([\-\+e0-9\.]+)\s*$/$1/; $σ =~ s/^[\-\+e0-9\.]+\s+([\-\+e0-9\.]+)\s*$/$1/;
if ($μ<0) { # if ($μ<0) {
$μ = abs($μ); # $μ = abs($μ);
$function_bin{$_}{"φdiff_μ"} = PI; # $function_bin{$_}{"φdiff_μ"} = PI;
} # }
$function_bin{$_}{"reproc_PSD_μ"} = $μ; $function_bin{$_}{"reproc_PSD_μ"} = $μ;
$function_bin{$_}{"reproc_PSD_σ"} = $σ; $function_bin{$_}{"reproc_PSD_σ"} = $σ;
if ($debug) { if ($debug) {
@ -159,10 +159,10 @@ foreach ( sort { $a <=> $b } keys %function_bin ) {
my $μ = my $σ = <$outputfile>; my $μ = my $σ = <$outputfile>;
$μ =~ s/^([\-\+e0-9\.]+)+\s+[\-\+e0-9\.]+\s*$/$1/; $μ =~ s/^([\-\+e0-9\.]+)+\s+[\-\+e0-9\.]+\s*$/$1/;
$σ =~ s/^[\-\+e0-9\.]+\s+([\-\+e0-9\.]+)\s*$/$1/; $σ =~ s/^[\-\+e0-9\.]+\s+([\-\+e0-9\.]+)\s*$/$1/;
if ($μ<0) { # if ($μ<0) {
$μ = abs($μ); # $μ = abs($μ);
$function_bin{$_}{"φdiff_μ"} = PI; # $function_bin{$_}{"φdiff_μ"} = PI;
} # }
$function_bin{$_}{"cc_PSD_μ"} = $μ; $function_bin{$_}{"cc_PSD_μ"} = $μ;
$function_bin{$_}{"cc_PSD_σ"} = $σ; $function_bin{$_}{"cc_PSD_σ"} = $σ;
if ($debug) { if ($debug) {