Example #1
0
 def setupRadialBackground(self):
     self.geo = self.det.geometry(
         self.run
     )  # self.geo = GeometryAccess(self.parent.geom.calibPath+'/'+self.parent.geom.calibFile)
     self.xarr, self.yarr, self.zarr = self.geo.get_pixel_coords()
     self.ix = self.det.indexes_x(self.evt)
     self.iy = self.det.indexes_y(self.evt)
     if self.ix is None:
         self.iy = np.tile(np.arange(self.userMask.shape[1]),
                           [self.userMask.shape[2], 1])
         self.ix = np.transpose(self.iy)
     self.iX = np.array(self.ix, dtype=np.int64)
     self.iY = np.array(self.iy, dtype=np.int64)
     if len(self.iX.shape) == 2:
         self.iX = np.expand_dims(self.iX, axis=0)
         self.iY = np.expand_dims(self.iY, axis=0)
     self.mask = self.geo.get_pixel_mask(
         mbits=0377
     )  # mask for 2x1 edges, two central columns, and unbound pixels with their neighbours
     self.rb = RadialBkgd(self.xarr,
                          self.yarr,
                          mask=self.mask,
                          radedges=None,
                          nradbins=100,
                          phiedges=(0, 360),
                          nphibins=1)
Example #2
0
 def setupRadialBackground(self):
     self.findPsanaGeometry()
     if self.calibFile is not None:
         self.geo = GeometryAccess(self.calibPath+'/'+self.calibFile)
         self.xarr, self.yarr, self.zarr = self.geo.get_pixel_coords()
         self.iX, self.iY = self.geo.get_pixel_coord_indexes()
         self.mask = self.geo.get_pixel_mask(mbits=0377)  # mask for 2x1 edges, two central columns, and unbound pixels with their neighbours
         self.rb = RadialBkgd(self.xarr, self.yarr, mask=self.mask, radedges=None, nradbins=100, phiedges=(0, 360), nphibins=1)
     else:
         self.rb = None