-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #788 from Keck-DataReductionPipelines/develop
Version 2.5.4
- Loading branch information
Showing
71 changed files
with
6,933 additions
and
2,185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
#! /usr/local/bin/perl | ||
|
||
use strict; | ||
use warnings; | ||
|
||
my $startyyyymmdd = shift @ARGV; # YYYYMMDD command-line parameter. | ||
my $endyyyymmdd = shift @ARGV; # YYYYMMDD command-line parameter. | ||
|
||
if ((! (defined $startyyyymmdd)) or (! ($startyyyymmdd =~ /^\d\d\d\d\d\d\d\d$/))) { | ||
die "startyyyymmdd either not defined or not correct format; quitting...\n"; | ||
} | ||
|
||
if ((! (defined $endyyyymmdd)) or (! ($endyyyymmdd =~ /^\d\d\d\d\d\d\d\d$/))) { | ||
die "endyyyymmdd either not defined or not correct format; quitting...\n"; | ||
} | ||
|
||
my ($year, $month, $day); | ||
|
||
($year, $month, $day) = $startyyyymmdd =~ /(\d\d\d\d)(\d\d)(\d\d)/; | ||
my $startdate = $year . '-' . $month . '-' . $day; | ||
|
||
($year, $month, $day) = $endyyyymmdd =~ /(\d\d\d\d)(\d\d)(\d\d)/; | ||
my $enddate = $year . '-' . $month . '-' . $day; | ||
|
||
|
||
my $cmdforjdstart = "sqlite3 test.db \"SELECT julianday(\'$startdate 00:00:00.0\');\""; | ||
print "Executing cmd = [$cmdforjdstart]\n"; | ||
my $computedjdstart = `$cmdforjdstart`; | ||
chomp $computedjdstart; | ||
print "computedjdstart = $computedjdstart\n"; | ||
|
||
|
||
my $cmdforjdend = "sqlite3 test.db \"SELECT julianday(\'$enddate 00:00:00.0\');\""; | ||
print "Executing cmd = [$cmdforjdend]\n"; | ||
my $computedjdend = `$cmdforjdend`; | ||
chomp $computedjdend; | ||
print "computedjdend = $computedjdend\n"; | ||
|
||
my (@yyyymmdd); | ||
|
||
for (my $i = int($computedjdstart); $i <= int($computedjdend); $i++) { | ||
|
||
my $jdi = $i + 0.5; | ||
my $cmd = "sqlite3 test.db \"SELECT datetime($jdi);\""; | ||
|
||
#print "Executing cmd = [$cmd]\n"; | ||
|
||
my $computedatetime = `$cmd`; | ||
chomp $computedatetime; | ||
|
||
my ($obsyear, $obsmonth, $obsday) = $computedatetime =~ /(\d\d\d\d)-(\d\d)-(\d\d)/; | ||
|
||
my $obsdate = $obsyear . $obsmonth . $obsday; | ||
print "jdi, obsdate = $jdi, $obsdate\n"; | ||
|
||
push @yyyymmdd, $obsdate; | ||
} | ||
|
||
|
||
my $scriptfile = "runWLSPipelineFrom" . $yyyymmdd[0] . "To" . $yyyymmdd[$#yyyymmdd] . ".sh"; | ||
|
||
if (! open(SCR, ">$scriptfile") ) { | ||
die "*** Error: Could not open $scriptfile for writing; quitting...\n"; | ||
} | ||
|
||
my $shebang = '#! /bin/bash -l'; | ||
|
||
print SCR "$shebang\n"; | ||
|
||
foreach my $yyyymmdd (@yyyymmdd) { | ||
print "yyyymmdd=$yyyymmdd\n"; | ||
|
||
my @op = `cat runDailyPipelines.sh`; | ||
|
||
foreach my $op (@op) { | ||
if ($op =~ /^\s+$/) { next; } | ||
if ($op =~ /^procdate/) { next; } | ||
if ($op =~ /\/bin\/bash/) { next; } | ||
if ($op =~ /^printenv/) { next; } | ||
if ($op =~ /kpfmastersruncmd/) { next; } | ||
$op =~ s/\$procdate/$yyyymmdd/g; | ||
print SCR "$op"; | ||
} | ||
} | ||
|
||
if (! close(SCR) ) { | ||
die "*** Error: Could not close $scriptfile; quitting...\n"; | ||
} | ||
|
||
`chmod +x $scriptfile`; | ||
|
||
exit 0; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Pipeline logger configurations | ||
[LOGGER] | ||
start_log = True | ||
log_path = pipeline.log | ||
log_level = info | ||
log_verbose = True | ||
log_directory = /data/logs/ | ||
|
||
[ARGUMENT] | ||
data_type = KPF | ||
lev0_fits_file = /data/L0/20231212/KP.20231212.51850.00.fits | ||
# Database primary key of L0 FITS file, as stored in the L0Files database table. | ||
rid = 248848 | ||
|
||
[MODULE_CONFIGS] | ||
backfill_acf = database/modules/backfill_acf/configs/default.cfg | ||
|
||
|
||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## Default configuration for BackfillAcfFramework primitive | ||
[LOGGER] | ||
start_log = True | ||
log_path = logs/backfill_acf_framework_debug.log | ||
log_level = info | ||
log_verbose = True | ||
|
||
|
||
## Module related parameters | ||
[PARAM] | ||
# Normally keep the backfill_repopulate_db_recs parameter set to zero; otherwise, if set to one, | ||
# the code will backfill/repopulate new columns gracffln and rdacffln in L0Files database table, | ||
# according to the database query below, which must return rid,filename,checksum. | ||
# Depending on the query, the database backfilling/updating may take some time. | ||
backfill_repopulate_db_recs = 1 | ||
backfill_repopulate_db_query_template = select rid,filename,checksum from L0Files where (gracffln is null and rdacffln is null) order by mjdobs; |
Empty file.
Oops, something went wrong.