IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 2, 2009, 2:37:06 PM (17 years ago)
Author:
Paul Price
Message:

Reverting to writing covariance matrices per chip/cell. This allows simple visualisation of the covariance matrix, and a simpler system for reading and writing them.

File:
1 edited

Legend:

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

    r21264 r21269  
    1212#include "pmHDU.h"
    1313#include "pmFPA.h"
    14 
    15 #define COVARIANCE_INDICATOR "PS_COVAR" // FITS keyword to indicate if covariance matrices are present
    1614
    1715//////////////////////////////////////////////////////////////////////////////////////////////////////////////
     
    162160    PS_ASSERT_PTR_NON_NULL(fits, false);
    163161
    164     if (!hduRead(hdu, &hdu->variances, fits)) {
    165         return false;
    166     }
    167 
    168     return true;
     162    return hduRead(hdu, &hdu->variances, fits);
    169163}
    170164
     
    246240    PS_ASSERT_PTR_NON_NULL(fits, false);
    247241
    248     pmHDUCovariancesWriteHeader(hdu);
    249 
    250242    psImageMaskType maskVal = pmConfigMaskGet("MASK.VALUE", config); // Value to mask
    251     if (!hduWrite(hdu, hdu->variances, hdu->masks, maskVal, fits)) {
    252         return false;
    253     }
    254     pmHDUCovarianceClearHeader(hdu);
    255 
    256     if (!pmHDUCovarianceWrite(hdu, fits)) {
    257         psError(PS_ERR_UNKNOWN, false, "Unable to write covariance");
    258         return false;
    259     }
    260 
    261     return true;
    262 }
     243    return hduWrite(hdu, hdu->variances, hdu->masks, maskVal, fits);
     244}
Note: See TracChangeset for help on using the changeset viewer.