IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 5, 2009, 4:31:25 PM (17 years ago)
Author:
Paul Price
Message:

Merging pap_branch_20090128. Resolved a small number of conflicts. Compiles, but not tested in detail.

File:
1 edited

Legend:

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

    r21352 r21363  
    66 *  @author EAM, IfA: significant modifications.
    77 *
    8  *  @version $Revision: 1.68 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2009-02-06 01:09:50 $
     8 *  @version $Revision: 1.69 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2009-02-06 02:31:25 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4444    psFree(tmp->peak);
    4545    psFree(tmp->pixels);
    46     psFree(tmp->weight);
     46    psFree(tmp->variance);
    4747    psFree(tmp->maskObj);
    4848    psFree(tmp->maskView);
     
    6666
    6767    psFree (source->pixels);
    68     psFree (source->weight);
     68    psFree (source->variance);
    6969    psFree (source->maskObj);
    7070    psFree (source->maskView);
     
    7373
    7474    source->pixels = NULL;
    75     source->weight = NULL;
     75    source->variance = NULL;
    7676    source->maskObj = NULL;
    7777    source->maskView = NULL;
     
    101101    source->peak = NULL;
    102102    source->pixels = NULL;
    103     source->weight = NULL;
     103    source->variance = NULL;
    104104    source->maskObj = NULL;
    105105    source->maskView = NULL;
     
    144144    }
    145145    // this copy is used to allow multiple fit attempts on the
    146     // same object.  the pixels, weight, and mask arrays all point to
     146    // same object.  the pixels, variance, and mask arrays all point to
    147147    // the same original subarrays.  the peak and moments point at
    148148    // the original values.
     
    167167    // We want a new view, but pointing at the same pixels.
    168168    source->pixels   = psImageCopyView(NULL, in->pixels);
    169     source->weight   = psImageCopyView(NULL, in->weight);
     169    source->variance   = psImageCopyView(NULL, in->variance);
    170170    source->maskView = in->maskView ? psImageCopyView(NULL, in->maskView) : NULL;
    171171
     
    199199    // these images are subset images of the equivalent parents
    200200    mySource->pixels = psImageSubset(readout->image, srcRegion);
    201     if (readout->weight) {
    202         mySource->weight = psImageSubset(readout->weight, srcRegion);
     201    if (readout->variance) {
     202        mySource->variance = psImageSubset(readout->variance, srcRegion);
    203203    }
    204204    if (readout->mask) {
     
    237237
    238238    extend |= (mySource->pixels == NULL);
    239     extend |= (mySource->weight == NULL);
     239    extend |= (mySource->variance == NULL);
    240240    extend |= (mySource->maskObj == NULL);
    241241    extend |= (mySource->maskView == NULL);
     
    245245        // re-create the subimage
    246246        psFree (mySource->pixels);
    247         psFree (mySource->weight);
     247        psFree (mySource->variance);
    248248        psFree (mySource->maskView);
    249249
    250250        mySource->pixels   = psImageSubset(readout->image,  newRegion);
    251         mySource->weight   = psImageSubset(readout->weight, newRegion);
     251        mySource->variance   = psImageSubset(readout->variance, newRegion);
    252252        mySource->maskView = psImageSubset(readout->mask,   newRegion);
    253253        mySource->region   = newRegion;
     
    670670    pmSource->peak
    671671    pmSource->pixels
    672     pmSource->weight
     672    pmSource->variance
    673673    pmSource->mask
    674674
     
    737737
    738738        psF32 *vPix = source->pixels->data.F32[row];
    739         psF32 *vWgt = source->weight->data.F32[row];
     739        psF32 *vWgt = source->variance->data.F32[row];
    740740        psImageMaskType *vMsk = (source->maskObj == NULL) ? NULL : source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA[row];
    741741
     
    924924        if (mode & PM_MODEL_OP_NOISE) {
    925925            // XXX need to scale by the gain...
    926             target = source->weight->data.F32;
     926            target = source->variance->data.F32;
    927927        }
    928928
     
    946946    psImage *target = source->pixels;
    947947    if (mode & PM_MODEL_OP_NOISE) {
    948         target = source->weight;
     948        target = source->variance;
    949949    }
    950950
Note: See TracChangeset for help on using the changeset viewer.