Skip to content

Commit 908503a

Browse files
committed
Adding the correct opening of pilatus 900KW with databroker or tiled
1 parent 540c419 commit 908503a

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

smi_analysis/SMI_beamline.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,20 @@ def open_data_db(self, lst_img, optional_mask=None):
142142
self.imgs = []
143143
for img, bs in zip(lst_img, self.bs):
144144
if self.detector != 'rayonix':
145-
self.masks.append(self.det.calc_mask(bs=bs, bs_kind=self.bs_kind, optional_mask=optional_mask))
145+
if self.detector == 'Pilatus900kw':
146+
masks = self.det.calc_mask(bs=bs, bs_kind=self.bs_kind, optional_mask=optional_mask)
147+
self.masks.append(masks[:, :195])
148+
self.masks.append(masks[:, 212:212 + 195])
149+
self.masks.append(masks[:, -195:])
150+
else:
151+
self.masks.append(self.det.calc_mask(bs=bs, bs_kind=self.bs_kind, optional_mask=optional_mask))
146152

147153
if self.detector == 'Pilatus1m' or self.detector == 'Pilatus2m':
148154
self.imgs.append(img)
149155
elif self.detector == 'Pilatus900kw':
150-
self.imgs.append(np.rot90(img, 1))
156+
self.imgs.append(np.rot90(img, 1)[:, :195])
157+
self.imgs.append(np.rot90(img, 1)[:, 212:212 + 195])
158+
self.imgs.append(np.rot90(img, 1)[:, -195:])
151159
elif self.detector == 'Pilatus300kw':
152160
self.imgs.append(np.rot90(img, 1))
153161
elif self.detector == 'rayonix':

0 commit comments

Comments
 (0)