LSST Applications g1653933729+34a971ddd9,g1a997c3884+34a971ddd9,g28da252d5a+32b12a4112,g2bbee38e9b+ffc559ee46,g2bc492864f+ffc559ee46,g2cdde0e794+704103fe75,g3156d2b45e+6e87dc994a,g347aa1857d+ffc559ee46,g35bb328faa+34a971ddd9,g3a166c0a6a+ffc559ee46,g3e281a1b8c+8ec26ec694,g4005a62e65+ba0306790b,g414038480c+9f5be647b3,g41af890bb2+686ab7cd58,g4e1a3235cc+1fd785b14f,g7b55021d1b+da0d0eec6b,g80478fca09+6e21f9dc20,g82479be7b0+6fa35d7547,g858d7b2824+356eaf3287,g9125e01d80+34a971ddd9,ga5288a1d22+ba1f9bb3ef,gae0086650b+34a971ddd9,gb4748cc0e8+fd26a265a0,gb4ec7eb0ab+356eaf3287,gb58c049af0+ace264a4f2,gc081298178+30f12d1e69,gc28159a63d+ffc559ee46,gcf0d15dbbd+4adb3139bd,gd6b7c0dfd1+aae9efebf5,gda3e153d99+356eaf3287,gda6a2b7d83+4adb3139bd,gdaeeff99f8+7774323b41,gdd5a9049c5+ea78b51778,ge2409df99d+fa478de0b0,ge33fd446bb+356eaf3287,ge79ae78c31+ffc559ee46,gf0baf85859+890af219f9,gf5289d68f6+e11c78aeea,w.2024.41
LSST Data Management Base Package

Public Member Functions  
__init__ (self, *args, **kwargs)  
subtractedBackground (self, maskedImage)  
run (self, maskedImage)  
computeScaleFactors (self, maskedImage)  
pixelBased (self, maskedImage)  
imageBased (self, maskedImage)  
Static Public Attributes  
ConfigClass = ScaleVarianceConfig  
Static Protected Attributes  
str  _DefaultName = "scaleVariance" 
Scale the variance in a MaskedImage The variance plane in a convolved or warped image (or a coadd derived from warped images) does not accurately reflect the noise properties of the image because variance has been lost to covariance. This Task attempts to correct for this by scaling the variance plane to match the observed variance in the image. This is not perfect (because we're not tracking the covariance) but it's simple and is often good enough. The task implements a pixelbased and an imagebased correction estimator.
Definition at line 47 of file scaleVariance.py.
lsst.meas.algorithms.scaleVariance.ScaleVarianceTask.__init__  (  self,  
*  args,  
**  kwargs ) 
Definition at line 62 of file scaleVariance.py.
lsst.meas.algorithms.scaleVariance.ScaleVarianceTask.computeScaleFactors  (  self,  
maskedImage ) 
Calculate and return both variance scaling factors without modifying the image. Parameters  maskedImage : `lsst.afw.image.MaskedImage` Image for which to determine the variance rescaling factor. Returns  R : `lsst.pipe.base.Struct`  ``pixelFactor`` : `float` The pixel based variance rescaling factor or 1 if all pixels are masked or invalid.  ``imageFactor`` : `float` The image based variance rescaling factor or 1 if all pixels are masked or invalid.
Definition at line 134 of file scaleVariance.py.
lsst.meas.algorithms.scaleVariance.ScaleVarianceTask.imageBased  (  self,  
maskedImage ) 
Determine the variance rescaling factor from image statistics We calculate average(SNR) = stdev(image)/median(variance), and the value should be unity. We use the interquartile range as a robust estimator of the stdev. The variance rescaling factor is the factor that brings this value to unity. This may not work well if the pixels from which we measure the standard deviation of the image are not effectively the same pixels from which we measure the median of the variance. In that case, use an alternate method. Parameters  maskedImage : `lsst.afw.image.MaskedImage` Image for which to determine the variance rescaling factor. Returns  factor : `float` Variance rescaling factor or 1 if all pixels are masked or nonfinite.
Definition at line 197 of file scaleVariance.py.
lsst.meas.algorithms.scaleVariance.ScaleVarianceTask.pixelBased  (  self,  
maskedImage ) 
Determine the variance rescaling factor from pixel statistics We calculate SNR = image/sqrt(variance), and the distribution for most of the backgroundsubtracted image should have a standard deviation of unity. We use the interquartile range as a robust estimator of the SNR standard deviation. The variance rescaling factor is the factor that brings that distribution to have unit standard deviation. This may not work well if the image has a lot of structure in it, as the assumptions are violated. In that case, use an alternate method. Parameters  maskedImage : `lsst.afw.image.MaskedImage` Image for which to determine the variance rescaling factor. Returns  factor : `float` Variance rescaling factor or 1 if all pixels are masked or nonfinite.
Definition at line 155 of file scaleVariance.py.
lsst.meas.algorithms.scaleVariance.ScaleVarianceTask.run  (  self,  
maskedImage ) 
Rescale the variance in a maskedImage in place. Parameters  maskedImage : `lsst.afw.image.MaskedImage` Image for which to determine the variance rescaling factor. The image is modified in place. Returns  factor : `float` Variance rescaling factor. Raises  RuntimeError If the estimated variance rescaling factor by both methods exceed the configured limit. Notes  The task calculates and applies the pixelbased correction unless it is over the ``config.limit`` threshold. In this case, the imagebased method is applied.
Definition at line 95 of file scaleVariance.py.
lsst.meas.algorithms.scaleVariance.ScaleVarianceTask.subtractedBackground  (  self,  
maskedImage ) 
Context manager for subtracting the background We need to subtract the background so that the entire image (apart from objects, which should be clipped) will have the image/sqrt(variance) distributed about zero. This context manager subtracts the background, and ensures it is restored on exit. Parameters  maskedImage : `lsst.afw.image.MaskedImage` Image+mask+variance to have background subtracted and restored. Returns  context : context manager Context manager that ensure the background is restored.
Definition at line 67 of file scaleVariance.py.

staticprotected 
Definition at line 60 of file scaleVariance.py.

static 
Definition at line 59 of file scaleVariance.py.