IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31495


Ignore:
Timestamp:
May 7, 2011, 3:47:36 PM (15 years ago)
Author:
watersc1
Message:

fix diff association when object is null. fix incorrectly obtaining a new chip_id when remaking an exposure. fix missing dist_group for final stacks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20110505/ippScripts/scripts/lap_science.pl

    r31476 r31495  
    120120    # This is a puzzler... chiptool doesn't actually return a useful metadata.  We'll just scrape it from the database for now.
    121121
    122     my $command = "$chiptool -listrun -exp_id $exp_id -label $label -data_group $data_group";
     122    my $command = "$chiptool -listrun -pstamp_order -exp_id $exp_id -label $label -data_group $data_group";
    123123    $command .= " -dbname $dbname " if defined $dbname;
    124124
     
    236236        my $comment = $exposure->{comment};
    237237
     238        # This is a hack to fix old exposures that have no object.
     239        if ((!defined($object))||($object eq 'NULL')||($object eq '')) {
     240            if ($comment =~ /3pi_/) {
     241                $object = $comment;
     242                $object =~ s/^.*?(3pi_\d\d_\d\d\d\d).*?$/$1/;
     243            }
     244            elsif ($comment =~ / ps1_/) {
     245                $object = $comment;
     246                $object =~ s/^.*?(ps1_\d\d_\d\d\d\d).*$/$1/;
     247            }
     248            else {
     249                $exposure->{data_state} = 'drop';
     250                $exposure = update_this_exposure($exposure);
     251                next;
     252            }
     253        }
     254
     255
    238256        if (S64_IS_NOT_NULL($chip_id)) { # We already have a defined chip_id
    239257            if (($pairwise) && !($pair_id)) {
     
    647665    $command .= " -definebyquery -select_label $label -select_skycell_id ${proj_cell}.% -select_filter $filter ";
    648666    $command .= " -set_label ${label} -set_workdir $workdir -set_data_group ${proj_cell}.final.${date} ";
    649     $command .= " -min_num 2 -set_reduction THREEPI_STACK ";
     667    $command .= " -min_num 2 -set_reduction THREEPI_STACK -set_dist_group ${label}";
    650668
    651669    my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
Note: See TracChangeset for help on using the changeset viewer.