IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32149


Ignore:
Timestamp:
Aug 21, 2011, 10:17:44 AM (15 years ago)
Author:
eugene
Message:

modifiy pmPSF_AxesToModel to take model type

Location:
branches/eam_branches/ipp-20110710
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110710/psModules/src/camera/pmReadoutFake.c

    r29004 r32149  
    5151
    5252    psF32 *params = model->params->data.F32; // Model parameters
    53     psEllipseAxes axes = pmPSF_ModelToAxes(params, MAX_AXIS_RATIO); // Ellipse axes
     53    psEllipseAxes axes = pmPSF_ModelToAxes(params, MAX_AXIS_RATIO, model->type); // Ellipse axes
    5454    // Curiously, the minor axis can be larger than the major axis, so need to check.
    5555    if (axes.major >= axes.minor) {
     
    5858        axes.major = axes.minor;
    5959    }
    60     return pmPSF_AxesToModel(params, axes);
     60    return pmPSF_AxesToModel(params, axes, model->type);
    6161}
    6262
  • branches/eam_branches/ipp-20110710/psModules/src/objects/pmSourceIO_CMF.c.in

    r31992 r32149  
    292292        @ALL@     dPAR[PM_PAR_I0]   = (isfinite(source->psfMag)) ? PAR[PM_PAR_I0] * source->psfMagErr : NAN;
    293293
    294         pmPSF_AxesToModel (PAR, axes);
     294        pmPSF_AxesToModel (PAR, axes, modelType);
    295295
    296296        @ALL@     float peakMag     = psMetadataLookupF32 (&status, row, "PEAK_FLUX_AS_MAG");
     
    607607            yErr = dPAR[PM_PAR_YPOS];
    608608
    609             axes = pmPSF_ModelToAxes (PAR, 20.0);
     609            axes = pmPSF_ModelToAxes (PAR, 20.0, model->type);
    610610
    611611            row = psMetadataAlloc ();
  • branches/eam_branches/ipp-20110710/psModules/src/objects/pmSourceIO_CMF_PS1_SV1.c

    r31451 r32149  
    280280        dPAR[PM_PAR_I0]   = (isfinite(source->psfMag)) ? PAR[PM_PAR_I0] * source->psfMagErr : NAN;
    281281
    282         pmPSF_AxesToModel (PAR, axes);
     282        pmPSF_AxesToModel (PAR, axes, modelType);
    283283
    284284        float peakMag     = psMetadataLookupF32 (&status, row, "PEAK_FLUX_AS_MAG");
     
    607607            yErr = dPAR[PM_PAR_YPOS];
    608608
    609             axes = pmPSF_ModelToAxes (PAR, 20.0);
     609            axes = pmPSF_ModelToAxes (PAR, 20.0, model->type);
    610610
    611611            row = psMetadataAlloc ();
  • branches/eam_branches/ipp-20110710/psModules/src/objects/pmSourceIO_CMP.c

    r31451 r32149  
    135135        lsky = (source->sky < 1.0) ? 0.0 : log10(source->sky);
    136136
    137         axes = pmPSF_ModelToAxes (PAR, 20.0);
     137        axes = pmPSF_ModelToAxes (PAR, 20.0, model->type);
    138138
    139139        float psfMagErr = isfinite(source->psfMagErr) ? source->psfMagErr : 999;
     
    293293                goto skip_source;
    294294
    295             pmPSF_AxesToModel (PAR, axes);
     295            pmPSF_AxesToModel (PAR, axes, modelType);
    296296
    297297            psArrayAdd (sources, 100, source);
  • branches/eam_branches/ipp-20110710/psModules/src/objects/pmSourceIO_OBJ.c

    r29004 r32149  
    9191        }
    9292
    93         axes = pmPSF_ModelToAxes (PAR, 20.0);
     93        axes = pmPSF_ModelToAxes (PAR, 20.0, model->type);
    9494
    9595        psLineInit (line);
  • branches/eam_branches/ipp-20110710/psModules/src/objects/pmSourceIO_PS1_CAL_0.c

    r31451 r32149  
    113113            yErr = dPAR[PM_PAR_YPOS];
    114114            if (isfinite(PAR[PM_PAR_SXX]) && isfinite(PAR[PM_PAR_SXX]) && isfinite(PAR[PM_PAR_SXX])) {
    115                 axes = pmPSF_ModelToAxes (PAR, 20.0);
     115                axes = pmPSF_ModelToAxes (PAR, 20.0, model->type);
    116116            } else {
    117117                axes.major = NAN;
     
    288288        dPAR[PM_PAR_I0]   = (isfinite(source->psfMag)) ? PAR[PM_PAR_I0] * source->psfMagErr : NAN;
    289289
    290         pmPSF_AxesToModel (PAR, axes);
     290        pmPSF_AxesToModel (PAR, axes, modelType);
    291291
    292292        float peakMag     = psMetadataLookupF32 (&status, row, "PEAK_FLUX_AS_MAG");
     
    618618            yErr = dPAR[PM_PAR_YPOS];
    619619
    620             axes = pmPSF_ModelToAxes (PAR, 20.0);
     620            axes = pmPSF_ModelToAxes (PAR, 20.0, model->type);
    621621
    622622            // generate RA,DEC
  • branches/eam_branches/ipp-20110710/psModules/src/objects/pmSourceIO_PS1_DEV_0.c

    r31451 r32149  
    8989            yErr = dPAR[PM_PAR_YPOS];
    9090
    91             axes = pmPSF_ModelToAxes (PAR, 20.0);
     91            axes = pmPSF_ModelToAxes (PAR, 20.0, model->type);
    9292        } else {
    9393            // XXX: This code seg faults if source->peak is NULL.
     
    214214        source->psfMagErr    = psMetadataLookupF32 (&status, row, "PSF_INST_MAG_SIG");
    215215
    216         pmPSF_AxesToModel (PAR, axes);
     216        pmPSF_AxesToModel (PAR, axes, modelType);
    217217
    218218        float peakMag = psMetadataLookupF32 (&status, row, "PEAK_FLUX_AS_MAG");
  • branches/eam_branches/ipp-20110710/psModules/src/objects/pmSourceIO_SMPDATA.c

    r31451 r32149  
    9292            lsky = (source->sky < 1.0) ? 0.0 : log10(source->sky);
    9393
    94             axes = pmPSF_ModelToAxes (PAR, 20.0);
     94            axes = pmPSF_ModelToAxes (PAR, 20.0, model->type);
    9595
    9696        } else {
     
    190190        axes.theta       = psMetadataLookupF32 (&status, row, "THETA");
    191191
    192         pmPSF_AxesToModel (PAR, axes);
     192        pmPSF_AxesToModel (PAR, axes, modelType);
    193193
    194194        source->psfMag = psMetadataLookupF32 (&status, row, "MAG_RAW") - ZERO_POINT;
  • branches/eam_branches/ipp-20110710/psModules/src/objects/pmSourceIO_SX.c

    r31451 r32149  
    8181        // pmSourceSextractType (source, &type, &flags);
    8282
    83         axes = pmPSF_ModelToAxes (PAR, 20.0);
     83        axes = pmPSF_ModelToAxes (PAR, 20.0, model->type);
    8484
    8585        psLineInit (line);
  • branches/eam_branches/ipp-20110710/pswarp/src/pswarpTransformSources.c

    r31447 r32149  
    120120#if 0
    121121        // XXX Note that this will not set the correct axes
    122         pmPSF_AxesToModel(new->modelPSF->params->data.F32,
    123                           pmPSF_ModelToAxes(source->modelPSF->params->data.F32, 20.0));
     122        psEllipseAxes axes = pmPSF_ModelToAxes(source->modelPSF->params->data.F32, 20.0, source->modelPSF->type);
     123        pmPSF_AxesToModel(new->modelPSF->params->data.F32, axes, new->modelPSF->type);
    124124#endif
    125125
Note: See TracChangeset for help on using the changeset viewer.