Changeset 19315 for trunk/ppSim/src/ppSimSequenceDark.c
- Timestamp:
- Sep 2, 2008, 9:14:17 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppSim/src/ppSimSequenceDark.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSim/src/ppSimSequenceDark.c
r19080 r19315 1 1 # include "ppSimSequence.h" 2 2 3 bool ppSimSequenceDark (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, c har *camera, const char *injectCommand) {3 bool ppSimSequenceDark (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, const char *ppSimCommand, const char *injectCommand) { 4 4 5 5 bool status, setRate; 6 6 float min, max = 0; 7 8 if (camera == NULL) {9 camera = psMetadataLookupStr (&status, sequence, "CAMERA");10 }11 7 12 8 setRate = false; … … 30 26 31 27 for (int j = 0; j < n; j++) { 28 29 // XXX need to add output filename 30 psString filename = NULL; 31 if (path) { 32 psStringAppend (&filename, "%s/%s.%03d.%03d", path, basename, nSeq, nImage); 33 } else { 34 psStringAppend (&filename, "%s.%03d.%03d", basename, nSeq, nImage); 35 } 36 37 // define the ppSim command 32 38 psString command = NULL; 33 39 34 psStringAppend (&command, "ppSim -type DARK"); 35 psStringAppend (&command, " -camera %s", camera); 36 40 psStringAppend (&command, "%s -type DARK", ppSimCommand); 41 37 42 if (setRate) { 38 43 double frnd = psRandomUniform(rng); … … 43 48 psStringAppend (&command, " -exptime %f", exptime); 44 49 45 // XXX need to add output filename46 psString filename = NULL;47 if (path) {48 psStringAppend (&filename, "%s/%s.%03d.%03d", path, basename, nSeq, nImage);49 } else {50 psStringAppend (&filename, "%s.%03d.%03d", basename, nSeq, nImage);51 }52 50 psStringAppend (&command, " %s", filename); 53 51 … … 55 53 psFree (command); 56 54 55 // define the inject command 57 56 // path should be dirname/filename 58 57 command = psStringCopy (injectCommand); 59 psStringAppend (&command, " --camera %s", camera);60 58 psStringAppend (&command, " %s*.fits", filename); 61 59 fprintf (inject, "%s\n", command);
Note:
See TracChangeset
for help on using the changeset viewer.
