IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 4, 2008, 2:27:02 PM (18 years ago)
Author:
eugene
Message:

adding ADDSTAR recipe to set options on addstar (eg, images only)

File:
1 edited

Legend:

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

    r19332 r19375  
    6868my $recipe2 = $ipprc->reduction($reduction, 'JPEG_BIN2'); # Recipe to use
    6969&my_die("Unrecognised JPEG recipe", $cam_id, $PS_EXIT_CONFIG_ERROR) unless defined $recipe2;
     70
     71my $recipe_addstar = $ipprc->reduction($reduction, 'ADDSTAR'); # Recipe to use
     72&my_die("Unrecognised ADDSTAR recipe", $cam_id, $PS_EXIT_CONFIG_ERROR) unless defined $recipe1;
    7073
    7174# values to extract from output metadata and the stats to calculate
     
    201204}
    202205
     206
    203207unless ($no_op) {
    204208
     
    273277        # run addstar on the output fpaObjects (if a DVO database is defined)
    274278        if (defined $dvodbReal) {
     279
     280            ## XXX the camera analysis can either save the full set of
     281            ## detections, or just the image metadata, in the dvodb
     282
     283            ## get the addstar recipe for this camera and CAMERA reduction
     284            $command = "$ppConfigDump -camera $camera -dump-recipe ADDSTAR -recipe ADDSTAR $recipe_addstar -";
     285            ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
     286                run(command => $command, verbose => $verbose);
     287            unless ($success) {
     288                $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
     289                &my_die("Unable to perform ppConfigDump: $error_code", $cam_id, $PS_EXIT_SYS_ERROR);
     290            }
     291            my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or
     292                &my_die("Unable to parse metadata config doc", $cam_id, $PS_EXIT_SYS_ERROR);
     293
     294            ## allow the dvodb to save only images, or the full detection set
     295            my $imagesOnly = metadataLookupBool($recipeData, 'IMAGES.ONLY');
     296
    275297            # XXX this construct requires the user to have a valid .ptolemyrc
    276298            # XXX which in turn points at ippconfig/dvo.site
     
    280302            my $camdir = $ipprc->dvo_cameradir(); # Camera directory for addstar
    281303            my $command;
    282             $command  = "$addstar -image -D CAMERA $camdir -update";
     304            $command  = "$addstar -D CAMERA $camdir -update";
     305            $command .= " -image" if $imagesOnly;
    283306            $command .= " -D CATDIR $dvodbReal";
    284307
Note: See TracChangeset for help on using the changeset viewer.