IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 11, 2008, 5:57:34 PM (18 years ago)
Author:
Paul Price
Message:

Trying to get a better system for setting the weightings.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/imcombine/pmPSFEnvelope.c

    r16833 r18492  
    3434#define PEAK_FLUX 1.0e4                 // Peak flux for each source
    3535#define SKY_VALUE 0.0e0                 // Sky value for fake image
    36 #define WEIGHT_VAL 1.0                  // Weighting for image
     36#define WEIGHT_VAL 10.0                 // Weighting for image
     37#define WEIGHT_FACTOR 10.0              // Factor to multiply image by to get weighting
    3738#define PSF_STATS PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV // Statistics options for measuring PSF
    3839
     
    199200    psFree(envelope);
    200201
    201     // XXX This seems the best way to set the weight image so that pixels aren't rejected as "insignificant"
    202     readout->weight = (psImage*)psBinaryOp(NULL, readout->image, "*", readout->image);
     202    // XXX Setting the weight seems to be an art
     203    // Can't set it too high so that pixels are rejected as insignificant
     204    // Can't set it too low so that it's hard to get to the minimum
     205    // Have also tried:
     206    // *** readout->weight = (psImage*)psBinaryOp(NULL, readout->image, "*", readout->image);
     207    // *** readout->weight = (psImage*)psBinaryOp(NULL, readout->image, "*", psScalarAlloc(WEIGHT_FACTOR, PS_TYPE_F32));
     208    readout->weight = (psImage*)psBinaryOp(NULL, readout->image, "+", psScalarAlloc(PS_SQR(WEIGHT_VAL), PS_TYPE_F32));
    203209    readout->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK);
    204210    psImageInit(readout->mask, 0);
     
    258264    options->psfFieldYo = 0;
    259265
    260     pmSourceFitModelInit (15, 0.01, WEIGHT_VAL, options->poissonErrorsPhotLMM);
     266    pmSourceFitModelInit(50, 0.01, WEIGHT_VAL, false);
    261267
    262268    pmPSFtry *try = pmPSFtryModel(fakes, modelName, options, 0, 0xff);
Note: See TracChangeset for help on using the changeset viewer.