IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 14, 2023, 12:59:01 PM (3 years ago)
Author:
tdeboer
Message:

burntool handling/parsing updates

File:
1 edited

Legend:

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

    r38168 r42394  
    260260        }
    261261
     262
     263        # Determine the value of a "good" burntool run.
     264        my $config_cmd = "$ppConfigDump -camera $camera -get-key BURNTOOL.STATE.GOOD";
     265        my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     266            run ( command => $config_cmd, verbose => $verbose);
     267        unless ($success) {
     268            $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     269            &my_die("Unable to perform ppConfigDump: $error_code", $exp_id, $class_id, $PS_EXIT_SYS_ERROR);
     270        }
     271
     272        my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or
     273            &my_die("Unable to parse metadata config doc", $exp_id, $class_id, $PS_EXIT_SYS_ERROR);
     274
     275        my $burntoolStateGood = 999;
     276        foreach my $cfg (@$recipeData) {
     277            if ($cfg->{name} eq 'BURNTOOL.STATE.GOOD') {
     278                $burntoolStateGood = $cfg->{value};
     279            }
     280        }
     281        if ($burntoolStateGood == 999) {
     282            &my_die("Failed to determine BURNTOOL.STATE.GOOD", $exp_id, $class_id, $PS_EXIT_SYS_ERROR);
     283        }
     284
     285
    262286        # The image exists, so continue.  This resets the variables, but also outputs the file locations.
    263287        ($ipp_uri, $remote_uri) = uri_to_outputs_raw($uri);
    264288        my $btt = $uri;
    265         $btt =~ s/fits$/burn.tbl/;
    266 
     289        if($burntoolStateGood == 15) {
     290            $btt =~ s/fits$/burn.v15.tbl/;   
     291        } else {
     292            $btt =~ s/fits$/burn.tbl/;     
     293        }
     294       
    267295        # Check burntool table for existance, and if it doesn't, regenerate it.
    268296        my ($ipp_btt, $remote_btt) = uri_convert($btt);
Note: See TracChangeset for help on using the changeset viewer.