mirror of
https://asciireactor.com/otho/psdlag-agn.git
synced 2024-11-22 09:15:07 +00:00
converting to use of perl records
This commit is contained in:
parent
a66b3bb1d1
commit
ee2a2f5186
@ -64,16 +64,16 @@ if ($debug) {
|
|||||||
# These arrays store the various quantities of interest.
|
# These arrays store the various quantities of interest.
|
||||||
@freq_coords_avg = [];
|
@freq_coords_avg = [];
|
||||||
@freq_coords_err = [];
|
@freq_coords_err = [];
|
||||||
@power_curve_source_avg = [];
|
@arr_power_curve_source_avg = [];
|
||||||
@power_curve_source_err = [];
|
@arr_power_curve_source_err = [];
|
||||||
@power_curve_reprocessed_avg = [];
|
@arr_power_curve_reprocessed_avg = [];
|
||||||
@power_curve_reprocessed_err = [];
|
@arr_power_curve_reprocessed_err = [];
|
||||||
@cross_correlation_power_curve_avg = [];
|
@arr_cross_correlation_power_curve_avg = [];
|
||||||
@cross_correlation_power_curve_err = [];
|
@arr_cross_correlation_power_curve_err = [];
|
||||||
@phase_difference_avg = [];
|
@arr_phase_difference_avg = [];
|
||||||
@phase_difference_err = [];
|
@arr_phase_difference_err = [];
|
||||||
@time_lag_avg = [];
|
@arr_time_lag_avg = [];
|
||||||
@time_lag_err = [];
|
@arr_time_lag_err = [];
|
||||||
|
|
||||||
# This captures the frequency bins.
|
# This captures the frequency bins.
|
||||||
my $upper_bound = 0;
|
my $upper_bound = 0;
|
||||||
@ -110,8 +110,8 @@ while (<$outputfile>) {
|
|||||||
print encode($charset,"Driving light curve power from $_");
|
print encode($charset,"Driving light curve power from $_");
|
||||||
say encode($charset,"Average: $avg, Err: $err");
|
say encode($charset,"Average: $avg, Err: $err");
|
||||||
}
|
}
|
||||||
push(@power_curve_source_avg,$avg);
|
push(@arr_power_curve_source_avg,$avg);
|
||||||
push(@power_curve_source_err,$err);
|
push(@arr_power_curve_source_err,$err);
|
||||||
$mode++;
|
$mode++;
|
||||||
}
|
}
|
||||||
case 1 {
|
case 1 {
|
||||||
@ -122,8 +122,8 @@ while (<$outputfile>) {
|
|||||||
print encode($charset,"Reprocessed light curve power from $_");
|
print encode($charset,"Reprocessed light curve power from $_");
|
||||||
say encode($charset,"Average: $avg, Err: $err");
|
say encode($charset,"Average: $avg, Err: $err");
|
||||||
}
|
}
|
||||||
push(@power_curve_reprocessed_avg,$avg);
|
push(@arr_power_curve_reprocessed_avg,$avg);
|
||||||
push(@power_curve_reprocessed_err,$err);
|
push(@arr_power_curve_reprocessed_err,$err);
|
||||||
$mode++;
|
$mode++;
|
||||||
}
|
}
|
||||||
case 2 {
|
case 2 {
|
||||||
@ -134,8 +134,8 @@ while (<$outputfile>) {
|
|||||||
print encode($charset,"Cross-Correlation from $_");
|
print encode($charset,"Cross-Correlation from $_");
|
||||||
say encode($charset,"Average: $avg, Err: $err");
|
say encode($charset,"Average: $avg, Err: $err");
|
||||||
}
|
}
|
||||||
push(@cross_correlation_power_curve_avg,$avg);
|
push(@arr_cross_correlation_power_curve_avg,$avg);
|
||||||
push(@cross_correlation_power_curve_err,$err);
|
push(@arr_cross_correlation_power_curve_err,$err);
|
||||||
$mode++;
|
$mode++;
|
||||||
}
|
}
|
||||||
case 3 {
|
case 3 {
|
||||||
@ -146,15 +146,31 @@ while (<$outputfile>) {
|
|||||||
print encode($charset,"Phase different from $_");
|
print encode($charset,"Phase different from $_");
|
||||||
say encode($charset,"Average: $avg, Err: $err");
|
say encode($charset,"Average: $avg, Err: $err");
|
||||||
}
|
}
|
||||||
push(@phase_difference_avg,$avg);
|
push(@arr_phase_difference_avg,$avg);
|
||||||
push(@phase_difference_err,$err);
|
push(@arr_phase_difference_err,$err);
|
||||||
|
my %freqrecord = ( "arr_power_curve_source_avg" => arr_power_curve_source_avg)
|
||||||
$mode = 0;
|
$mode = 0;
|
||||||
}
|
}
|
||||||
} # End switch
|
} # End switch
|
||||||
}
|
}
|
||||||
|
|
||||||
$numvals = scalar @power_curve_source_avg;
|
$numvals = scalar @arr_power_curve_source_avg;
|
||||||
say encode($charset,"Saved $numvals sets of quantities.");
|
say encode($charset,"Retrieved $numvals sets of quantities.");
|
||||||
|
|
||||||
|
# This section builds the records
|
||||||
|
foreach(@freq_coords_avg) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
open($datafile,'>',"tmp.sourcePSD") or die $!;
|
||||||
|
open($datafile,'>',"tmp.reprocPSD") or die $!;
|
||||||
|
|
||||||
|
foreach(@freq_coords_avg)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user