IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 9, 2009, 12:21:52 PM (17 years ago)
Author:
Paul Price
Message:

Circularise the model before measuring the flux. Not sure it makes a difference in practise, or even in theory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmReadoutFake.c

    r20999 r21103  
    8181    int numSources = sources->n;          // Number of stars
    8282
    83     pmModel *fakeModel = pmModelFromPSFforXY(psf, (float)numCols / 2.0, (float)numRows / 2.0,
    84                                              1.0); // Fake model, with central intensity of 1.0
    85     psAssert(fakeModel, "failed to generate model: should this be an error or not?");
    86 
    8783    float flux0 = NAN;                  // Flux for central intensity of 1.0
    8884    if (normalisePeak) {
     85        pmModel *fakeModel = pmModelFromPSFforXY(psf, (float)numCols / 2.0, (float)numRows / 2.0,
     86                                                 1.0); // Fake model, with central intensity of 1.0
     87        psAssert(fakeModel, "failed to generate model: should this be an error or not?");
     88
     89        if (circularise && !circulariseModel(fakeModel)) {
     90            psError(PS_ERR_UNKNOWN, false, "Unable to circularise PSF model.");
     91            psFree(fakeModel);
     92            return false;
     93        }
     94
    8995        flux0 = fakeModel->modelFlux(fakeModel->params); // Flux for central intensity of 1.0
     96        psFree(fakeModel);
    9097    }
    91 
    92     if (circularise && !circulariseModel(fakeModel)) {
    93         psError(PS_ERR_UNKNOWN, false, "Unable to circularise PSF model.");
    94         psFree(fakeModel);
    95         return false;
    96     }
    97     psFree(fakeModel);
    9898
    9999    for (int i = 0; i < numSources; i++) {
Note: See TracChangeset for help on using the changeset viewer.