IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36862


Ignore:
Timestamp:
Jun 13, 2014, 8:49:28 AM (12 years ago)
Author:
eugene
Message:

call model->class->function instead of model->function

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSim/src/ppSimInsertGalaxies.c

    r34261 r36862  
    154154
    155155        // XXX let the flux limit be a user-defined number of sky sigmas (not just 1.0)
    156         float radius = model->modelRadius (model->params, 0.1*roughNoise);
     156        float radius = model->class->modelRadius (model->params, 0.1*roughNoise);
    157157        radius = PS_MAX (radius, 1.0);
    158158
     
    163163        pmSource *source = pmSourceFromModel (model, readout, radius, PM_SOURCE_TYPE_EXTENDED);
    164164
    165         galaxy->flux = model->modelFlux (model->params);
     165        galaxy->flux = model->class->modelFlux (model->params);
    166166
    167167        // XXX set the mag & err values (should this be done in pmSourceFromModel?)
  • trunk/ppSim/src/ppSimInsertStars.c

    r36375 r36862  
    116116        // (inserting flux with a variable radius introduces a flux-dependent bias)
    117117        if (radius < 0) {
    118           radius = model->modelRadius (model->params, nSigmaLim * roughNoise);
     118          radius = model->class->modelRadius (model->params, nSigmaLim * roughNoise);
    119119          radius = PS_MAX (radius,  1.0);
    120120          radius = PS_MIN (radius, 50.0);
  • trunk/ppViz/src/ppVizPSF/ppVizPSFLoop.c

    r34800 r36862  
    117117
    118118                        pmModel *model = pmModelFromPSFforXY(psf, xSrc, ySrc, 1.0); // Model for normalisation
    119                         float fluxNorm = model->modelFlux(model->params);               // Flux for peak=1
     119                        float fluxNorm = model->class->modelFlux(model->params);               // Flux for peak=1
    120120                        float fluxPeak = powf(10.0, -0.4 * data->fakeMag) / fluxNorm; // Peak flux
    121121                        source->peak = pmPeakAlloc(xSrc, ySrc, fluxPeak, PM_PEAK_LONE);
     
    135135                    source->peak = pmPeakAlloc(xSrc, ySrc, 1.0, PM_PEAK_LONE);
    136136                    pmModel *model = pmModelFromPSFforXY(psf, xSrc, ySrc, 1.0); // Model for normalisation
    137                     float flux = model->modelFlux(model->params);               // Flux for peak=1
     137                    float flux = model->class->modelFlux(model->params);               // Flux for peak=1
    138138                    psFree(model);
    139139                    source->psfMag = -2.5 * log10(flux);
Note: See TracChangeset for help on using the changeset viewer.