示例#1
0
    def extract_kernel(self, ds, band, x, y, transform):

        #no need to mask the kernel
        full_rectangle = lthacks.extract_kernel(ds, x, y, self.width,
                                                self.height, band, transform)

        return full_rectangle, full_rectangle
示例#2
0
	def extract_kernel(self, ds, band, x, y, transform):
		
		#no need to mask the kernel
		full_rectangle = lthacks.extract_kernel(ds, x, y, self.width, self.height, band, 
		                                        transform)
		
		return full_rectangle, full_rectangle
示例#3
0
def extractMaskedKernel(data, width, height, ds, band, x, y, transform):

    # extract full rectangle kernel
    full_rectangle = lthacks.extract_kernel(ds, x, y, width, height, band,
                                            transform)

    if np.any(full_rectangle == -9999) or full_rectangle is None:
        return None, None

    else:
        # define a masked array so that stats can be computed
        mask = data[:, :, 0]
        mx = np.ma.masked_array(full_rectangle, mask=mask)

        return mx, mx.data[~mx.mask]
示例#4
0
def extractMaskedKernel(data, width, height, ds, band, x, y, transform):

	# extract full rectangle kernel
	full_rectangle = lthacks.extract_kernel(
		ds, x, y, width, height, band, transform)
	
	if np.any(full_rectangle == -9999) or full_rectangle is None:
		return None, None
		
	else:
		# define a masked array so that stats can be computed
		mask = data[:,:,0]
		mx = np.ma.masked_array(full_rectangle, mask=mask)
	
		return mx, mx.data[~mx.mask]