IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30275


Ignore:
Timestamp:
Jan 14, 2011, 1:43:15 PM (15 years ago)
Author:
watersc1
Message:

Fixed typos that prevented registration of daytime exposures on 2011-01-14. Should work now, but still requires watching to check.

File:
1 edited

Legend:

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

    r30242 r30275  
    191191$command .= " -dbname $dbname" if defined $dbname;
    192192if (abs($burntoolStateCurrent) == $burntoolStateTarget) {
     193    printf STDERR "This has already been burned.\n";
    193194    $command .= " -data_state full";
    194195}
    195196elsif (is_daytime($dateobs,$sunset,$sunrise)) {
     197    printf STDERR "This is a daytime exposure.\n";
    196198    $command .= " -data_state full";
    197199}
    198200else {
     201    printf STDERR "Need to check burntool.\n";
    199202    $command .= " -data_state check_burntool";
    200203}
     
    257260# We now have an imfile in the database, check if we can burntool it.  If not, continue on.
    258261
    259 if (abs($burntoolStateCurrent) != $burntoolStateTarget) {
     262if ((abs($burntoolStateCurrent) != $burntoolStateTarget)&&
     263    (!is_daytime($dateobs,$sunrise,$sunset))) {
    260264    my $mdcParser  = PS::IPP::Metadata::Config->new;
    261265
     
    268272    my $bt_check_command = "$regtool -checkburntoolimfile ";
    269273    $bt_check_command .= " -class_id $class_id ";
    270     $bt_check_command .= " -date $check_date ";
     274    $bt_check_command .= " -dateobs_begin ${check_date}T${sunset} ";
     275    $bt_check_command .= " -dateobs_end ${check_date}T${sunrise} ";
    271276    $bt_check_command .= " -valid_burntool $burntoolStateTarget ";
    272277    $bt_check_command .= " -exp_name $exp_name ";
     
    391396    my ($ss_hour,$ss_minute,$ss_second) = split /\:/, $sunset; # /;
    392397    my ($sr_hour,$sr_minute,$sr_second) = split /\:/, $sunrise; # /;
    393    
     398    if ($second =~ /Z/) {
     399        $second =~ s/Z//;
     400    }
    394401    if (($hour >= $ss_hour)&&($minute >= $ss_minute)&&($second >= $ss_second)) {
    395402        if (($hour <= $sr_hour)&&($minute <= $sr_minute)&&($second <= $sr_second)) {
Note: See TracChangeset for help on using the changeset viewer.