Changeset 43081
- Timestamp:
- Sep 7, 2026, 4:51:13 PM (2 weeks ago)
- Location:
- branches/eam_branches/ipp-pstamp-20260421/ppSim/src
- Files:
-
- 5 edited
-
ppSimSequence.h (modified) (1 diff)
-
ppSimSequenceBias.c (modified) (4 diffs)
-
ppSimSequenceDark.c (modified) (3 diffs)
-
ppSimSequenceFlat.c (modified) (2 diffs)
-
ppSimSequenceObject.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-pstamp-20260421/ppSim/src/ppSimSequence.h
r42385 r43081 17 17 bool ppSimSequenceObject (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, const char *refcat, const char *ppSimCommand, const char *injectCommand, psArray *files); 18 18 19 psString ppSimDefineExpname (const char *basename, int nSeq, int nImage); 20 psString ppSimDefineFilename (const char *path, const char *expname); 21 19 22 #endif -
branches/eam_branches/ipp-pstamp-20260421/ppSim/src/ppSimSequenceBias.c
r27967 r43081 15 15 for (int i = 0; i < nImages; i++) { 16 16 17 // define the output filename18 psString filename = NULL;19 if (path) {20 psStringAppend (&filename, "%s/%s.%03d.%03d", path, basename, nSeq, nImage);21 } else {22 psStringAppend (&filename, "%s.%03d.%03d", basename, nSeq, nImage);23 }24 25 17 // define the ppSim command 26 18 psString command = NULL; … … 30 22 if (setLevel) psStringAppend (&command, " -biaslevel %f", level); 31 23 if (setRange) psStringAppend (&command, " -biasrange %f", range); 32 24 25 // define the exposure name and output filename 26 psString expname = ppSimDefineExpname (basename, nSeq, nImage); 27 psString filename = ppSimDefineFilename (path, expname); 28 29 // add output filename to the end of the full command 33 30 psStringAppend (&command, " %s", filename); 34 31 … … 42 39 for (int i = 0; i < files->n; i++) { 43 40 command = psStringCopy (injectCommand); 44 psStringAppend (&command, " %s.%s", filename, (char *) files->data[i]);41 psStringAppend (&command, " --exp_name %s %s.%s", expname, filename, (char *) files->data[i]); 45 42 fprintf (inject, "%s\n", command); 46 43 psFree (command); 47 44 } 48 45 46 psFree (expname); 49 47 psFree (filename); 50 48 nImage ++; … … 52 50 return true; 53 51 } 52 53 psString ppSimDefineExpname (const char *basename, int nSeq, int nImage) { 54 55 // define the exposure name 56 psString expname = NULL; 57 psStringAppend (&expname, "%s.%03d.%03d", basename, nSeq, nImage); 58 return expname; 59 } 60 61 psString ppSimDefineFilename (const char *path, const char *expname) { 62 63 // define the output filename 64 psString filename = NULL; 65 if (path) { 66 psStringAppend (&filename, "%s/%s", path, expname); 67 } else { 68 psStringAppend (&filename, "%s", expname); 69 } 70 return filename; 71 } -
branches/eam_branches/ipp-pstamp-20260421/ppSim/src/ppSimSequenceDark.c
r27967 r43081 27 27 for (int j = 0; j < n; j++) { 28 28 29 // XXX need to add output filename30 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 29 // define the ppSim command 38 30 psString command = NULL; … … 48 40 psStringAppend (&command, " -exptime %f", exptime); 49 41 42 // define the exposure name and output filename 43 psString expname = ppSimDefineExpname (basename, nSeq, nImage); 44 psString filename = ppSimDefineFilename (path, expname); 45 46 // add output filename to the end of the full command 50 47 psStringAppend (&command, " %s", filename); 51 48 … … 59 56 for (int i = 0; i < files->n; i++) { 60 57 command = psStringCopy (injectCommand); 61 psStringAppend (&command, " %s.%s", filename, (char *) files->data[i]);58 psStringAppend (&command, " --exp_name %s %s.%s", expname, filename, (char *) files->data[i]); 62 59 fprintf (inject, "%s\n", command); 63 60 psFree (command); 64 61 } 65 62 63 psFree (expname); 66 64 psFree (filename); 67 65 nImage ++; -
branches/eam_branches/ipp-pstamp-20260421/ppSim/src/ppSimSequenceFlat.c
r27967 r43081 27 27 for (int j = 0; j < nSetup; j++) { 28 28 29 // define the output filename30 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 29 // define the ppSim comand 38 30 psString command = NULL; 39 31 40 32 psStringAppend (&command, "%s -type FLAT", ppSimCommand); 41 42 33 psStringAppend (&command, " -filter %s", (char *) filters->data[i]); 43 34 psStringAppend (&command, " -exptime %f", exptimes->data.F32[i]); 35 36 // define the exposure name and output filename 37 psString expname = ppSimDefineExpname (basename, nSeq, nImage); 38 psString filename = ppSimDefineFilename (path, expname); 44 39 45 40 psStringAppend (&command, " %s", filename); … … 54 49 for (int i = 0; i < files->n; i++) { 55 50 command = psStringCopy (injectCommand); 56 psStringAppend (&command, " %s.%s", filename, (char *) files->data[i]);51 psStringAppend (&command, " --exp_name %s %s.%s", expname, filename, (char *) files->data[i]); 57 52 fprintf (inject, "%s\n", command); 58 53 psFree (command); 59 54 } 60 55 56 psFree (expname); 61 57 psFree (filename); 62 58 nImage ++; -
branches/eam_branches/ipp-pstamp-20260421/ppSim/src/ppSimSequenceObject.c
r43068 r43081 79 79 for (float pos = pos_min; pos <= pos_max; pos += pos_delta) { 80 80 81 // define the output filename 82 psString filename = NULL; 83 if (path) { 84 psStringAppend (&filename, "%s/%s.%03d.%03d", path, basename, nSeq, nImage); 85 } else { 86 psStringAppend (&filename, "%s.%03d.%03d", basename, nSeq, nImage); 87 } 81 // define the exposure name and output filename 82 psString expname = ppSimDefineExpname (basename, nSeq, nImage); 83 psString filename = ppSimDefineFilename (path, expname); 88 84 89 85 // define the ppSim command … … 121 117 for (int i = 0; i < files->n; i++) { 122 118 command = psStringCopy (injectCommand); 123 psStringAppend (&command, " %s.%s", filename, (char *) files->data[i]);119 psStringAppend (&command, " --exp_name %s %s.%s", expname, filename, (char *) files->data[i]); 124 120 fprintf (inject, "%s\n", command); 125 121 psFree (command); 126 122 } 127 123 124 psFree (expname); 128 125 psFree (filename); 129 126 nImage ++;
Note:
See TracChangeset
for help on using the changeset viewer.
