IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 18, 2010, 12:49:05 PM (16 years ago)
Author:
eugene
Message:

merging changes from trunk into branches/pap

Location:
branches/pap
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/pap

  • branches/pap/ppSim/src/ppSimSequenceFlat.c

    r19315 r28003  
    11# include "ppSimSequence.h"
    22
    3 bool ppSimSequenceFlat (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, const char *ppSimCommand, const char *injectCommand) {
     3bool ppSimSequenceFlat (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, const char *ppSimCommand, const char *injectCommand, psArray *files) {
    44
    55    bool status;
     
    2626        // loop over the filters & exposure times
    2727        for (int j = 0; j < nSetup; j++) {
    28            
     28               
    2929            // define the output filename
    3030            psString filename = NULL;
     
    5050            // define the inject command
    5151            // path should be dirname/filename
    52             command = psStringCopy (injectCommand);
    53             psStringAppend (&command, " %s*.fits",    filename);
    54             fprintf (inject, "%s\n", command);
    55             psFree (command);
    56             psFree (filename);
     52       
     53            // we use the filename above (really the file root) to construct the filenames
     54            for (int i = 0; i < files->n; i++) {
     55                command = psStringCopy (injectCommand);
     56                psStringAppend (&command, " %s.%s", filename, (char *) files->data[i]);
     57                fprintf (inject, "%s\n", command);
     58                psFree (command);
     59            }
    5760
    58             nImage ++;
     61            psFree (filename);
     62            nImage ++;
    5963        }
    6064    }
Note: See TracChangeset for help on using the changeset viewer.