IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 9, 2009, 3:52:54 PM (17 years ago)
Author:
Paul Price
Message:

Take radius of source to be the maximum of the provided radius and radius derived from the provided minimum flux.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap/psModules/src/camera/pmReadoutFake.c

    r25243 r25310  
    8383    }
    8484    PS_ASSERT_PTR_NON_NULL(psf, false);
    85     if (radius > 0 && isfinite(minFlux) && minFlux > 0.0) {
    86         psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Cannot define both minimum flux and fixed radius.");
    87         return false;
    88     }
    8985
    9086    readout->image = psImageRecycle(readout->image, numCols, numRows, PS_TYPE_F32);
     
    129125        pmSource *fakeSource = pmSourceAlloc(); // Fake source to generate
    130126        fakeSource->peak = pmPeakAlloc(xSrc, ySrc, fakeModel->params->data.F32[PM_PAR_I0], PM_PEAK_LONE);
    131         float fakeRadius = radius > 0 ? radius :
    132             PS_MAX(1.0, fakeModel->modelRadius(fakeModel->params, minFlux)); // Radius of fake source
     127        float fakeRadius = 1.0;         // Radius of fake source
     128        if (isfinite(minFlux)) {
     129            fakeRadius = PS_MAX(fakeRadius, fakeModel->modelRadius(fakeModel->params, minFlux));
     130        }
     131        if (radius > 0) {
     132            fakeRadius = PS_MAX(fakeRadius, radius);
     133        }
    133134
    134135        if (xOffset) {
Note: See TracChangeset for help on using the changeset viewer.