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/ppSimSequenceFlat.c

    r27967 r43081  
    2727        for (int j = 0; j < nSetup; j++) {
    2828               
    29             // define the 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 comand
    3830            psString command = NULL;
    3931
    4032            psStringAppend (&command, "%s -type FLAT", ppSimCommand);
    41 
    4233            psStringAppend (&command, " -filter %s", (char *) filters->data[i]);
    4334            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);
    4439
    4540            psStringAppend (&command, " %s", filename);
    … …  
    5449            for (int i = 0; i < files->n; i++) {
    5550                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]);
    5752                fprintf (inject, "%s\n", command);
    5853                psFree (command);
    5954            }
    6055
     56            psFree (expname);
    6157            psFree (filename);
    6258            nImage ++;
Note: See TracChangeset for help on using the changeset viewer.