IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 10, 2011, 6:24:56 PM (15 years ago)
Author:
watersc1
Message:

Fix exposures that claim to be pairwise, but do not have a valid pair_id. This should fix the ghost diff bug.

File:
1 edited

Legend:

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

    r31515 r31519  
    460460        my $companion;
    461461
    462         if ($exposure->{pair_id}) { # Load companion exposure information
    463             if (exists($match_hash{$exposure->{chip_id}})) {
     462        if ($exposure->{pairwise}) {
     463            # Load companion exposure information
     464            if (($exposure->{pair_id})&&(exists($match_hash{$exposure->{chip_id}}))) {
    464465                $companion = ${ $exposures }[$match_hash{$exposure->{chip_id}}]; # Match!
     466            }
     467            else { # We claimed to be pairwise, but do not have a valid pair_id.
     468                $exposure->{pairwise} = 0;
     469                $exposure->{private} = 1;
     470                &update_this_exposure($exposure);
    465471            }
    466472        }
     
    500506            $is_bad_quality = 1;
    501507        }
     508        # If we've detected a bad quality exposure, drop it, and tell the companion.
    502509        if ($is_bad_quality) {
    503510            unless ((defined($exposure->{diffRun_state}))&&
     
    517524
    518525        }
    519 
     526       
    520527        if  ($exposure->{data_state} eq 'drop') { # This exposure is impossible, so fudge the counts so we get through.
    521528            $can_qstack ++;
     
    785792        }
    786793        my $retry_command;
    787         if ($exposure->{pairwise}) { # warpwarp
     794        if (($exposure->{pairwise})&&(defined(${ $exposures }[$match_hash{$exposure->{chip_id}}]))) { # warpwarp
    788795            my $companion = ${ $exposures }[$match_hash{$exposure->{chip_id}}];
    789796            $command .= " -definewarpwarp ";
Note: See TracChangeset for help on using the changeset viewer.