Index: trunk/ppSim/src/ppSimSequenceBias.c
===================================================================
--- trunk/ppSim/src/ppSimSequenceBias.c	(revision 19080)
+++ trunk/ppSim/src/ppSimSequenceBias.c	(revision 19315)
@@ -1,11 +1,7 @@
 # include "ppSimSequence.h"
 
-bool ppSimSequenceBias (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, char *camera, const char *injectCommand) {
+bool ppSimSequenceBias (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, const char *ppSimCommand, const char *injectCommand) {
 
     bool status, setLevel, setRange;
-
-    if (camera == NULL) {
-	camera = psMetadataLookupStr (&status, sequence, "CAMERA");
-    }
 
     // optional details
@@ -19,33 +15,34 @@
     for (int i = 0; i < nImages; i++) {
 	    
-      psString command = NULL;
+	// define the 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, "ppSim -type BIAS");
-      psStringAppend (&command, " -camera %s", camera);
+	// define the ppSim command
+	psString command = NULL;
 
-      if (setLevel) psStringAppend (&command, " -biaslevel %f", level);
-      if (setRange) psStringAppend (&command, " -biasrange %f", range);
+	psStringAppend (&command, "%s -type BIAS", ppSimCommand);
 
-      // 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);
+	if (setLevel) psStringAppend (&command, " -biaslevel %f", level);
+	if (setRange) psStringAppend (&command, " -biasrange %f", range);
+      
+	psStringAppend (&command, " %s", filename);
 
-      fprintf (simfile, "%s\n", command);
-      psFree (command);
+	fprintf (simfile, "%s\n", command);
+	psFree (command);
 			    
-      // path should be dirname/filename
-      command = psStringCopy (injectCommand);
-      psStringAppend (&command, " --camera %s", camera);
-      psStringAppend (&command, " %s*.fits",    filename);
-      fprintf (inject, "%s\n", command);
-      psFree (command);
-      psFree (filename);
+	// define the inject command
+	// path should be dirname/filename
+	command = psStringCopy (injectCommand);
+	psStringAppend (&command, " %s*.fits",    filename);
+	fprintf (inject, "%s\n", command);
+	psFree (command);
+	psFree (filename);
 
-      nImage ++;
+	nImage ++;
     }
     return true;
