IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31922


Ignore:
Timestamp:
Jul 22, 2011, 4:20:20 PM (15 years ago)
Author:
watersc1
Message:

Be less agressive about queuing quickstacks when only a few exposures will benefit.

File:
1 edited

Legend:

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

    r31795 r31922  
    2929my ( $lap_id );
    3030my ( $chip_mode, $monitor_mode, $cleanup_mode);
     31
     32# Global configuration constants that probably should be read from elsewhere.
     33my $qstack_threshold = 0.05; # Only make a quickstack if more than 5% of the exposures require it.
    3134
    3235GetOptions(
     
    456459    my $can_fstack = 0;
    457460    my $total_exposures = 0;
    458     my $lonely_exposures = 0;
     461    my @lonely_exposures = ();
    459462    foreach my $exposure (@$exposures) {
    460463        $total_exposures++;
     
    474477       
    475478        if ($exposure->{private}) { # I've declared this exposure private to this lapRun.
    476             $needs_qstack = 1;
     479            $needs_qstack++;
     480            push @lonely_exposures, $exposure;
    477481#           $lonely_exposures++;
    478482        }
     
    512516            unless ((defined($exposure->{diffRun_state}))&&
    513517                    ($exposure->{diffRun_state} eq 'full')) {
    514                 $needs_qstack = 1;
     518                $needs_qstack++;
    515519                $needs_something_private = 1;
    516520                if ($companion) {
     
    518522                    $companion->{pairwise} = 0;
    519523                    &update_this_exposure($companion);
     524                    push @lonely_exposures, $companion;
    520525#                   $lonely_exposures++;
    521526                }
     
    569574        exit(0);
    570575    }
    571     if (($needs_qstack == 1)&&              # Do we need the quick stack?
     576    if (($needs_qstack > 0)&&              # Do we need the quick stack?
    572577        ($defined_qstack == 0)&&            # Have we not made it already?
    573578        ($can_qstack == $total_exposures)&& # Are all warps done?
    574579        ($needs_something_remade == 0)      # Do we need to wait for a stolen exposure?
    575580        ) {
    576         print "STATUS: Will now queue quickstacks\n";
    577         &queue_quickstack($exposures);
     581        if ($needs_qstack < $total_exposures * $qstack_threshold) { # Drop any exposures that are requiring the qstack
     582            print "STATUS: Insufficient unpaired exposures to justify quickstack.  Dropping unpaired exposures\n";
     583            foreach $exposure (@lonely_exposures) {
     584                $exposure->{data_state} = 'drop';
     585                &update_this_exposure($exposure);
     586            }
     587        }
     588        else {
     589            print "STATUS: Will now queue quickstacks\n";
     590            &queue_quickstack($exposures);
     591        }
    578592    }
    579593
Note: See TracChangeset for help on using the changeset viewer.