IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31498


Ignore:
Timestamp:
May 9, 2011, 7:34:26 PM (15 years ago)
Author:
watersc1
Message:

Fixed chip_mode to fix the diff pairing.

File:
1 edited

Legend:

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

    r31494 r31498  
    237237
    238238        # This is a hack to fix old exposures that have no object.
     239        unless(defined($comment)) {
     240            $comment = '';
     241        }
    239242        if ((!defined($object))||($object eq 'NULL')||($object eq '')) {
    240243            if ($comment =~ /3pi_/) {
     
    247250            }
    248251            else {
    249                 $exposure->{data_state} = 'drop';
    250                 $exposure = update_this_exposure($exposure);
     252                $exposure->{data_state} = 'new';
     253                $exposure->{pairwise} = 0;
     254                $exposure->{private} = 1;
     255                $exposure->{pair_id} = 9223372036854775807;
     256                update_this_exposure($exposure);
     257                $counter++;
    251258                next;
    252259            }
     
    273280            $counter++;
    274281        }
     282        print "ZZ: $exp_id $object $comment $matching{$object}{$comment}\n";
    275283    }
    276284
     
    280288        foreach my $comment (keys %{ $matching{$object} }) {
    281289            push @exp_ids_to_diff, $matching{$object}{$comment};
     290            print "$object $comment $matching{$object}{$comment} $indexing{$matching{$object}{$comment}} $exp_ids_to_diff[-1]\n";
    282291        }
    283292        @exp_ids_to_diff = sort { $indexing{$a} <=> $indexing{$b} } @exp_ids_to_diff;
     
    293302            my $exp_A = ${ $exposures }[$indexing{$exp_id_A}];
    294303            my $exp_B = ${ $exposures }[$indexing{$exp_id_B}];
    295 
     304            print "$exp_A $exp_B $exp_id_A $exp_id_B $indexing{$exp_id_A} $indexing{$exp_id_B}\n";
    296305            $exp_A->{pairwise} = 1;
    297306            $exp_A->{private} = 0;
     
    310319    # Scan all exposures, and ensure that pairwise and private are set correctly
    311320    foreach my $exposure (@$exposures) {
     321        print "YY: $exposure\n";
    312322        if ($exposure->{pairwise} && !($exposure->{pair_id})) {
    313323            $exposure->{pairwise} = 0; # We marked it for pairwise diffs, but didn't match it. Probably an error.
     
    317327        }
    318328
    319         $exposure = update_this_exposure($exposure);
     329        update_this_exposure($exposure);
    320330    }
    321331    return(0);
Note: See TracChangeset for help on using the changeset viewer.