Changeset 27967 for trunk/ppSim/src/ppSimSequenceDark.c
- Timestamp:
- May 16, 2010, 1:00:37 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ppSim/src/ppSimSequenceDark.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSim/src/ppSimSequenceDark.c
r19315 r27967 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, const char *ppSimCommand, 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, psArray *files) { 4 4 5 5 bool status, setRate; … … 39 39 40 40 psStringAppend (&command, "%s -type DARK", ppSimCommand); 41 41 42 42 if (setRate) { 43 43 double frnd = psRandomUniform(rng); … … 52 52 fprintf (simfile, "%s\n", command); 53 53 psFree (command); 54 54 55 55 // define the inject command 56 56 // path should be dirname/filename 57 command = psStringCopy (injectCommand); 58 psStringAppend (&command, " %s*.fits", filename); 59 fprintf (inject, "%s\n", command); 60 psFree (command); 61 psFree (filename); 57 58 // we use the filename above (really the file root) to construct the filenames 59 for (int i = 0; i < files->n; i++) { 60 command = psStringCopy (injectCommand); 61 psStringAppend (&command, " %s.%s", filename, (char *) files->data[i]); 62 fprintf (inject, "%s\n", command); 63 psFree (command); 64 } 62 65 63 nImage ++; 64 } 66 psFree (filename); 67 nImage ++; 68 } 65 69 } 66 70 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
