IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 10554


Ignore:
Timestamp:
Dec 8, 2006, 1:54:57 AM (20 years ago)
Author:
eugene
Message:

moved CHIP_SELECTIONS to recipe, fixed leak

Location:
trunk/psphot/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotArguments.c

    r10492 r10554  
    8989    }
    9090
    91     // drop the local view on the options (saved in config->arguments)
     91    // chip selection is used to limit chips to be processed
     92    if ((N = psArgumentGet (argc, argv, "-chip"))) {
     93        psArgumentRemove (N, &argc, argv);
     94        psMetadataAddStr (options, PS_LIST_TAIL, "CHIP_SELECTIONS", PS_DATA_STRING, "", argv[N]);
     95        psArgumentRemove (N, &argc, argv);
     96    }
     97
     98    // drop the local view on the options (saved in config->arguments:PSPHOT_RECIPE)
    9299    psFree (options);
    93100
     
    97104        psError(PSPHOT_ERR_ARGUMENTS, false, "pmConfigFileSetsMD failed to parse arguments");
    98105        return NULL;
    99     }
    100 
    101     // chip selection is used to limit chips to be processed
    102     if ((N = psArgumentGet (argc, argv, "-chip"))) {
    103         psArgumentRemove (N, &argc, argv);
    104         psMetadataAddStr (config->arguments, PS_LIST_TAIL, "CHIP_SELECTIONS", PS_DATA_STRING, "", psStringCopy(argv[N]));
    105         psArgumentRemove (N, &argc, argv);
    106106    }
    107107
  • trunk/psphot/src/psphotParseCamera.c

    r10437 r10554  
    7474
    7575    // Chip selection: turn on only the chips specified (pass status to suppress missing-key log msg)
    76     // XXX why not put this in the recipe?
    77     char *chipLine = psMetadataLookupStr(&status, config->arguments, "CHIP_SELECTIONS");
     76    char *chipLine = psMetadataLookupStr(&status, recipe, "CHIP_SELECTIONS");
    7877    psArray *chips = psStringSplitArray (chipLine, ",", false);
    7978    if (chips->n > 0) {
     79        // select on the basis of extname?
    8080        pmFPASelectChip (input->fpa, -1, true); // deselect all chips
    8181        for (int i = 0; i < chips->n; i++) {
    8282            int chipNum = atoi(chips->data[i]);
     83            fprintf (stderr, "select chip %d\n", chipNum);
    8384            if (! pmFPASelectChip(input->fpa, chipNum, false)) {
    8485                psError(PS_ERR_IO, false, "Chip number %d doesn't exist in camera.\n", chipNum);
Note: See TracChangeset for help on using the changeset viewer.