IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18736


Ignore:
Timestamp:
Jul 25, 2008, 11:24:38 AM (18 years ago)
Author:
bills
Message:

query_id is not required. If not supplied take the value in the input

Location:
trunk/pstamp/test
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/test/detect_query_create

    r18735 r18736  
    2626
    2727pod2usage( -msg => "Unknown option: @ARGV", -exitval => 2 ) if @ARGV;
    28 pod2usage( -msg => "Required options: --input --output --query_id",
     28pod2usage( -msg => "Required options: --input --output",
    2929           -exitval => 3) unless defined $input and defined $output;
    3030
     
    224224            $line_num++;
    225225            chomp $line;
     226            next if !$line;             # skip blank lines
    226227            next if ($line =~ /^#/);    # skip comment lines
    227             next if !$line;             # skip blank lines
    228228            my @vals = split /$sep/, $line;
    229229            my $nvals = @vals;
     
    244244        chomp $line;
    245245        $line_num++;
     246        next if !$line;             # skip blank lines
    246247        next if ($line =~ /^#/);    # skip comment lines
    247         next if !$line;             # skip blank lines
    248248
    249249        my @vals = split /$sep/, $line;
  • trunk/pstamp/test/testdquery.pl

    r18734 r18736  
    1515
    1616
    17 my ($req_name, $input, $fs_name, $verbose, $save_temps);
     17my ($query_id, $input, $fs_name, $verbose, $save_temps);
    1818
    1919GetOptions(
    2020    'input|i=s'     => \$input,
    21     'req_name|r=s'  => \$req_name,
     21    'query_id|q=s'  => \$query_id,
    2222    'verbose|v'     => \$verbose,
    2323    'save-temps'    => \$save_temps,
     
    2626) or pod2usage( 2 );
    2727
    28 die "--req_name is required\n" if ! $req_name;
     28die "--query_id is required\n" if ! $query_id;
    2929
    3030my $dsreg = can_run("dsreg") or die "cant'f find dsreg";
    3131my $detect_query_create = can_run("./detect_query_create") or die "cant'f find detect_query_create";
    3232
    33 $fs_name = $req_name;
     33$fs_name = $query_id;
    3434
    3535my $req_file;
     
    3737my $datapath;
    3838if ($save_temps) {
    39     $req_file = "${req_name}.fits";
     39    $req_file = "${query_id}.fits";
    4040    $datapath = ".";
    4141} else {
    42     ($RFH, $req_file) = tempfile("/tmp/${req_name}.fits.XXXX", UNLINK => 1);
     42    ($RFH, $req_file) = tempfile("/tmp/${query_id}.fits.XXXX", UNLINK => 1);
    4343    die "failed to create tempfile" if !$RFH;
    4444    $datapath = "/";
     
    6060    if (!-e $query_txt_file);
    6161
    62 my $create_cmd = "$detect_query_create -i $query_txt_file -o $req_file -q $req_name";
     62my $create_cmd = "$detect_query_create -i $query_txt_file -o $req_file -q $query_id";
    6363
    6464my $reg_cmd = "echo '$req_file|||table|' | $dsreg --dbname $dbname";
Note: See TracChangeset for help on using the changeset viewer.