IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38843 for trunk/tools


Ignore:
Timestamp:
Oct 12, 2015, 1:29:43 PM (11 years ago)
Author:
bills
Message:

Support measures for stack detections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/bills/detectToMeasure

    r38746 r38843  
    1515use Pod::Usage qw( pod2usage );
    1616
    17 my ($ra, $dec, $cat_id, $exp_id, $class_id, $det_id);
     17my ($ra, $dec, $cat_id, $exp_id, $class_id, $stack_id, $det_id);
    1818
    1919my ($outputFile, $ofmt, $save_temps, $verbose);
     
    2626    "exp_id=s"          =>  \$exp_id,
    2727    "class_id=s"        =>  \$class_id,
     28    "stack_id=s"        =>  \$stack_id,
    2829    "det_id=s"          =>  \$det_id,
    2930    "list-others"       =>  \$listOthers,
     
    3637) or pod2usage( 2 );
    3738
    38 unless (defined $ra and defined $dec and defined $exp_id and defined $class_id) {
    39     print STDERR "usage: $0 --ra <ra> --dec <dec> [--cat_id <cat_id>] --exp_id <exp_id> --class_id <class_id> [--det_id <det_id> --output <output file name>\n";
     39unless (defined $ra and defined $dec and (defined $stack_id or (defined $exp_id and defined $class_id)) ) {
     40    print STDERR "usage: $0 --ra <ra> --dec <dec> [--cat_id <cat_id>] (--exp_id <exp_id> --class_id <class_id> | --stack_id <stack_id>) [--det_id <det_id>] [--output <output file name>]\n";
    4041    print STDERR "       Other options: --list-others --this-image --ofmt\n";
    4142    exit 1;
     
    5051
    5152# XXX: make label and catdir options
     53# XXX: should be using release_name which will have pointers to the right datat and the catdir
    5254my $label = "SAS.20141118";
    5355my $catdir = '/data/ipp079.0/gpc1/catdirs/SAS/SAS39.V1';
     
    108110my $extern_id;
    109111my $image_id;
    110 {
     112if ($exp_id) {
    111113    my $command = "$chiptool -processedimfile -exp_id $exp_id -class_id $class_id -label $label | grep chip_imfile_id | awk '{print \$3}'";
    112114    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     
    123125    chomp $output;
    124126    $extern_id = $output;
     127} else {
     128    die "Need exp_id or stack_id!!\n" unless $stack_id;
     129    $extern_id = $stack_id;
    125130}
    126131
Note: See TracChangeset for help on using the changeset viewer.