remove_starlight#
- excalibuhr.utils.remove_starlight(D_full, V_full, spec_star, cen0_p, cen1_p, aper0=40, aper1=10, sub_factor=32, gain=2.0, NDIT=1.0, debug=False)[source]#
[EXPERIMENTAL!] Remove starlight contamination at the position of the widely separated companion in a 2D detector image.
- Parameters:
D_full (array) – cropped image of one order
V_full (array) – Variance of the input image accounting for sky background and readout noise
spec_star (array) – in case of sub-stellar companion extraction and remove_star_bkg=True, provide the extracted stellar spectra. This will be scaled according to the PSF and then removed from the science image before extracting the companion spectra.
cen0_p (float) – location of the star on slit in pixel
cen1_p (float) – location of the companion on slit in pixel
aper0 (int) – half aperture for masking the negative primary trace
aper1 (int) – half aperture for masking the negative secondary trace and the primary line core
aper2 (int) – half aperture for determining the line center
sub_factor (int) – binning factor along the dispersion axis
gain (float) – detector gain
NDIT (int) – number of DIT exposure coadded
- Returns:
D_full, Err_full – image and error after the starlight removal
- Return type:
array