IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 21, 2006, 12:44:16 PM (20 years ago)
Author:
magnier
Message:

various fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAfileDefine.c

    r7589 r7618  
    109109        return NULL;
    110110    }
     111    // default is to free the data after use (after written out)
     112    // this can be overridden for pmFPAfiles used as carriers as well
     113    file->freeLevel = file->dataLevel;
    111114
    112115    if (fpa != NULL) {
     
    199202    char *save = psMetadataLookupStr (&status, data, "FILE.SAVE");
    200203    if (save != NULL) {
    201         if (!strcasecmp (type, "TRUE"))     {
     204        if (!strcasecmp (save, "TRUE"))     {
    202205            file->save = true;
    203206        }
    204         if (!strcasecmp (type, "FALSE"))     {
     207        if (!strcasecmp (save, "FALSE"))     {
    205208            file->save = false;
    206209        }
     
    218221        return NULL;
    219222    }
     223    // default is to free the data after use (after written out)
     224    // this can be overridden for pmFPAfiles used as carriers as well
     225    file->freeLevel = file->dataLevel;
    220226
    221227    if (fpa != NULL) {
     
    266272    }
    267273
     274    // add argument-supplied OUTPUT name to this file
     275    char *outname = psMetadataLookupStr(&status, config->arguments, "OUTPUT");
     276    psMetadataAddStr (file->names, PS_LIST_TAIL, "OUTPUT", PS_META_NO_REPLACE, "", outname);
     277
     278    // place the resulting file in the config system
    268279    psMetadataAddPtr (config->files, PS_LIST_TAIL, name, PS_DATA_UNKNOWN, "", file);
    269280    psFree (file); // we free this copy of file, but 'files' still has a copy
     
    616627    PS_ASSERT_INT_POSITIVE(strlen(filename), false);
    617628
    618     pmFPA *fpa = pmFPAConstruct (config->camera);
     629    pmFPA *fpa = pmFPAConstruct (src->camera);
    619630    pmFPAfile *file = pmFPAfileDefineOutput (config, fpa, filename);
    620631    if (!file) {
     
    648659    }
    649660    file->fpa = pmFPAConstruct(file->camera);
     661
     662    for (int i = 0; i < file->fpa->chips->n; i++) {
     663        pmChip *chip = file->fpa->chips->data[i];
     664        for (int j = 0; j < chip->cells->n; j++) {
     665            pmCell *cell = chip->cells->data[j];
     666            char *name = psMetadataLookupStr (NULL, cell->concepts, "CELL.NAME");
     667            fprintf (stderr, "cell %d,%d : %s\n", i, j, name);
     668        }
     669    }
     670
    650671    return file;
    651672}
Note: See TracChangeset for help on using the changeset viewer.