IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 7, 2005, 6:32:40 PM (21 years ago)
Author:
eugene
Message:

cleanup, organization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/pmObjects_EAM.c

    r4954 r4977  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2005-09-07 03:33:01 $
     8 *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2005-09-08 04:32:40 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1919#include "psConstants.h"
    2020#include "pmObjects_EAM.h"
     21#include "pmModelGroup.h"
     22
    2123
    2224/******************************************************************************
     
    653655
    654656    //
    655     // Loop through the subimage mask, initialize mask to 0x01 (invalid pixel)
    656     // XXX EAM : use PSPHOT_MASK_INVALID?
     657    // Loop through the subimage mask & initialize PSPHOT_MASK_INVALID
    657658    //
    658659    for (psS32 row = 0 ; row < subImageMask->numRows; row++) {
    659660        for (psS32 col = 0 ; col < subImageMask->numCols; col++) {
    660             subImageMask->data.U8[row][col] = 0x01;
     661            subImageMask->data.U8[row][col] = PSPHOT_MASK_INVALID;
    661662        }
    662663    }
     
    674675    for (psS32 row = StartRow; row < EndRow; row++) {
    675676        for (psS32 col = StartCol; col < EndCol; col++) {
    676             subImageMask->data.U8[row][col] = 0;
     677            subImageMask->data.U8[row][col] = PSPHOT_MASK_CLEAR;
    677678        }
    678679    }
     
    11161117
    11171118        // XXX EAM : can we use the value of SATURATE if mask is NULL?
    1118 # define MASK_SATURATED 0x02
    1119         int Nsatpix = psImageCountPixelMask (tmpSrc->mask, MASK_SATURATED);
     1119        int Nsatpix = psImageCountPixelMask (tmpSrc->mask, PSPHOT_MASK_SATURATED);
    11201120
    11211121        // saturated star (size consistent with PSF or larger)
     
    16151615    }       
    16161616
    1617     psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F64);
     1617    psImage *covar = psImageAlloc (params->n, params->n, PS_TYPE_F32);
    16181618
    16191619    psTrace (".pmObjects.pmSourceFitModel", 5, "fitting function\n");
     
    16211621    for (int i = 0; i < dparams->n; i++) {
    16221622        if ((paramMask != NULL) && paramMask->data.U8[i]) continue;
    1623         dparams->data.F32[i] = sqrt(covar->data.F64[i][i]);
     1623        dparams->data.F32[i] = sqrt(covar->data.F32[i][i]);
    16241624    }
    16251625 
     
    16401640    // XXX EAM get the Gauss-Newton distance for fixed model parameters
    16411641    if (paramMask != NULL) {
    1642         psVector *delta = psVectorAlloc (params->n, PS_TYPE_F64);
     1642        psVector *delta = psVectorAlloc (params->n, PS_TYPE_F32);
    16431643        psMinimizeGaussNewtonDelta (delta, params, NULL, x, y, yErr, modelFunc);
    16441644        for (int i = 0; i < dparams->n; i++) {
    16451645            if (!paramMask->data.U8[i]) continue;
    1646             dparams->data.F32[i] = delta->data.F64[i];
     1646            dparams->data.F32[i] = delta->data.F32[i];
    16471647        }
    16481648        psFree (delta);
Note: See TracChangeset for help on using the changeset viewer.