Changeset 28003 for branches/pap/ppSim/src/ppSimSequenceBias.c
- Timestamp:
- May 18, 2010, 12:49:05 PM (16 years ago)
- Location:
- branches/pap
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppSim/src/ppSimSequenceBias.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap
- Property svn:mergeinfo changed
-
branches/pap/ppSim/src/ppSimSequenceBias.c
r19315 r28003 1 1 # include "ppSimSequence.h" 2 2 3 bool ppSimSequenceBias (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, const char *ppSimCommand, const char *injectCommand ) {3 bool ppSimSequenceBias (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, setLevel, setRange; … … 14 14 int nImage = 0; 15 15 for (int i = 0; i < nImages; i++) { 16 16 17 17 // define the output filename 18 18 psString filename = NULL; … … 30 30 if (setLevel) psStringAppend (&command, " -biaslevel %f", level); 31 31 if (setRange) psStringAppend (&command, " -biasrange %f", range); 32 32 33 33 psStringAppend (&command, " %s", filename); 34 34 35 35 fprintf (simfile, "%s\n", command); 36 36 psFree (command); 37 37 38 38 // define the inject command 39 39 // path should be dirname/filename 40 command = psStringCopy (injectCommand); 41 psStringAppend (&command, " %s*.fits", filename); 42 fprintf (inject, "%s\n", command); 43 psFree (command); 40 41 // we use the filename above (really the file root) to construct the filenames 42 for (int i = 0; i < files->n; i++) { 43 command = psStringCopy (injectCommand); 44 psStringAppend (&command, " %s.%s", filename, (char *) files->data[i]); 45 fprintf (inject, "%s\n", command); 46 psFree (command); 47 } 48 44 49 psFree (filename); 45 46 nImage ++; 50 nImage ++; 47 51 } 48 52 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
