IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 4, 2023, 12:15:28 PM (3 years ago)
Author:
eugene
Message:

merge changes from trunk: new nonlinearity, allow detections under CTE masks

Location:
branches/eam_branches/ipp-20220316/ppImage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20220316/ppImage

  • branches/eam_branches/ipp-20220316/ppImage/src/ppImageDetrendReadout.c

    r42167 r42372  
    149149      // psLogMsg ("ppImage", 6, "nonlinear correction: %f sec\n", psTimerMark ("detrend.readout"));
    150150    }
     151    // New Non-linearity correction (exclusive of the above)
     152    if (options->doNewNonLin) {
     153      if (!ppImageDetrendNewNonLinear(input, detview, config)) {
     154        psError(PS_ERR_UNKNOWN, false, "Unable to correct Non-Linearity with new version (2023)");
     155        psFree(detview);
     156        return(false);
     157      }
     158      // psLogMsg ("ppImage", 6, "nonlinear correction: %f sec\n", psTimerMark ("detrend.readout"));
     159    }
    151160
    152161    // set up the dark and bias
     
    213222            psImageUnbin (noiseImage, noiseMap->image, binning);
    214223            psFree (binning);
    215             // Stolen from pmSkySubtract.c
    216             // CZW: Unneeded, as psImageUnbin does the bilinear interpolation?  It still looks blocky.
    217 /*          psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, RECIPE_NAME); // Recipe */
    218 /*          psAssert(recipe, "Should be there!"); */
    219 
    220 /*          psS32 xBinFactor = psMetadataLookupS32(NULL,recipe,"NOISE.XBIN"); */
    221 /*          psS32 yBinFactor = psMetadataLookupS32(NULL,recipe,"NOISE.YBIN"); */
    222 /*          psImageInterpolateOptions *interp = psImageInterpolateOptionsAlloc(PS_INTERPOLATE_BILINEAR, */
    223 /*                                                                             noiseMap->image, */
    224 /*                                                                             NULL, NULL, */
    225 /*                                                                             0, 0.0, 0.0, 0, 0, 0.0); */
    226 /*          for (psS32 row = 0; row < input->image->numRows; row++) { */
    227 /*            for (psS32 col = 0; col < input->image->numCols; col++) { */
    228 /*              // We calculate the F32 value of the pixel coordinates in the */
    229 /*              // binned image and then use a pixel interpolation routine to */
    230 /*              // determine the value of the pixel at that location. */
    231 /*              psF32 binRowF64 = ((psF32) row) / ((psF32) yBinFactor); */
    232 /*              psF32 binColF64 = ((psF32) col) / ((psF32) xBinFactor); */
    233 /*              // We add 0.5 to the pixel locations since the pixel */
    234 /*              // interpolation routine defines the location of pixel */
    235 /*              // (i, j) as (i+0.5, j+0.5). */
    236 /*              binRowF64+= 0.5; */
    237 /*              binColF64+= 0.5; */
    238 
    239 /*              double binPixel; */
    240 /*              if (!psImagePixelInterpolate(&binPixel, NULL, NULL, binColF64, binRowF64, interp)) { */
    241 /*                psError(PS_ERR_UNKNOWN, false, "Unable to interpolate image."); */
    242 /*                psFree(interp); */
    243 /*                psFree(noiseImage); */
    244 /*                return NULL; */
    245 /*              } */
    246 /*              noiseImage->data.F32[row][col] = binPixel; */
    247 /*            } */
    248 /*          } */
    249 /*          psFree(interp); */
    250224        }
    251225
Note: See TracChangeset for help on using the changeset viewer.