ENH: Add full_output keyword
@@ -738,7 +738,7 @@ class HCIDataset:
def inject_companions(self, flux, rad_dists, n_branches=1, theta=0,
imlib='opencv', interpolation='lanczos4',
- verbose=True):
+ full_output=False, verbose=True):
""" Injection of fake companions in 3d or 4d cubes.
Parameters
@@ -770,14 +770,16 @@ class HCIDataset:
For 'opencv' library: 'nearneig', 'bilinear', 'bicubic', 'lanczos4'.
The 'nearneig' interpolation is the fastest and the 'lanczos4' the
slowest and accurate. 'lanczos4' is the default.
+ full_output : bool, optional
+ Return the coordinates of the injected companions.
verbose : bool, optional
If True prints out additional information.
Returns
-------
yx : list of tuple(y,x)
- Pixel coordinates of the injections in the first frame (and first
- wavelength for 4D cubes).
+ [if full_output] Pixel coordinates of the injections in the first
+ frame (and first wavelength for 4D cubes).
"""
# TODO: support the injection of a Gaussian/Moffat kernel.
@@ -800,6 +802,7 @@ class HCIDataset:
full_output=True,
verbose=verbose)
+ if full_output:
return yx
def load_angles(self, angles, hdu=0):
