def situated(self): if self.bounds.lbrt() == self.situated_bounds.lbrt(): return self l, b, r, t = self.bounds.lbrt() xd = int(np.round(self.data.shape[1] / (r - l))) yd = int(np.round(self.data.shape[0] / (t - b))) scs = SheetCoordinateSystem(self.situated_bounds, xd, yd) data = np.zeros(scs.shape, dtype=np.float64) r1, r2, c1, c2 = self.input_sheet_slice data[r1:r2, c1:c2] = self.data return ImagenSheetView(data, self.situated_bounds, roi_bounds=self.roi_bounds, situated_bounds=self.situated_bounds, label=self.label, value=self.value)