IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39002


Ignore:
Timestamp:
Oct 29, 2015, 11:03:02 AM (11 years ago)
Author:
bills
Message:

various cleanup primarily removing hard coded refereces to bill's environment and test locations

Location:
trunk/tools/bills
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/bills/comparep2detections

    r38860 r39002  
    1212my $in;
    1313my $out;
    14 my $ofmt;
    15 my $stiltsJar = '/home/panstarrs/bills/jars/stilts.jar';
    16 my $stilts = "java -jar $stiltsJar";
    1714
    18 my $test = 1;
     15my $testdata;
    1916
    2017my ($verbose, $save_temps);
    2118
    2219GetOptions(
    23     "test"              =>  \$test,
    24     "ofmt=s"            =>  \$ofmt,
     20    "testdata=s"        =>  \$testdata,
    2521    "join=s"            =>  \$joinType,
    2622    "verbose|v"         =>  \$verbose,
     
    2824) or pod2usage( 2 );
    2925
    30 die "usage: $0 [--ofmt <ofmt>] <p2 batch file> [<out>]\n" unless (scalar @ARGV == 1) or (scalar @ARGV == 2);
     26die "usage: $0 <p2 batch file> [<out>]\n" unless (scalar @ARGV == 2);
    3127
    3228$in = shift;
    3329$out = shift;
    3430
     31my $jardir = $ENV{JARDIR};
     32unless ($jardir) {
     33    $jardir = '/home/panstarrs/bills/jars' unless $jardir;
     34    print STDERR "JARDIR envrionment variable not found. Using $jardir\n" if $verbose;
     35    # add it to the enviorment so that the other programs can use it
     36    $ENV{JARDIR} = $jardir;
     37}
     38my $stiltsJar = "$jardir/stilts.jar";
     39my $stilts = "java -jar $stiltsJar";
     40
     41# file name for concatenated detection extensions
    3542my $detcat = "cat." . basename($in);
    3643
    3744runcommand( "concatp2batch $in $detcat");
    3845
    39 # find exp_id. XXX: we could use batch name for this or require user to find this
     46# find exp_id. XXX: I think that we could use file batch name for this or require user to supply it as an argument
    4047my $command = "$stilts tcat in=$detcat icmd='head 1;keepcols imageID;' ofmt=ascii | grep -v '#'";
    4148my $imageID = `$command`;
     
    4653
    4754my $smf;
    48 if ($test) {
    49     # XXX: make an option
    50     my $testdata = "/data/ippc19.0/home/bills/ipp/ippToPsps/test/testdata";
     55if ($testdata) {
     56#    my $testdata = "/data/ippc19.0/home/bills/ipp/ippToPsps/test/testdata";
    5157    $smf = sprintf "%s/test.%02d.smf", $testdata, $exp_id;
    5258} else {
     
    5864
    5965$command = "concatsmf $smf $ippcat";
    60 $command .= " --test" if $test;
     66$command .= " --test" if $testdata;
    6167
    6268runcommand($command);
  • trunk/tools/bills/concatsmf

    r38860 r39002  
    3636
    3737# TODO: make this an option
    38 my $stiltsJar = '/home/panstarrs/bills/jars/stilts.jar';
     38my $jardir = $ENV{JARDIR};
     39$jardir = '/home/panstarrs/bills/jars' unless $jardir;
     40
     41my $stiltsJar = "$jardir/stilts.jar";
    3942
    4043my $stilts="java -jar $stiltsJar";
     
    5962
    6063if ($test_smf) {
    61     # Test smf created by the ippToPsps test suite
     64    # Input is a test smf created by the ippToPsps test suite
    6265    # file name format is 'test.$exp_id.smf"
    6366    # There is only a single psf extension for chipnum zero
     
    6770}
    6871
    69 # gpc1 smf
     72# assuming a gpc1 smf
    7073
    7174($exp_name, $exp_id, undef, $cam_id) = split '\.', $infilename;
  • trunk/tools/bills/matchIppToPsps

    r38860 r39002  
    77use Pod::Usage qw( pod2usage );
    88
    9 
    109my $joinType = '1and2';
    1110my $in1;
     
    1312my $out;
    1413my $ofmt;
    15 my $stiltsJar = '/home/panstarrs/bills/jars/stilts.jar';
     14
     15my $jardir = $ENV{JARDIR};
     16$jardir = '/home/panstarrs/bills/jars' unless $jardir;
     17
     18my $stiltsJar = "$jardir/stilts.jar";
    1619my $stilts = "java -jar $stiltsJar";
    1720
Note: See TracChangeset for help on using the changeset viewer.