Index: /trunk/ippScripts/scripts/flatcorr_proc.pl
===================================================================
--- /trunk/ippScripts/scripts/flatcorr_proc.pl	(revision 20193)
+++ /trunk/ippScripts/scripts/flatcorr_proc.pl	(revision 20194)
@@ -80,5 +80,5 @@
 my $mdcParser = PS::IPP::Metadata::Config->new; # Parser for metadata config files
 
-my $outgrid = "$workdir/grid.$corr_id.fits";
+my $outgrid = "$workdir/grid.$corr_id";
 my $outcorr = "$workdir/corr.$corr_id";
 
@@ -106,8 +106,11 @@
 {
     my $command = "echo $relphot $filter";
+    $command .= " -D CAMERA $camera";
     $command .= " -D CATDIR $dvodb";
     $command .= " -region $RAs $RAe $DECs $DECe";
-    $command .= " -grid $outgrid";
-    $command .= " -imfreeze";
+    $command .= " -outroot $outgrid";
+    $command .= " -imfreeze -reset -grid -mosaic";
+    # XXX the -mosaic option should be recipe-selected (only valid for multichip cameras)
+    # XXX update the catdir after the analysis is done?
 
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
@@ -230,5 +233,5 @@
 
     my $command = "echo $dvoMakeCorr $outcorr";
-    $command .= " -file $outgrid";
+    $command .= " -file $outgrid.fits";
     $command .= " -ref $reffile";
 
