IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30384


Ignore:
Timestamp:
Jan 26, 2011, 5:22:00 PM (15 years ago)
Author:
eugene
Message:

modify the scaling process

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/ppSub/src/ppSubMatchPSFs.c

    r30302 r30384  
    164164
    165165    // is auto-scaling needed?
    166     if (!psMetadataLookupBool(NULL, recipe, "SCALE")) {
    167         // No scaling requested
    168         return true;
    169     }
    170 
     166    bool scale = psMetadataLookupBool(NULL, recipe, "SCALE");
    171167    float scaleRef = psMetadataLookupF32(NULL, recipe, "SCALE.REF"); // Reference for scaling
    172168    float scaleMin = psMetadataLookupF32(NULL, recipe, "SCALE.MIN"); // Minimum for scaling
    173169    float scaleMax = psMetadataLookupF32(NULL, recipe, "SCALE.MAX"); // Maximum for scaling
    174     if (!isfinite(scaleRef) || !isfinite(scaleMin) || !isfinite(scaleMax)) {
     170
     171    if (scale && (!isfinite(scaleRef) || !isfinite(scaleMin) || !isfinite(scaleMax))) {
    175172        psError(PPSUB_ERR_ARGUMENTS, false,
    176                 "Scale parameters (SCALE.REF=%f, SCALE.MIN=%f, SCALE.MAX=%f) not set in recipe.",
     173                "auto-scale selected but scale parameters (SCALE.REF=%f, SCALE.MIN=%f, SCALE.MAX=%f) not set in recipe.",
    177174                scaleRef, scaleMin, scaleMax);
    178175        return false;
    179176    }
    180177
    181     if (!pmSubtractionParamsScale(kernelSize, stampSize, kernelWidths, scaleRef, scaleMin, scaleMax)) {
    182         psError(PPSUB_ERR_DATA, false, "Unable to scale parameters.");
    183         return false;
    184     }
     178    pmSubtractionParamScaleOptions(scale, scaleRef, scaleMin, scaleMax);
     179
     180    // if (!pmSubtractionParamsScale(kernelSize, stampSize, kernelWidths)) {
     181    //     psError(PPSUB_ERR_DATA, false, "Unable to scale parameters.");
     182    //     return false;
     183    // }
    185184
    186185    return true;
Note: See TracChangeset for help on using the changeset viewer.