IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2006, 10:16:15 AM (20 years ago)
Author:
Paul Price
Message:

Working version for flat-fielding. Need to add extenal scale/zero input, mask saturated pixels, test on dark, bias, fringe.

File:
1 edited

Legend:

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

    r7073 r7260  
    2727    psArray *filenames = psMetadataLookupPtr(NULL, config->arguments, "INPUT"); // The input file names
    2828    assert(filenames);
     29    if (!data->in) {
     30        data->in = psArrayAlloc(filenames->n);
     31        data->in->n = filenames->n;
     32    }
    2933    int numGood = 0;                    // Number of good files
    3034    for (int i = 0; i < filenames->n; i++) {
     
    3337            continue;
    3438        }
     39        psTrace(__func__, 1, "Checking input file %s....\n", name);
    3540        psFits *inFile = psFitsOpen(filenames->data[i], "r"); // The FITS file to read
    3641        if (!inFile) {
     
    4247        }
    4348        psMetadata *header = psFitsReadHeader(NULL, inFile); // The FITS (primary) header
     49        if (psTraceGetLevel(__func__) > 9) {
     50            psTrace(__func__, 9, "Primary header:\n");
     51            psMetadataPrint(header, 9);
     52        }
    4453        psFitsClose(inFile);
    4554
     
    7483        // Use the first valid input as the basis for the output --- including the header
    7584        if (!data->out) {
     85            psTrace(__func__, 5, "Constructing output using %s as a template.\n", name);
    7686            data->out = pmFPAConstruct(config->camera);
    7787            pmFPAview *view = pmFPAAddSourceFromHeader(data->out, header, options->format);
    7888            psFree(view);
     89#if 0
     90            pmFPACopyStructure(data->out, data->in->data[i], 1, 1);
     91#endif
    7992        }
    8093
     94        psTrace(__func__, 3, "%s checks out.\n", name);
    8195        numGood++;
    8296    }
     
    99113    }
    100114    data->numCells = numCells;
     115    psTrace(__func__, 3, "Output has %d cells.\n", numCells);
    101116
     117    psTrace(__func__, 3, "We have %d good inputs.\n", numGood);
    102118    if (numGood > 1) {
    103119        return data;
Note: See TracChangeset for help on using the changeset viewer.