def testZScale(self): """Test using a zscale stretch""" rgbImage = rgb.ZScaleMapping(self.images[R]).makeRgbImage() if display: plt = rgb.displayRGB(rgbImage, False) plt.title("zscale") plt.show()
def __init__(self, image=None, nSamples=1000, contrast=0.25): """Initialise an object able to carry out a zscale mapping @param image to be used to estimate the stretch @param nSamples Number of data points to use (default: 1000) @param contrast Control the range of pixels to display around the median (default: 0.25) """ Normalize.__init__(self) ## The object used to perform the desired mapping self.mapping = afwRgb.ZScaleMapping(image, nSamples, contrast)