IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 7, 2026, 4:51:13 PM (3 weeks ago)
Author:
eugene
Message:

add option to pass expname to ipp_inject_fileset.pl, small code refactor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-pstamp-20260421/ppSim/src/ppSimSequenceDark.c

    r27967 r43081  
    2727        for (int j = 0; j < n; j++) {
    2828
    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 
    3729            // define the ppSim command
    3830            psString command = NULL;
    … …  
    4840            psStringAppend (&command, " -exptime %f", exptime);
    4941
     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
    5047            psStringAppend (&command, " %s", filename);
    5148
    … …  
    5956            for (int i = 0; i < files->n; i++) {
    6057                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]);
    6259                fprintf (inject, "%s\n", command);
    6360                psFree (command);
    6461            }
    6562
     63            psFree (expname);
    6664            psFree (filename);
    6765            nImage ++;
Note: See TracChangeset for help on using the changeset viewer.