Changeset 39002 for trunk/tools/bills/comparep2detections
- Timestamp:
- Oct 29, 2015, 11:03:02 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/tools/bills/comparep2detections (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/bills/comparep2detections
r38860 r39002 12 12 my $in; 13 13 my $out; 14 my $ofmt;15 my $stiltsJar = '/home/panstarrs/bills/jars/stilts.jar';16 my $stilts = "java -jar $stiltsJar";17 14 18 my $test = 1;15 my $testdata; 19 16 20 17 my ($verbose, $save_temps); 21 18 22 19 GetOptions( 23 "test" => \$test, 24 "ofmt=s" => \$ofmt, 20 "testdata=s" => \$testdata, 25 21 "join=s" => \$joinType, 26 22 "verbose|v" => \$verbose, … … 28 24 ) or pod2usage( 2 ); 29 25 30 die "usage: $0 [--ofmt <ofmt>] <p2 batch file> [<out>]\n" unless (scalar @ARGV == 1) or(scalar @ARGV == 2);26 die "usage: $0 <p2 batch file> [<out>]\n" unless (scalar @ARGV == 2); 31 27 32 28 $in = shift; 33 29 $out = shift; 34 30 31 my $jardir = $ENV{JARDIR}; 32 unless ($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 } 38 my $stiltsJar = "$jardir/stilts.jar"; 39 my $stilts = "java -jar $stiltsJar"; 40 41 # file name for concatenated detection extensions 35 42 my $detcat = "cat." . basename($in); 36 43 37 44 runcommand( "concatp2batch $in $detcat"); 38 45 39 # find exp_id. XXX: we could use batch name for this or require user to find this46 # find exp_id. XXX: I think that we could use file batch name for this or require user to supply it as an argument 40 47 my $command = "$stilts tcat in=$detcat icmd='head 1;keepcols imageID;' ofmt=ascii | grep -v '#'"; 41 48 my $imageID = `$command`; … … 46 53 47 54 my $smf; 48 if ($test) { 49 # XXX: make an option 50 my $testdata = "/data/ippc19.0/home/bills/ipp/ippToPsps/test/testdata"; 55 if ($testdata) { 56 # my $testdata = "/data/ippc19.0/home/bills/ipp/ippToPsps/test/testdata"; 51 57 $smf = sprintf "%s/test.%02d.smf", $testdata, $exp_id; 52 58 } else { … … 58 64 59 65 $command = "concatsmf $smf $ippcat"; 60 $command .= " --test" if $test ;66 $command .= " --test" if $testdata; 61 67 62 68 runcommand($command);
Note:
See TracChangeset
for help on using the changeset viewer.
