IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 28, 2009, 2:33:51 PM (17 years ago)
Author:
Paul Price
Message:

Changing pmReadout.weight to variance. Adding pmReadout.covariance which will carry around a covariance pseudo-matrix, allowing us to calculate the pixel-to-pixel variance. pmReadout.covariance now exists and is set, but no mechanism yet to read/write, or use it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/pap_branch_20090128/psModules/src/camera/pmFPAWrite.c

    r19385 r21211  
    2929    FPA_WRITE_TYPE_IMAGE,               // Write image
    3030    FPA_WRITE_TYPE_MASK,                // Write mask
    31     FPA_WRITE_TYPE_WEIGHT               // Write weight map
     31    FPA_WRITE_TYPE_VARIANCE               // Write variance map
    3232} fpaWriteType;
    3333
     
    4646    case FPA_WRITE_TYPE_MASK:
    4747        return &hdu->masks;
    48     case FPA_WRITE_TYPE_WEIGHT:
    49         return &hdu->weights;
     48    case FPA_WRITE_TYPE_VARIANCE:
     49        return &hdu->variances;
    5050    default:
    5151        psAbort("Unknown write type: %x\n", type);
     
    6666    case FPA_WRITE_TYPE_MASK:
    6767        return pmHDUWriteMask(hdu, fits, config);
    68     case FPA_WRITE_TYPE_WEIGHT:
    69         return pmHDUWriteWeight(hdu, fits, config);
     68    case FPA_WRITE_TYPE_VARIANCE:
     69        return pmHDUWriteVariance(hdu, fits, config);
    7070    default:
    7171        psAbort("Unknown write type: %x\n", type);
     
    7474}
    7575
    76 // Write a cell image/mask/weight
     76// Write a cell image/mask/variance
    7777static bool cellWrite(pmCell *cell,     // Cell to write
    7878                      psFits *fits,     // FITS file to which to write
     
    124124}
    125125
    126 // Write a chip image/mask/weight
     126// Write a chip image/mask/variance
    127127static bool chipWrite(pmChip *chip,     // Chip to write
    128128                      psFits *fits,     // FITS file to which to write
     
    188188
    189189
    190 // Write an FPA image/mask/weight
     190// Write an FPA image/mask/variance
    191191static bool fpaWrite(pmFPA *fpa,        // FPA to write
    192192                     psFits *fits,      // FITS file to which to write
     
    417417
    418418
    419 bool pmCellWriteWeight(pmCell *cell, psFits *fits, pmConfig *config, bool blank)
     419bool pmCellWriteVariance(pmCell *cell, psFits *fits, pmConfig *config, bool blank)
    420420{
    421421    PS_ASSERT_PTR_NON_NULL(cell, false);
    422422    PS_ASSERT_PTR_NON_NULL(fits, false);
    423     return cellWrite(cell, fits, config, blank, FPA_WRITE_TYPE_WEIGHT);
    424 }
    425 
    426 bool pmChipWriteWeight(pmChip *chip, psFits *fits, pmConfig *config, bool blank, bool recurse)
     423    return cellWrite(cell, fits, config, blank, FPA_WRITE_TYPE_VARIANCE);
     424}
     425
     426bool pmChipWriteVariance(pmChip *chip, psFits *fits, pmConfig *config, bool blank, bool recurse)
    427427{
    428428    PS_ASSERT_PTR_NON_NULL(chip, false);
    429429    PS_ASSERT_PTR_NON_NULL(fits, false);
    430     return chipWrite(chip, fits, config, blank, recurse, FPA_WRITE_TYPE_WEIGHT);
    431 }
    432 
    433 bool pmFPAWriteWeight(pmFPA *fpa, psFits *fits, pmConfig *config, bool blank, bool recurse)
     430    return chipWrite(chip, fits, config, blank, recurse, FPA_WRITE_TYPE_VARIANCE);
     431}
     432
     433bool pmFPAWriteVariance(pmFPA *fpa, psFits *fits, pmConfig *config, bool blank, bool recurse)
    434434{
    435435    PS_ASSERT_PTR_NON_NULL(fpa, false);
    436436    PS_ASSERT_PTR_NON_NULL(fits, false);
    437     return fpaWrite(fpa, fits, config, blank, recurse, FPA_WRITE_TYPE_WEIGHT);
     437    return fpaWrite(fpa, fits, config, blank, recurse, FPA_WRITE_TYPE_VARIANCE);
    438438}
    439439
Note: See TracChangeset for help on using the changeset viewer.