Changeset 27899 for trunk/pstamp/scripts/pstampparse.pl
- Timestamp:
- May 10, 2010, 10:53:01 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstampparse.pl (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstampparse.pl
r27874 r27899 17 17 use Carp; 18 18 use POSIX; 19 use DateTime;19 use Time::HiRes qw(gettimeofday); 20 20 21 21 my $verbose; … … 34 34 'file=s' => \$request_file_name, 35 35 'req_id=s' => \$req_id, 36 'outdir=s' => \$outdir,36 'outdir=s' => \$outdir, 37 37 'product=s' => \$product, 38 38 'label=s' => \$label, … … 147 147 my $rows; 148 148 { 149 my $start_request_file = gettimeofday(); 149 150 my $command = "$pstampdump $request_file_name"; 150 151 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = … … 154 155 } 155 156 if (@$stdout_buf) { 156 my $table = $mdcParser->parse(join "", @$stdout_buf) or157 my_die("Unable to parse metdata config doc", $PS_EXIT_UNKNOWN_ERROR);158 $rows = parse_md_list($table);159 }157 $rows = parse_md_fast($mdcParser, join "", @$stdout_buf); 158 } 159 my $dtime_request_file = gettimeofday() - $start_request_file; 160 print "Time to read and parse request file: $dtime_request_file\n"; 160 161 161 162 } … … 388 389 my $numRows = scalar @$rowList; 389 390 390 # $tess_id = "" if !defined $tess_id;391 # $component = "" if !defined $component;392 393 391 print "Collected $numRows rows beginning with row $rownum. $req_type $stage $id $tess_id $component\n"; 394 392 395 393 # Call PS::IPP::PStamp::Job locate_images subroutine to get the images for this 396 394 # request specification. An array reference is returned. 397 my $start_locate = DateTime->now->mjd;395 my $start_locate = gettimeofday(); 398 396 399 397 # XXX: perhaps we should get rid of most of this argument list. … … 404 402 $option_mask, $need_magic, $mjd_min, $mjd_max, $filter, $data_group, $verbose); 405 403 406 # XXX: why use mjd? It doesn't have great precision. 407 my $dtime_locate = (DateTime->now->mjd - $start_locate) * 86400.; 404 my $dtime_locate = gettimeofday() - $start_locate; 408 405 print "Time to locate_images for row $rownum $dtime_locate\n"; 409 406 … … 504 501 $image->{job_args} = $args; 505 502 506 # XXX: we can get rid of the following everything that we need is507 # in the params file508 509 $args .= " -file $imagefile";510 511 if (($option_mask & $PSTAMP_SELECT_MASK) && $image->{mask} ) {512 $args .= " -mask $image->{mask}";513 }514 if (($option_mask & $PSTAMP_SELECT_WEIGHT) and $image->{weight} ) {515 $args .= " -variance $image->{weight}";516 }517 518 503 my $base = basename($image->{image}); 519 504 if (! $base =~ /.fits$/ ) { … … 523 508 524 509 my $output_base = "$outdir/${rownum}_${job_num}_${base}"; 525 my $argslist = "${output_base}.args";526 527 # copy the argument list to a file528 open ARGSLIST, ">$argslist" or my_die("failed to open $argslist", $PS_EXIT_UNKNOWN_ERROR);529 print ARGSLIST "$args\n";530 close ARGSLIST or my_die("failed to close $argslist", $PS_EXIT_UNKNOWN_ERROR);531 532 510 write_params($output_base, $image); 533 511 … … 664 642 } 665 643 666 # $num_jobs = queueGetImageJobs($firstRow, $imageList, $stage, $need_magic, $mode);667 644 sub queueGetImageJobs 668 645 {
Note:
See TracChangeset
for help on using the changeset viewer.
