Skip to content

Commit

Permalink
missing variables added
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi0395 committed Jul 27, 2024
1 parent 59f2ecc commit 6be071c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion qsoabsfind/absfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def convolution_method_absorber_finder_in_QSO_spectra(fits_file, spec_index, abs

if len(pure_z_abs) > 0:
match_abs1 = remove_Mg_falsely_identified_fe_absorber(spec_index, pure_z_abs, lam_obs, residual, error, use_kernel=absorber, d_pix=d_pix)
match_abs2 = z_abs_from_same_metal_absorber(pure_z_abs, lam_obs, residual, error, use_kernel=absorber)
match_abs2 = z_abs_from_same_metal_absorber(pure_z_abs, lam_obs, residual, error, d_pix, use_kernel=absorber)
ind_z = contiguous_pixel_remover(pure_z_abs, sn1_all, sn2_all)
sel_indices = (match_abs1 == -1) & (match_abs2 == -1) & (ind_z == -1) # pure final absorber candidates

Expand Down
5 changes: 3 additions & 2 deletions qsoabsfind/absorberutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def remove_Mg_falsely_identified_fe_absorber(index, z_after_grouping, lam_obs, r
lam_obs (numpy.ndarray): Observed wavelengths.
residual (numpy.ndarray): Residual values.
error (numpy.ndarray): Error values corresponding to the residuals.
d_pix (int): Delta pixel value.
d_pix (float): Delta pixel value.
Returns:
numpy.ndarray: Updated list of absorbers with false positives removed.
Expand Down Expand Up @@ -282,7 +282,7 @@ def remove_Mg_falsely_identified_fe_absorber(index, z_after_grouping, lam_obs, r
return match_abs

@jit(nopython=True)
def z_abs_from_same_metal_absorber(first_list_z, lam_obs, residual, error, use_kernel='MgII'):
def z_abs_from_same_metal_absorber(first_list_z, lam_obs, residual, error, d_pix=0.6, use_kernel='MgII'):
"""
Remove any absorber that arises due to the 2803 line but has already been detected for the 2796 line,
exploiting the doublet property of MgII to remove false positives.
Expand All @@ -292,6 +292,7 @@ def z_abs_from_same_metal_absorber(first_list_z, lam_obs, residual, error, use_k
lam_obs (numpy.ndarray): Observed wavelengths.
residual (numpy.ndarray): Residual values.
error (numpy.ndarray): Error values corresponding to the residuals.
d_pix (float): Pixel distance for line separation during Gaussian fitting. Default is 0.6.
use_kernel (str, optional): Kernel type (MgII, CIV). Default is 'MgII'.
Returns:
Expand Down

0 comments on commit 6be071c

Please sign in to comment.