IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31603


Ignore:
Timestamp:
Jun 6, 2011, 12:52:49 PM (15 years ago)
Author:
watersc1
Message:

registration summitExp.dateobs/rawExp.dateobs bugfix

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/register_imfile.pl

    r31060 r31603  
    4040
    4141my ($cache, $exp_id, $tmp_class_id, $tmp_exp_name, $uri, $bytes, $md5sum, $dbname, $verbose, $no_update, $no_op, $logfile);
    42 my ($sunrise, $sunset);
     42my ($sunrise, $sunset, $summit_dateobs);
    4343GetOptions(
    4444    'caches'           => \$cache,
     
    5151    'sunrise=s'        => \$sunrise,
    5252    'sunset=s'         => \$sunset,
     53    'summit_dateobs=s' => \$summit_dateobs,
    5354    'dbname|d=s'       => \$dbname,    # Database name
    5455    'verbose'          => \$verbose,   # Print to stdout
     
    181182if (uc(&value_for_flag ($cmdflags, "NULL", "-exp_type"))  eq "NULL") { &my_die_for_add ("exp_type  not found", $exp_id, $tmp_exp_name, $tmp_class_id, $uri, $PS_EXIT_CONFIG_ERROR); }
    182183my $dateobs   = &value_for_flag($cmdflags, 0.0, "-dateobs");
     184unless($summit_dateobs) {
     185    $summit_dateobs = $dateobs;
     186}
     187
    183188my $exp_type  = &value_for_flag($cmdflags, "NULL", "-exp_type");
    184189
     
    196201    $command .= " -data_state full";
    197202}
    198 elsif (is_daytime($dateobs,$sunrise,$sunset)) {
     203elsif (is_daytime($summit_dateobs,$sunrise,$sunset)) {
    199204    printf STDERR "This is a daytime exposure.\n";
    200205    $command .= " -data_state full";
     
    267272
    268273if ((abs($burntoolStateCurrent) != $burntoolStateTarget)&&
    269     (!is_daytime($dateobs,$sunrise,$sunset))&&
     274    (!is_daytime($summit_dateobs,$sunrise,$sunset))&&
    270275    (!is_ccim($tmp_exp_name,$exp_type))) {
    271276    my $mdcParser  = PS::IPP::Metadata::Config->new;
  • trunk/ippTasks/register.pro

    r30992 r31603  
    294294    book getword regPendingImfile $pageName workdir      -var WORKDIR_TEMPLATE
    295295    book getword regPendingImfile $pageName dbname       -var DBNAME
     296    book getword regPendingImfile $pageName summit_dateobs -var SUMMIT_DATEOBS
    296297
    297298    # EXP_TAG is used to generate the unique, but human-readable, filenames
     
    320321    # XXX register_imfile.pl differs from the standard script : it does not have an 'outroot' argument, and it does not take '--redirect'
    321322    $run = register_imfile.pl --exp_id $EXP_ID --tmp_class_id $TMP_CLASS_ID --tmp_exp_name $TMP_EXP_NAME --uri $URI --logfile $logfile --bytes $BYTES --md5sum $MD5SUM
    322     $run = $run --sunset $sunset --sunrise $sunrise
     323    $run = $run --sunset $sunset --sunrise $sunrise --summit_dateobs $SUMMIT_DATEOBS
    323324    add_standard_args run
    324325
  • trunk/ippTools/share/regtool_pendingimfile.sql

    r25418 r31603  
    88    newImfile.uri,
    99    newImfile.bytes,
    10     newImfile.md5sum
     10    newImfile.md5sum,
     11    summitExp.dateobs AS summit_dateobs
    1112FROM newImfile
    1213JOIN newExp
    1314    USING(exp_id)
     15JOIN summitExp USING(summit_id)
    1416LEFT JOIN rawImfile
    1517    ON newExp.exp_id = rawImfile.exp_id
Note: See TracChangeset for help on using the changeset viewer.