IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 19, 2011, 1:33:02 PM (15 years ago)
Author:
eugene
Message:

updating scripts to use ppConfigDump -get-key in place of full camera parsing in perl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/camera_exp.pl

    r31531 r31906  
    155155
    156156    { # Determine if FWHM is too large to bother continuing.
    157         my $command = "$ppConfigDump -camera $camera -dump-camera -";
     157        my $maxFWHM = 0;
     158        my $command = "$ppConfigDump -camera $camera -get-key MAX_ALLOWED_FWHM";
    158159        my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    159160            run(command => $command, verbose => $verbose);
     
    162163            &my_die("Unable to perform ppConfigDump: $error_code", $cam_id, $PS_EXIT_CONFIG_ERROR);
    163164        }
    164         my $cameraConfig = $mdcParser->parse(join "", @$stdout_buf) or
    165             &my_die("Unable to parse metadata config doc", $cam_id, $PS_EXIT_CONFIG_ERROR);
    166 
    167         my $maxFWHM = metadataLookupStr($cameraConfig, 'MAX_ALLOWED_FWHM');
     165        if (@$stdout_buf) {
     166            my $cameraConfig = $mdcParser->parse(join "", @$stdout_buf) or
     167                &my_die("Unable to parse metadata config doc", $cam_id, $PS_EXIT_CONFIG_ERROR);
     168            $maxFWHM = metadataLookupStr($cameraConfig, 'MAX_ALLOWED_FWHM');
     169        }
    168170        if ($maxFWHM) {
    169171            my $expFWHM;
Note: See TracChangeset for help on using the changeset viewer.