Skip to content

Commit

Permalink
assert added
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi0395 committed Jul 27, 2024
1 parent 91dbe40 commit 47bdf68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qsoabsfind/absfinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ def convolution_method_absorber_finder_in_QSO_spectra(fits_file, spec_index, abs
lam_search, unmsk_residual, unmsk_error = absorber_search_window(
lam_obs, residual, error, z_qso, absorber, min_wave, max_wave, verbose=False)

assert lam_search.size=unmsk_residual.size=unmsk_error.size
# Assert that the sizes of the arrays are equal
assert lam_search.size == unmsk_residual.size == unmsk_error.size, "Mismatch in array sizes"

# Kernel width computation
width_kernel = np.array([ker * resolution * ((f1 * line1 + f2 * line2) / (f1 + f2)) / (speed_of_light * 2.35) for ker in ker_width_pix])
Expand Down

0 comments on commit 47bdf68

Please sign in to comment.