IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 16, 2015, 3:49:47 PM (11 years ago)
Author:
bills
Message:

resolve nebulous paths

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/bills/concatsmf

    r38746 r38748  
    3333my $output = shift;
    3434
    35 my $stilts="java -jar $ENV{HOME}/tools/stilts.jar";
     35# TODO: make this an option
     36my $stiltsJar = '/home/panstarrs/bills/jars/stilts.jar';
     37
     38my $stilts="java -jar $stiltsJar";
    3639
    3740my $ofmt = 'fits';
    3841
    3942my $infilename = basename($smf);
     43
     44my $path;
     45if ($smf =~ /^neb:/) {
     46    $path = `neb-locate -p $smf`;
     47    if (!$path) {
     48        die "ailed to find location of $smf\n";
     49    }
     50    print $path if $verbose;
     51    chomp $path;
     52} else {
     53    $path = $smf;
     54}
     55
    4056my ($exp_name, $exp_id, $cam_id);
    4157($exp_name, $exp_id, undef, $cam_id) = split '\.', $infilename;
    4258
    43 print "$exp_name $exp_id $cam_id\n";
     59print "$exp_name $exp_id $cam_id\n" if $verbose;
    4460my $extension = "";
    4561
     
    5066    }
    5167    $extension = sprintf "XY%02d.psf", $ota;
    52     extract_chip($smf, $output, $exp_id, $ota, $extension);
     68    extract_chip($path, $output, $exp_id, $ota, $extension);
    5369    exit 0;
    5470}
     
    6985        my ($ofile, $out) = tempfile ("$dir/$ota.XXXX", SUFFIX => '.cmf', UNLINK => !$save_temps);
    7086        print $listfile "$out\n";
    71         extract_chip($smf, $out, $exp_id, $ota, $extension);
     87        extract_chip($path, $out, $exp_id, $ota, $extension);
    7288    }
    7389}
     
    94110
    95111    # Add a column IMAGE_ID which we can match with the imageID in the Detection table.
    96     my $cmd = "$stilts tpipe in=$in'#'$extension out=$out ofmt=$ofmt cmd='addcol -after IPP_IDET IMAGE_ID $imageID;' join=1or2";
     112    my $cmd = "$stilts tpipe in=$in'#'$extension out=$out ofmt=$ofmt cmd='addcol -after IPP_IDET IMAGE_ID $imageID;'";
    97113
    98114    print "$cmd\n" if $verbose;
Note: See TracChangeset for help on using the changeset viewer.