IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39149 for trunk/tools


Ignore:
Timestamp:
Nov 17, 2015, 9:59:05 AM (11 years ago)
Author:
bills
Message:

add option to skip the joins to the xsrc and xfit tables. In this case
just add the stack_id and other columns that we need

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/bills/joinstackcmf

    r39057 r39149  
    2323# for now just all or one
    2424
    25 my ($stack_id, $skycal_id);
     25my ($stack_id, $skycal_id, $skip_joins);
    2626my $test;
    2727my ($save_temps, $verbose);
     
    3030GetOptions(
    3131    "stack_id|s=s"      =>  \$stack_id,
     32    "skip-joins"        =>  \$skip_joins,
    3233    "test"              =>  \$test,
    3334    "ofmt=s"            =>  \$ofmt,
     
    8384my $exthead = 'SkyChip';
    8485
    85 my $cmd = "$stilts tmatchn nin=5 matcher=exact values1=IPP_IDET values2=IPP_IDET values3=IPP_IDET"
     86my $cmd;
     87if ($skip_joins) {
     88    $cmd = "$stilts tpipe in=$path cmd='"
     89    .         "addcol -after IPP_IDET STACK_ID $stack_id;"
     90    .         "addcol -after STACK_ID SKYCAL_ID $skycal_id;"
     91    .         "addcol -after SKYCAL_ID PROJ_ID $proj;"
     92    .         "addcol -after PROJ_ID CELL_ID $cell;"
     93    . "'"
     94    . " out=$output";
     95} else {
     96    $cmd = "$stilts tmatchn nin=5 matcher=exact values1=IPP_IDET values2=IPP_IDET values3=IPP_IDET"
    8697    . " values4=IPP_IDET values5=IPP_IDET"
    8798    . " fixcols=all suffix1='' suffix2=_exp suffix3=_dev suffix4=_ser suffix5='_xsrc'"
     
    107118    . " progress=none"
    108119    ;
     120}
    109121
    110122$cmd .= " ofmt=$ofmt" if $ofmt;
Note: See TracChangeset for help on using the changeset viewer.