IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38094


Ignore:
Timestamp:
Apr 8, 2015, 3:49:23 PM (11 years ago)
Author:
watersc1
Message:

Change to allow a second attempt if the quality cuts prevent any stacks from being made. This still does the good_frac cut, however.

File:
1 edited

Legend:

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

    r37981 r38094  
    10551055    $command .= " -min_num ${minimum_stack_inputs} -random 100 -set_reduction THREEPI_STACK_1DG -set_dist_group $exposure->{dist_group} ";
    10561056    $command .= " $warps ";
    1057 
     1057   
     1058    print "$command\n";
    10581059    my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    10591060        run(command => $command, verbose => $verbose);
     
    10641065    my $stacks_made = $mdcParser->parse_list(join "", @$stdout_buf) or
    10651066        &my_die("unable to parse metadata from stacktool -definebyquery", $lap_id, "");   
     1067    print "STACKS MADE: >>$#{ $stacks_made }<<\n";
     1068    if ($#{ $stacks_made} == -1) {
     1069        print "Zero made\n";
     1070        $command = "$stacktool ";
     1071        $command .= " -pretend " if defined $debug;
     1072        $command .= " -dbname $dbname " if defined $dbname;
     1073        $command .= " -definebyquery -select_skycell_id ${proj_cell}.% -select_filter $filter ";
     1074#       $command .= " -select_fwhm_major_max 10.0 -select_zpt_obs_min 25.85 -select_bg_max 425 ";
     1075        $command .= " -select_good_frac_min 0.20 ";
     1076#    $command .= " -select_label $label "; # Removed to allow exposure sharing to work
     1077        $command .= " -set_label ${label} -set_workdir $workdir -set_data_group $data_group ";
     1078        $command .= " -min_num ${minimum_stack_inputs} -random 100 -set_reduction THREEPI_STACK_1DG -set_dist_group $exposure->{dist_group} ";
     1079        $command .= " $warps ";
     1080       
     1081        print "$command\n";
     1082        ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     1083            run(command => $command, verbose => $verbose);
     1084        unless ($success) {
     1085            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     1086            &my_die("Unable to perform stacktool -definebyquery: $error_code :: $command", $lap_id);
     1087        }
     1088        my $stacks_made_attempt2 = $mdcParser->parse_list(join "", @$stdout_buf) or
     1089            &my_die("unable to parse metadata from stacktool -definebyquery", $lap_id, "");   
     1090       
     1091        if ($#{ $stacks_made_attempt2} == -1) {
     1092            &my_die("Unable to construct any stacks from these input warps.  Nothing with good_frac > 0.2?", $lap_id, "");
     1093        }
     1094        $stacks_made = $stacks_made_attempt2;
     1095    }
    10661096
    10671097    ##
Note: See TracChangeset for help on using the changeset viewer.