Changeset 19315 for trunk/ppSim/src/ppSimSequenceObject.c
- Timestamp:
- Sep 2, 2008, 9:14:17 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppSim/src/ppSimSequenceObject.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSim/src/ppSimSequenceObject.c
r19080 r19315 1 1 # include "ppSimSequence.h" 2 2 3 bool ppSimSequenceObject (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, c har *camera, const char *injectCommand) {3 bool ppSimSequenceObject (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; … … 8 8 // ppSim -camera $camera -type OBJECT -filter $filter -exptime $exptime 9 9 // -skyrate $sky -ra $ra -dec $dec -pa $pa -scale $scale -zp $zp -seeing $seeing $filename", 10 11 if (camera == NULL) {12 camera = psMetadataLookupStr (&status, sequence, "CAMERA");13 }14 10 15 11 // sequence reference coordinate … … 80 76 for (float pos = pos_min; pos <= pos_max; pos += pos_delta) { 81 77 78 // define the output filename 79 psString filename = NULL; 80 if (path) { 81 psStringAppend (&filename, "%s/%s.%03d.%03d", path, basename, nSeq, nImage); 82 } else { 83 psStringAppend (&filename, "%s.%03d.%03d", basename, nSeq, nImage); 84 } 85 86 // define the ppSim command 82 87 psString command = NULL; 83 88 84 psStringAppend (&command, "ppSim -type OBJECT"); 85 psStringAppend (&command, " -camera %s", camera); 89 psStringAppend (&command, "%s -type OBJECT", ppSimCommand); 86 90 psStringAppend (&command, " -filter %s", (char *) filters->data[i]); 87 91 psStringAppend (&command, " -exptime %f", exptimes->data.F32[i]); … … 97 101 psStringAppend (&command, " -seeing %f", seeing); 98 102 99 // XXX need to add output filename100 psString filename = NULL;101 if (path) {102 psStringAppend (&filename, "%s/%s.%03d.%03d", path, basename, nSeq, nImage);103 } else {104 psStringAppend (&filename, "%s.%03d.%03d", basename, nSeq, nImage);105 }106 103 psStringAppend (&command, " %s", filename); 107 104 … … 109 106 psFree (command); 110 107 108 // define the inject command 111 109 // path should be dirname/filename 112 110 command = psStringCopy (injectCommand); 113 psStringAppend (&command, " --camera %s", camera);114 111 psStringAppend (&command, " %s*.fits", filename); 115 112 fprintf (inject, "%s\n", command);
Note:
See TracChangeset
for help on using the changeset viewer.
