IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 13, 2010, 4:23:58 PM (16 years ago)
Author:
watersc1
Message:

stack uniqueness should care about tessellation id as well.

File:
1 edited

Legend:

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

    r28887 r28916  
    132132my %stackable_list = ();
    133133my %reduction_class = ();
     134my @unrecoverable_quality = ();
    134135my @detrend_list = ();
    135136my %dettype_list = ();
     
    177178    elsif (${ $entry }{name} eq 'FILTERS') {
    178179        push @filter_list, ${ $entry }{value};
     180    }
     181    elsif (${ $entry }{name} eq 'UNRECOVERABLE_QUALITY') {
     182        push @unrecoverable_quality, ${ $entry }{value};
    179183    }
    180184    elsif (${ $entry }{name} eq 'TARGETS') {
     
    10621066    my ($label,$workdir,$obs_mode,$object,$comment,$tess_id,$dist_group,$data_group,$reduction) = get_tool_parameters($date,$target);
    10631067
    1064     my $sth = "SELECT skycell_id from stackRun where data_group = '$data_group' AND skycell_id = '$skycell' AND filter = '$filter'";
     1068    my $sth = "SELECT skycell_id from stackRun where data_group = '$data_group' AND skycell_id = '$skycell' AND filter = '$filter' AND tess_id = '$tess_id'";
    10651069    my $data_ref = $db->selectall_arrayref( $sth );
    10661070
     
    10801084
    10811085    my $where = " label = '$label' AND data_group = '$data_group' ";
     1086
     1087    my $where_possibly_faulted = $where . " AND ( " ;
     1088    foreach my $acceptable_quality (@unrecoverable_quality) {
     1089        $where_possibly_faulted .= " quality = $acceptable_quality OR ";
     1090    }
     1091    $where_possibly_faulted .= " 0 )";
     1092
    10821093    my $chip_sth = "SELECT * from chipRun WHERE (state = 'full' OR state = 'new') AND $where ";
     1094    my $cam_sth  = "SELECT * from camRun JOIN camProcessedExp USING(cam_id) WHERE state = 'full' AND $where_possibly_faulted ";
    10831095    my $warp_sth = "SELECT * from warpRun WHERE state = 'full' AND $where ";
    10841096
    10851097    my $chip_ref = $db->selectall_arrayref( $chip_sth );
     1098    my $cam_ref  = $db->selectall_arrayref( $cam_sth );
    10861099    my $warp_ref = $db->selectall_arrayref( $warp_sth );
    10871100
     
    11041117    }
    11051118
    1106     return($#input_exposures  + 1, $#{ $chip_ref } + 1, $#{ $warp_ref } + 1, $Nalready);
     1119    return($#input_exposures  + 1, $#{ $chip_ref } + 1, $#{ $cam_ref } + $#{ $warp_ref } + 2, $Nalready);
    11071120}
    11081121
Note: See TracChangeset for help on using the changeset viewer.