Index: trunk/ippScripts/scripts/camera_exp.pl
===================================================================
--- trunk/ippScripts/scripts/camera_exp.pl	(revision 19332)
+++ trunk/ippScripts/scripts/camera_exp.pl	(revision 19375)
@@ -68,4 +68,7 @@
 my $recipe2 = $ipprc->reduction($reduction, 'JPEG_BIN2'); # Recipe to use
 &my_die("Unrecognised JPEG recipe", $cam_id, $PS_EXIT_CONFIG_ERROR) unless defined $recipe2;
+
+my $recipe_addstar = $ipprc->reduction($reduction, 'ADDSTAR'); # Recipe to use
+&my_die("Unrecognised ADDSTAR recipe", $cam_id, $PS_EXIT_CONFIG_ERROR) unless defined $recipe1;
 
 # values to extract from output metadata and the stats to calculate
@@ -201,4 +204,5 @@
 }
 
+
 unless ($no_op) {
 
@@ -273,4 +277,22 @@
         # run addstar on the output fpaObjects (if a DVO database is defined)
         if (defined $dvodbReal) {
+
+	    ## XXX the camera analysis can either save the full set of
+	    ## detections, or just the image metadata, in the dvodb
+
+	    ## get the addstar recipe for this camera and CAMERA reduction
+	    $command = "$ppConfigDump -camera $camera -dump-recipe ADDSTAR -recipe ADDSTAR $recipe_addstar -";
+	    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+		run(command => $command, verbose => $verbose);
+	    unless ($success) {
+		$error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+		&my_die("Unable to perform ppConfigDump: $error_code", $cam_id, $PS_EXIT_SYS_ERROR);
+	    }
+	    my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or
+		&my_die("Unable to parse metadata config doc", $cam_id, $PS_EXIT_SYS_ERROR);
+
+	    ## allow the dvodb to save only images, or the full detection set
+	    my $imagesOnly = metadataLookupBool($recipeData, 'IMAGES.ONLY');
+
             # XXX this construct requires the user to have a valid .ptolemyrc
             # XXX which in turn points at ippconfig/dvo.site
@@ -280,5 +302,6 @@
             my $camdir = $ipprc->dvo_cameradir(); # Camera directory for addstar
             my $command;
-            $command  = "$addstar -image -D CAMERA $camdir -update";
+            $command  = "$addstar -D CAMERA $camdir -update";
+	    $command .= " -image" if $imagesOnly;
             $command .= " -D CATDIR $dvodbReal";
 
