IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 21, 2006, 11:28:31 AM (20 years ago)
Author:
magnier
Message:

vector length initialization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmPSFtry.c

    r6910 r6943  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2006-04-19 20:37:35 $
     7 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2006-04-21 21:26:22 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    6767    test->fitMag   = psVectorAlloc (sources->n, PS_TYPE_F64);
    6868    test->mask     = psVectorAlloc (sources->n, PS_TYPE_U8);
     69    test->metric->n = test->fitMag->n = test->mask->n = sources->n;
     70    test->modelEXT->n = test->modelPSF->n = sources->n;
    6971
    7072    for (int i = 0; i < test->modelEXT->n; i++) {
     
    190192    psVector *chisq = psVectorAlloc (psfTry->sources->n, PS_TYPE_F64);
    191193    psVector *mask  = psVectorAlloc (psfTry->sources->n, PS_TYPE_MASK);
     194    flux->n = mask->n = chisq->n = psfTry->sources->n;
    192195
    193196    // write sources with models first
     
    211214    psVectorClipFitPolynomial1D (psfTry->psf->ChiTrend, stats, mask, 1, chisq, NULL, flux);
    212215    for (int i = 0; i < psfTry->psf->ChiTrend->nX + 1; i++) {
    213         psLogMsg ("pmPSFtry", 4, "chisq vs flux fit term %d: %f +/- %f\n", i, psfTry->psf->ChiTrend->coeff[i]*pow(10000, i), psfTry->psf->ChiTrend->coeffErr[i]);
     216        psLogMsg ("pmPSFtry", 4, "chisq vs flux fit term %d: %f +/- %f\n", i, psfTry->psf->ChiTrend->coeff[i]*pow(10000, i), psfTry->psf->ChiTrend->coeffErr[i]*pow(10000,i));
    214217    }
    215218    psLogMsg ("pmPSFtry", 4, "chisq vs flux fit: %f +/- %f\n", stats->sampleMedian, stats->sampleStdev);
     
    239242    // r2rflux = radius^2 * ten(0.4*fitMag);
    240243    psVector *r2rflux = psVectorAlloc (psfTry->sources->n, PS_TYPE_F64);
     244    r2rflux->n = psfTry->sources->n;
     245
    241246    for (int i = 0; i < psfTry->sources->n; i++) {
    242247        if (psfTry->mask->data.U8[i] & PSFTRY_MASK_ALL)
Note: See TracChangeset for help on using the changeset viewer.