STY: trailing whitespce, space after comma
@@ -109,7 +109,8 @@ def frame_shift(array, shift_y, shift_x, imlib='opencv',
elif interpolation == 'biquintic':
order = 5
else:
- raise ValueError('Scipy.ndimage interpolation method not recognized')
+ raise ValueError('Scipy.ndimage interpolation method not '
+ 'recognized')
if border_mode not in ['reflect', 'nearest', 'constant', 'mirror',
'wrap']:
@@ -213,7 +214,7 @@ def frame_center_satspots(array, xy, subi_size=19, sigfactor=6, shift=False,
----------
array : array_like, 2d
Image or frame.
- xy : tuple
+ xy : tuple of 4 tuples
Tuple with coordinates X,Y of the 4 satellite spots. When the spots are
in an X configuration, the order is the following: top-left, top-right,
bottom-left and bottom-right. When the spots are in an + (cross-like)
@@ -524,7 +525,8 @@ def frame_center_radon(array, cropsize=101, hsize=0.4, step=0.01,
if array.ndim != 2:
raise TypeError('Input array is not a frame or 2d array')
- if verbose: start_time = time_ini()
+ if verbose:
+ start_time = time_ini()
frame = array.copy()
frame = frame_crop(frame, cropsize, verbose=False)
listyx = np.linspace(start=-hsize, stop=hsize, num=2*hsize/step+1,
@@ -674,17 +676,30 @@ def cube_recenter_radon(array, full_output=False, verbose=True, imlib='opencv',
See the documentation of the ``vip_hci.preproc.frame_shift`` function.
interpolation : str, optional
See the documentation of the ``vip_hci.preproc.frame_shift`` function.
- kwargs : dict
- Optional parameters (keywords and values) can be passed to the
- ``frame_center_radon`` function.
+ cropsize : odd int, optional
+ Size in pixels of the cropped central area of the input array that will
+ be used. It should be large enough to contain the satellite spots.
+ hsize : float, optional
+ Size of the box for the grid search. The frame is shifted to each
+ direction from the center in a hsize length with a given step.
+ step : float, optional
+ The step of the coordinates change.
+ mask_center : None or int, optional
+ If None the central area of the frame is kept. If int a centered zero
+ mask will be applied to the frame. By default the center isn't masked.
+ nproc : int, optional
+ Number of processes for parallel computing. If None the number of
+ processes will be set to cpu_count()/2.
+ debug : bool, optional
+ Whether to print and plot intermediate info from ``frame_center_radon``.
+
Returns
-------
- array_rec : array_like
+ array_rec : 3d ndarray
Recentered cube.
- If full_output is True:
- y, x : 1d array of floats
- Shifts in y and x.
+ y, x : 1d arrays of floats
+ [full_output] Shifts in y and x.
"""
check_array(array, dim=3)
@@ -1288,6 +1303,3 @@ def cube_recenter_via_speckles(cube_sci, cube_ref=None, alignment_iter=5,
cum_x_shifts_ref, cum_y_shifts_ref)
else:
return cube_reg_sci, cum_x_shifts_sci, cum_y_shifts_sci
-
-
-
