IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 20, 2015, 12:09:18 PM (11 years ago)
Author:
bills
Message:

add --test which changes the filename parser from gpc1 style filerules to the ipptopsps test suite
convention.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/bills/joinstkcmf

    r38757 r38887  
    2121
    2222my ($stack_id, $skycal_id);
     23my $test;
    2324my ($save_temps, $verbose);
    2425my $ofmt;
     
    2627GetOptions(
    2728    "stack_id|s=s"      =>  \$stack_id,
     29    "test"              =>  \$test,
    2830    "ofmt=s"            =>  \$ofmt,
    29     "vebose|v"          =>  \$verbose,
     31    "verbose|v"          =>  \$verbose,
    3032    "save-temps"        =>  \$save_temps,
    3133) or pod2usage( 2 );
     
    5658}
    5759
    58 my ($proj, $cell);
    59 (undef, undef, undef, $proj, $cell, undef, $stack_id, undef, $skycal_id) = split '\.', $infilename;;
     60my ($proj, $cell, $skycell_id);
     61if (!$test) {
     62    (undef, undef, undef, $proj, $cell, undef, $stack_id, undef, $skycal_id) = split '\.', $infilename;;
    6063
    61 my $skycell_id = sprintf "skycell.%04d.%03d", $proj, $cell;
     64    $skycell_id = sprintf "skycell.%04d.%03d", $proj, $cell;
     65} else {
     66    (undef, $stack_id) = split '\.', $infilename;
     67    $stack_id += 0;
     68    $skycal_id = $stack_id;
     69    my $results = `ftlist $path k include=SKYCELL | head -1`;
     70    chomp $results;
     71    print "$results\n";
     72    (undef, undef, $skycell_id) = split " ", $results;
     73    (undef, $proj, $cell) = split '\.', $skycell_id;
     74    $cell += 0;
     75    $proj += 0;
     76}
    6277
    6378print "$stack_id $skycal_id $skycell_id\n" if $verbose;
Note: See TracChangeset for help on using the changeset viewer.