IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 2, 2008, 9:14:17 AM (18 years ago)
Author:
eugene
Message:

adding ppsim_recipe and camera options

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSim/src/ppSimSequenceDark.c

    r19080 r19315  
    11# include "ppSimSequence.h"
    22
    3 bool ppSimSequenceDark (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, char *camera, const char *injectCommand) {
     3bool ppSimSequenceDark (FILE *simfile, FILE *inject, psMetadata *sequence, int nSeq, psRandom *rng, const char *path, const char *basename, const char *ppSimCommand, const char *injectCommand) {
    44
    55    bool status, setRate;
    66    float min, max = 0;
    7 
    8     if (camera == NULL) {
    9         camera = psMetadataLookupStr (&status, sequence, "CAMERA");
    10     }
    117
    128    setRate = false;
     
    3026
    3127        for (int j = 0; j < n; j++) {
     28
     29            // XXX need to add output filename
     30            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            // define the ppSim command
    3238            psString command = NULL;
    3339
    34             psStringAppend (&command, "ppSim -type DARK");
    35             psStringAppend (&command, " -camera %s", camera);
    36 
     40            psStringAppend (&command, "%s -type DARK", ppSimCommand);
     41     
    3742            if (setRate) {
    3843                double frnd = psRandomUniform(rng);
     
    4348            psStringAppend (&command, " -exptime %f", exptime);
    4449
    45             // XXX need to add output filename
    46             psString filename = NULL;
    47             if (path) {
    48                 psStringAppend (&filename, "%s/%s.%03d.%03d", path, basename, nSeq, nImage);
    49             } else {
    50                 psStringAppend (&filename, "%s.%03d.%03d", basename, nSeq, nImage);
    51             }
    5250            psStringAppend (&command, " %s", filename);
    5351
     
    5553            psFree (command);
    5654                           
     55            // define the inject command
    5756            // path should be dirname/filename
    5857            command = psStringCopy (injectCommand);
    59             psStringAppend (&command, " --camera %s", camera);
    6058            psStringAppend (&command, " %s*.fits",    filename);
    6159            fprintf (inject, "%s\n", command);
Note: See TracChangeset for help on using the changeset viewer.