Index: trunk/ppSim/src/ppSimSequenceDark.c
===================================================================
--- trunk/ppSim/src/ppSimSequenceDark.c	(revision 19080)
+++ trunk/ppSim/src/ppSimSequenceDark.c	(revision 19315)
@@ -1,12 +1,8 @@
 # include "ppSimSequence.h"
 
-bool ppSimSequenceDark (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, char *camera, const char *injectCommand) {
+bool ppSimSequenceDark (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, const char *ppSimCommand, const char *injectCommand) {
 
     bool status, setRate;
     float min, max = 0;
-
-    if (camera == NULL) {
-	camera = psMetadataLookupStr (&status, sequence, "CAMERA");
-    }
 
     setRate = false;
@@ -30,9 +26,18 @@
 
 	for (int j = 0; j < n; j++) {
+
+	    // XXX need to add output filename
+	    psString filename = NULL;
+	    if (path) {
+		psStringAppend (&filename, "%s/%s.%03d.%03d", path, basename, nSeq, nImage);
+	    } else {
+		psStringAppend (&filename, "%s.%03d.%03d", basename, nSeq, nImage);
+	    }
+
+	    // define the ppSim command
 	    psString command = NULL;
 
-	    psStringAppend (&command, "ppSim -type DARK");
-	    psStringAppend (&command, " -camera %s", camera);
-
+	    psStringAppend (&command, "%s -type DARK", ppSimCommand);
+      
 	    if (setRate) {
 		double frnd = psRandomUniform(rng);
@@ -43,11 +48,4 @@
 	    psStringAppend (&command, " -exptime %f", exptime);
 
-	    // XXX need to add output filename
-	    psString filename = NULL;
-	    if (path) {
-		psStringAppend (&filename, "%s/%s.%03d.%03d", path, basename, nSeq, nImage);
-	    } else {
-		psStringAppend (&filename, "%s.%03d.%03d", basename, nSeq, nImage);
-	    }
 	    psStringAppend (&command, " %s", filename);
 
@@ -55,7 +53,7 @@
 	    psFree (command);
 			    
+	    // define the inject command
 	    // path should be dirname/filename
 	    command = psStringCopy (injectCommand);
-	    psStringAppend (&command, " --camera %s", camera);
 	    psStringAppend (&command, " %s*.fits",    filename);
 	    fprintf (inject, "%s\n", command);
