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/camera/pmFPAMaskWeight.h

    r21183 r21363  
    55 * @author Eugene Magnier, IfA
    66 *
    7  * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    8  * @date $Date: 2009-01-27 06:39:38 $
     7 * @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     8 * @date $Date: 2009-02-06 02:31:24 $
    99 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    1010 */
     
    4747
    4848
    49 /// Set a temporary readout weight map using CELL.GAIN and CELL.READNOISE
     49/// Set a temporary readout variance map using CELL.GAIN and CELL.READNOISE
    5050///
    51 /// Calculates weights (actually variances) for each pixel using photon statistics and the cell gain
    52 /// (CELL.GAIN) and read noise (CELL.READNOISE).  The weight map that is produced within the readout is
    53 /// temporary --- it is not added to the HDU.  This is intended for when the user is iterating using
    54 /// pmReadoutReadNext, in which case the HDU can't be generated.
    55 bool pmReadoutSetWeight(pmReadout *readout, ///< Readout for which to set weight
    56                         bool poisson    ///< Use poisson weights (in addition to read noise)?
    57                        );
     51/// Calculates variances for each pixel using photon statistics and the cell gain (CELL.GAIN) and read noise
     52/// (CELL.READNOISE).  The weight map that is produced within the readout is temporary --- it is not added to
     53/// the HDU.  This is intended for when the user is iterating using pmReadoutReadNext, in which case the HDU
     54/// can't be generated.
     55bool pmReadoutSetVariance(pmReadout *readout, ///< Readout for which to set variance
     56                          bool poisson    ///< Include poisson variance (in addition to read noise)?
     57    );
    5858
    5959/// Generate a readout mask (suitable for output) using CELL.SATURATION and CELL.BAD
     
    6666    );
    6767
    68 /// Generate a weight map (suitable for output) using CELL.GAIN and CELL.READNOISE
     68/// Generate a variance map (suitable for output) using CELL.GAIN and CELL.READNOISE
    6969///
    70 /// Calculates weights (actually variances) for each pixel using photon statistics and the cell gain
    71 /// (CELL.GAIN) and read noise (CELL.READNOISE).  The weight map that is produced within the readout is
    72 /// suitable for output (complete with HDU entry).  This is intended for most operations.
    73 bool pmReadoutGenerateWeight(pmReadout *readout, ///< Readout for which to generate weight
    74                              bool poisson    ///< Use poisson weights (in addition to read noise)?
    75                             );
     70/// Calculates variances for each pixel using photon statistics and the cell gain (CELL.GAIN) and read noise
     71/// (CELL.READNOISE).  The variance map that is produced within the readout is suitable for output (complete
     72/// with HDU entry).  This is intended for most operations.
     73bool pmReadoutGenerateVariance(pmReadout *readout, ///< Readout for which to generate variance
     74                               bool poisson    ///< Include poisson variance (in addition to read noise)?
     75    );
    7676
    77 /// Generate mask and weight map for a readout
     77/// Generate mask and variance map for a readout
    7878///
    79 /// Calls pmReadoutGenerateMask and pmReadoutGenerateWeight for the readout
    80 bool pmReadoutGenerateMaskWeight(pmReadout *readout, ///< Readout for which to generate mask and weights
    81                                  psImageMaskType sat, ///< Mask value to give saturated pixels
    82                                  psImageMaskType bad, ///< Mask value to give bad (low) pixels
    83                                  bool poisson ///< Use poisson weights (in addition to read noise)?
    84                                 );
     79/// Calls pmReadoutGenerateMask and pmReadoutGenerateVariance for the readout
     80bool pmReadoutGenerateMaskVariance(pmReadout *readout, ///< Readout for which to generate mask and variance
     81                                   psImageMaskType sat, ///< Mask value to give saturated pixels
     82                                   psImageMaskType bad, ///< Mask value to give bad (low) pixels
     83                                   bool poisson ///< Include poisson variance (in addition to read noise)?
     84    );
    8585
    86 /// Generate mask and weight maps for all readouts within a cell
     86/// Generate mask and variance maps for all readouts within a cell
    8787///
    88 /// Calls pmReadoutGenerateMaskWeight for each readout within the cell.
    89 bool pmCellGenerateMaskWeight(pmCell *cell, ///< Cell for which to generate mask and weights
    90                               psImageMaskType sat, ///< Mask value to give saturated pixels
    91                               psImageMaskType bad, ///< Mask value to give bad (low) pixels
    92                               bool poisson ///< Use poisson weights (in addition to read noise)?
    93                              );
     88/// Calls pmReadoutGenerateMaskVariance for each readout within the cell.
     89bool pmCellGenerateMaskVariance(pmCell *cell, ///< Cell for which to generate mask and variance
     90                                psImageMaskType sat, ///< Mask value to give saturated pixels
     91                                psImageMaskType bad, ///< Mask value to give bad (low) pixels
     92                                bool poisson ///< Include poisson variance (in addition to read noise)?
     93    );
    9494
    95 /// Renormalise the weight map to match the actual pixel variance
     95/// Renormalise the variance map to match the actual pixel variance
    9696///
    97 /// The weight (variance) map is adjusted so that the mean matches the actual pixel variance in the image
    98 bool pmReadoutWeightRenormPixels(
     97/// The variance map is adjusted so that the mean matches the actual pixel variance in the image
     98bool pmReadoutVarianceRenormPixels(
    9999    const pmReadout *readout,           ///< Readout to normalise
    100100    psImageMaskType maskVal,                 ///< Value to mask
     
    104104    );
    105105
    106 /// Renormalise the weight map to match the actual photometry variance
     106/// Renormalise the variance map to match the actual photometry variance
    107107///
    108 /// The weight (variance) map is adjusted so that the actual significance of fake sources matches the
     108/// The variance map is adjusted so that the actual significance of fake sources matches the
    109109/// guestimated significance
    110 bool pmReadoutWeightRenormPhot(
     110bool pmReadoutVarianceRenormPhot(
    111111    const pmReadout *readout,           ///< Readout to normalise
    112     psImageMaskType maskVal,                 ///< Value to mask
     112    psImageMaskType maskVal,            ///< Value to mask
    113113    int num,                            ///< Number of instances to measure over the image
    114114    float width,                        ///< Photometry width
     
    118118    );
    119119
    120 /// Renormalise the weight map to match the actual variance
     120/// Renormalise the variance map to match the actual variance
    121121///
    122122/// The variance in the image is measured in patches, and the variance map is adjusted so that the mean for
    123123/// that patch corresponds.
    124 bool pmReadoutWeightRenorm(const pmReadout *readout, // Readout to normalise
    125                            psImageMaskType maskVal, // Value to mask
    126                            psStatsOptions meanStat, // Statistic to measure the mean (of the variance map)
    127                            psStatsOptions stdevStat, // Statistic to measure the stdev (of the image)
    128                            int width,   // Width of patch (pixels)
    129                            psRandom *rng // Random number generator (for sub-sampling images)
     124bool pmReadoutVarianceRenorm(const pmReadout *readout, // Readout to normalise
     125                             psImageMaskType maskVal, // Value to mask
     126                             psStatsOptions meanStat, // Statistic to measure the mean (of the variance map)
     127                             psStatsOptions stdevStat, // Statistic to measure the stdev (of the image)
     128                             int width,   // Width of patch (pixels)
     129                             psRandom *rng // Random number generator (for sub-sampling images)
    130130    );
    131131
     
    133133///
    134134/// Since unmasked non-finite pixels can occur (e.g., by out-of-range in quantisation), it is sometimes
    135 /// necessary to mask them explicitly.  Non-finite pixels in the image or weight have their mask OR-ed with
     135/// necessary to mask them explicitly.  Non-finite pixels in the image or variance have their mask OR-ed with
    136136/// the provided value.
    137137bool pmReadoutMaskNonfinite(pmReadout *readout, ///< Readout to mask
     
    139139    );
    140140
    141 /// Apply a mask to the image and weight map
     141/// Apply a mask to the image and variance map
    142142///
    143143/// Unfortunately, image subtraction may result in a bi-modal image in masked areas, which can upset image
    144144/// statistics (very important for quantising images so that a product can be written out!).  This function
    145 /// sets masked areas to NAN in the image and weight.
     145/// sets masked areas to NAN in the image and variance.
    146146bool pmReadoutMaskApply(pmReadout *readout, ///< Readout to mask
    147147                        psImageMaskType maskVal ///< Mask value for which to apply mask
Note: See TracChangeset for help on using the changeset viewer.