IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 4, 2022, 4:42:29 PM (4 years ago)
Author:
eugene
Message:

add max valid overscan value

Location:
branches/eam_branches/ipp-20220316/psModules/src/detrend
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20220316/psModules/src/detrend/pmOverscan.c

    r42147 r42160  
    4040
    4141    opts->minValid = 0.0; // default value if not defined
     42    opts->maxValid = (float) 0x10000; // default value if not defined
    4243    opts->maskVal = 0x0001; // default value if not defined
    4344
     
    314315        // declare the readout dead and mask
    315316
    316         if (reduced < overscanOpts->minValid) {
     317        if ((reduced < overscanOpts->minValid) || (reduced > overscanOpts->maxValid)) {
    317318            fprintf (stderr, "bad overscan (1) %f, masking readout\n", reduced);
    318319            psImage *mask = input->mask;
     
    398399            // declare the readout dead and mask
    399400         
    400             if (vectorStats->sampleMean < overscanOpts->minValid) {
     401            if ((vectorStats->sampleMean < overscanOpts->minValid) || (vectorStats->sampleMean > overscanOpts->maxValid)) {
    401402                fprintf (stderr, "bad overscan (2) %f, masking readout\n", vectorStats->sampleMean);
    402403                psImage *mask = input->mask;
     
    497498          // declare the readout dead and mask
    498499         
    499           if (vectorStats->sampleMean < overscanOpts->minValid) {
     500          if ((vectorStats->sampleMean < overscanOpts->minValid) || (vectorStats->sampleMean > overscanOpts->maxValid)) {
    500501              fprintf (stderr, "bad overscan (3) %f, masking readout\n", vectorStats->sampleMean);
    501502              psImage *mask = input->mask;
  • branches/eam_branches/ipp-20220316/psModules/src/detrend/pmOverscan.h

    r42147 r42160  
    4444    float gauss;                        ///< Gaussian smoothing sigma
    4545    float minValid;                     ///< if overscan is too low, readout is dead : mask
     46    float maxValid;                     ///< if overscan is too high, readout is dead : mask
    4647    psImageMaskType maskVal;            ///< Mask value to give dead readouts
    4748
Note: See TracChangeset for help on using the changeset viewer.