IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 31531


Ignore:
Timestamp:
May 11, 2011, 5:05:21 PM (15 years ago)
Author:
watersc1
Message:

Test the fwhm against the camera config defined value, and skip running psastro if this image has terrible seeing.

File:
1 edited

Legend:

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

    r30071 r31531  
    153153    }
    154154    chomp $cmdflags;
     155
     156    { # Determine if FWHM is too large to bother continuing.
     157        my $command = "$ppConfigDump -camera $camera -dump-camera -";
     158        my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     159            run(command => $command, verbose => $verbose);
     160        unless ($success) {
     161            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     162            &my_die("Unable to perform ppConfigDump: $error_code", $cam_id, $PS_EXIT_CONFIG_ERROR);
     163        }
     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');
     168        if ($maxFWHM) {
     169            my $expFWHM;
     170            ($expFWHM) = $cmdflags =~ /-fwhm_major (\d+)/;     
     171           
     172            if ($expFWHM > $maxFWHM) {
     173                print "Setting quality to 4007 due to large FWHM: exposure: $expFWHM  maximum: $maxFWHM\n";
     174                $cmdflags .= " -quality 4007 "; # This corresponds to PSASTRO_ERR_DATA
     175                $no_op = 1;
     176            }
     177        }
     178    }
    155179}
    156180
Note: See TracChangeset for help on using the changeset viewer.