IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 30, 2005, 6:32:45 PM (21 years ago)
Author:
eugene
Message:

first pass on testing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeParseCamera.c

    r5860 r5862  
    3838            ppFPA *fpa = ppFPA_Alloc ();
    3939            fpa->filename = psStringCopy (globList.gl_pathv[i]);
     40            psArrayAdd (input, 100, fpa);
    4041        }
    41         psArrayAdd (input, 100, fpa);
    4242    }
    4343
     
    5656        }
    5757        while (fgets (line, 1024, f) != NULL) {
    58             nItems = fscanf (f, "%s %lf %lf", filename, &zero, &scale);
    59             fpa = ppFPA_Alloc ();
     58            nItems = sscanf (line, "%s %lf %lf", filename, &zero, &scale);
     59            ppFPA *fpa = ppFPA_Alloc ();
    6060            switch (nItems) {
    6161              case 0:
     
    6565                fpa->zero  = zero;
    6666                fpa->scale = scale;
    67                 // NOTE: continues to case 1 below
     67                fpa->filename = psStringCopy (filename);
     68                psArrayAdd (input, 100, fpa);
     69                break;
    6870              case 1:
    6971                fpa->filename = psStringCopy (filename);
     
    8587
    8688    // Open the input images, test that they are the same camera
    87     psLogMsg("phase2", PS_LOG_INFO, "Opening input images\n");
     89    psLogMsg("merge", PS_LOG_INFO, "Opening input images\n");
    8890    for (int i = 0; i < input->n; i++) {
    8991       
    9092        ppFPA *fpa = input->data[i];
     93
     94        psLogMsg("merge", PS_LOG_INFO, "Trying %s...\n", fpa->filename);
    9195
    9296        fpa->fits = psFitsOpen(fpa->filename, "r"); // File handle for FITS file
     
    130134
    131135    // data->process acts as a process mask for the full FPA
    132     data->process = pmFPAConstruct(config->camera);
     136    data->process = ppFPA_Alloc ();
     137    data->process->fpa = pmFPAConstruct(config->camera);
    133138
    134139    // see if we have selected a specific chip
     
    144149    // data->mask carries a pixel mask for pixels to be ignored
    145150    // the name and contents of the mask are determined in ppMergeOptions
    146     data->mask = pmFPAConstruct(config->camera);
     151    data->mask = ppFPA_Alloc ();
     152    data->mask->fpa = pmFPAConstruct(config->camera);
     153
     154    // data->output will store the output file
     155    // currently, we keep the complete output file and write it at the end
     156    data->output = ppFPA_Alloc ();
     157    data->output->fpa = pmFPAConstruct(config->camera);
     158    data->output->filename = psMetadataLookupPtr (NULL, config->arguments, "-output");
     159    if (! *data->output->filename) {
     160        psAbort ("merge", "output file not specified");
     161    }
    147162
    148163    return true;
Note: See TracChangeset for help on using the changeset viewer.