Skip to content
Snippets Groups Projects

Improved BOZ flat field

Merged Loïc Le Guyader requested to merge boz_flat_field into master
Compare and Show latest version
1 file
+ 12
5
Compare changes
  • Side-by-side
  • Inline
@@ -284,21 +284,28 @@ def _get_pixel_hexagons(module):
Parameters:
-----------
module: int, module number
module: either int, for the module number or a 2-d array of corners to
get hexagons from
Returns:
a list of hexagons
--------
a 1-d list of hexagons where corners position are in mm
"""
hexes = []
corners = _get_pixel_corners(module)
for y in range(128):
for x in range(512):
if type(module) is int:
corners = _get_pixel_corners(module)
else:
corners = module
for y in range(corners.shape[0]):
for x in range(corners.shape[1]):
c = 1e3*corners[y, x, :, :] # convert to mm
hexes.append(Polygon(c))
return hexes
def _add_colorbar(im, ax, loc='right', size='5%', pad=0.05):
"""Add a colobar on a new axes so it match the plot size.
Loading