IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 6, 2008, 10:51:20 AM (18 years ago)
Author:
Paul Price
Message:

Adding support for multi-darks, instead of traditional darks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppImageDetrendReadout.c

    r16084 r16844  
    3232# endif
    3333
    34     // set up the readouts for dark and bias
    35     pmReadout *dark = NULL;
     34    // set up the dark and bias
     35    pmCell *dark = NULL;
    3636    pmReadout  *bias = NULL;
    3737    if (options->doBias) {
     
    3939    }
    4040    if (options->doDark) {
    41         dark = pmFPAfileThisReadout(config->files, detview, "PPIMAGE.DARK");
     41        dark = pmFPAfileThisCell(config->files, detview, "PPIMAGE.DARK");
    4242    }
    4343
    4444    // Bias, dark and overscan subtraction are all merged.
    45     if (options->doBias || options->doDark || options->doOverscan) {
    46         if (!pmBiasSubtract(input, options->overscan, bias, dark, view)) {
    47             psError(PS_ERR_UNKNOWN, false, "Unable to subtract bias.\n");
     45    if (options->doBias || options->doOverscan) {
     46        if (!pmBiasSubtract(input, options->overscan, bias, NULL, view)) {
     47            psError(PS_ERR_UNKNOWN, false, "Unable to subtract bias.");
    4848            return false;
    4949        }
     
    5454        // create the target mask and weight images
    5555        pmReadoutGenerateWeight(input, true);
     56    }
     57
     58    if (options->doDark) {
     59        if (!pmDarkApply(input, dark, options->maskValue)) {
     60            psError(PS_ERR_UNKNOWN, false, "Unable to subtract dark.");
     61            return false;
     62        }
    5663    }
    5764
Note: See TracChangeset for help on using the changeset viewer.