Skip to content
Snippets Groups Projects
Commit a81e62fe authored by Loïc Le Guyader's avatar Loïc Le Guyader
Browse files

Simplification

parent 22ec02db
No related branches found
No related tags found
1 merge request!186Improved BOZ flat field
......@@ -273,13 +273,13 @@ def _plane_flat_field(p, roi):
return Z
def compute_flat_field_correction(rois, p, plot=False):
def compute_flat_field_correction(rois, plane, plot=False):
"""Compute the plane field correction on beam rois.
Inputs
------
rois: dictionnary of beam rois['n', '0', 'p']
p: plane vector
plane: 2 plane vector concatenated
plot: boolean, True by default, diagnostic plot
Returns
......@@ -289,12 +289,12 @@ def compute_flat_field_correction(rois, p, plot=False):
"""
flat_field = np.ones((128, 512))
r = 'n'
flat_field[rois[r]['yl']:rois[r]['yh'], rois[r]['xl']:rois[r]['xh']] = \
_plane_flat_field(p[:4], rois[r])
r = 'p'
flat_field[rois[r]['yl']:rois[r]['yh'], rois[r]['xl']:rois[r]['xh']] = \
_plane_flat_field(p[4:], rois[r])
r = rois['n']
flat_field[r['yl']:r['yh'], r['xl']:r['xh']] = \
_plane_flat_field(plane[:4], r)
r = rois['p']
flat_field[r['yl']:r['yh'], r['xl']:r['xh']] = \
_plane_flat_field(plane[4:], r)
if plot:
f, ax = plt.subplots(1, 1, figsize=(6, 2))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment