IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35723


Ignore:
Timestamp:
Jun 28, 2013, 3:32:59 PM (13 years ago)
Author:
bills
Message:

Get the cut for input seeing from new recipe value PSASTRO.MAX.ALLOWED.FWHM instead
of camera.config

Change value for CNP_DATASET recipe. Start using that recipe for CNP.nightlyscience

Location:
trunk
Files:
5 edited

Legend:

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

    r35715 r35723  
    117117my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
    118118
     119my $recipeData;
     120{
     121    # Get the PSASTRO recipe
     122    my $command = "$ppConfigDump -camera $camera -recipe PSASTRO $recipe_psastro -dump-recipe PSASTRO -";
     123    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     124        run(command => $command, verbose => $verbose);
     125    unless ($success) {
     126        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     127        &my_die("Unable to perform ppConfigDump: $error_code", $cam_id, $PS_EXIT_CONFIG_ERROR);
     128    }
     129    $recipeData = $mdcParser->parse(join "", @$stdout_buf) or
     130        &my_die("Unable to parse metadata config doc", $cam_id, $PS_EXIT_CONFIG_ERROR);
     131}
     132
    119133my $cmdflags;
    120134
     
    160174    chomp $cmdflags;
    161175
    162     { # Determine if FWHM is too large to bother continuing.
    163         my $maxFWHM = 0;
    164       # XXX: temporary hack if this is a CNP exposure set maxFWHM to a large
    165       # value.
    166       # Before the next tag we will put this into a recipe
    167       if ($outroot =~ /CNP/) {
    168             $maxFWHM = 25;
    169       } else {
    170         my $command = "$ppConfigDump -camera $camera -get-key MAX_ALLOWED_FWHM";
    171         my ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    172             run(command => $command, verbose => $verbose);
    173         unless ($success) {
    174             $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    175             &my_die("Unable to perform ppConfigDump: $error_code", $cam_id, $PS_EXIT_CONFIG_ERROR);
    176         }
    177         if (@$stdout_buf) {
    178             my $cameraConfig = $mdcParser->parse(join "", @$stdout_buf) or
    179                 &my_die("Unable to parse metadata config doc", $cam_id, $PS_EXIT_CONFIG_ERROR);
    180             $maxFWHM = metadataLookupStr($cameraConfig, 'MAX_ALLOWED_FWHM');
    181         }
    182       }
    183         if ($maxFWHM) {
    184             my $expFWHM;
    185             ($expFWHM) = $cmdflags =~ /-fwhm_major (\d+)/;     
    186            
    187             if ($expFWHM > $maxFWHM) {
    188                 print "Setting quality to 4007 due to large FWHM: exposure: $expFWHM  maximum: $maxFWHM\n";
    189                 $cmdflags .= " -quality 4007 "; # This corresponds to PSASTRO_ERR_DATA
    190                 $no_op = 1;
    191             }
    192         }
     176    # Determine if FWHM is too large to bother continuing.
     177    my $maxFWHM = metadataLookupF32($recipeData, 'PSASTRO.MAX.ALLOWED.FWHM');
     178    if ($maxFWHM) {
     179        my $expFWHM;
     180        ($expFWHM) = $cmdflags =~ /-fwhm_major (\d+)/; 
     181       
     182        if ($expFWHM > $maxFWHM) {
     183            print "Setting quality to 4007 due to large FWHM: exposure: $expFWHM  maximum: $maxFWHM\n";
     184            $cmdflags .= " -quality 4007 "; # This corresponds to PSASTRO_ERR_DATA
     185            $no_op = 1;
     186        }
    193187    }
    194188}
     
    197191my $do_masks;               # Produce masks?
    198192if (!$skip_masks) {
    199     # Get the PSASTRO recipe
    200     my $command = "$ppConfigDump -camera $camera -recipe PSASTRO $recipe_psastro -dump-recipe PSASTRO -";
    201     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
    202         run(command => $command, verbose => $verbose);
    203     unless ($success) {
    204         $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
    205         &my_die("Unable to perform ppConfigDump: $error_code", $cam_id, $PS_EXIT_CONFIG_ERROR);
    206     }
    207     my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or
    208         &my_die("Unable to parse metadata config doc", $cam_id, $PS_EXIT_CONFIG_ERROR);
    209 
    210193    $do_masks = metadataLookupBool($recipeData, 'REFSTAR_MASK');
    211194}
     
    235218    $psastroInputArg = " -list $list3Name";
    236219} else {
    237     # for $run_state eq 'update' we onlly rebuild the masks using psastro
     220    # for $run_state eq 'update' we only rebuild the masks using psastro
    238221    $do_stats = 0;
    239222    $do_jpegs = 0;
     
    317300    $configuration = prepare_output("PSASTRO.CONFIG",  $outroot, undef, 1);
    318301} else {
    319     # Do not use the original recipes because they might contain the
     302    # Do not use the original recipes for updates because they might contain the
    320303    # recipe values that caused the masks to get fouled up in the first place
    321304    # $configuration = $ipprc->filename("PSASTRO.CONFIG",  $outroot, undef);
  • trunk/ippconfig/gpc1/psastro.config

    r35490 r35723  
    111111#PSASTRO.MODEL.BORESITE.X      F32      -200.0
    112112#PSASTRO.MODEL.BORESITE.Y      F32     -300.0
     113
     114# maximum accepted fwhm_major (moved from camera.config
     115PSASTRO.MAX.ALLOWED.FWHM              F32       12
    113116
    114117# *** make sure the choice of CATDIR (dvo database) contains the photcodes desired below
     
    360363END
    361364
     365CNP_DATASET METADATA
     366    ZERO.POINT.USE.MEAN         BOOL    TRUE
     367    PSASTRO.MAX.ALLOWED.FWHM    F32     25
     368END
     369
    362370LAP_ASTRO METADATA
    363371#  PSASTRO.CATDIR                STR      3PI.20110505.REFCAT
  • trunk/ippconfig/megacam/psastro.config

    r31674 r35723  
    5050PSASTRO.MAX.ERROR      F32      10.0 # max error in pixels
    5151PSASTRO.MIN.NSTAR      S32      10   # min fitted stars in solution
     52
     53PSASTRO.MAX.ALLOWED.FWHM      F32       25
    5254
    5355PSASTRO.MOSAIC.MODE           BOOL     TRUE
  • trunk/ippconfig/recipes/nightly_science.config

    r34800 r35723  
    281281  STACKABLE   BOOL FALSE
    282282  DIFFABLE    BOOL FALSE
     283  REDUCTION   STR  CNP_DATASET
    283284  CHIP        S16  800
    284285  WARP        S16  800
  • trunk/ippconfig/recipes/psastro.config

    r34966 r35723  
    179179MASKSTAT.ADVISORY   U32 0x080
    180180
    181 
     181# maximum allowed fwhm_major (moved from */camera.config)
     182PSASTRO.MAX.ALLOWED.FWHM    F32     0
    182183
    183184# 2MASS default configuration (use 2MASS_J as ref magnitude)
     
    265266END
    266267
     268CNP_DATASET METADATA
     269END
     270
    267271SYNTH_CAT METADATA
    268272END
Note: See TracChangeset for help on using the changeset viewer.