Skip to content

Commit

Permalink
remove redunant code
Browse files Browse the repository at this point in the history
  • Loading branch information
jvshields committed Nov 5, 2024
1 parent e3c5f65 commit 5c41d21
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,9 @@ def calculate_molecule_broadening(
quadratic_stark = "quadratic_stark" in broadening_line_opacity_config
van_der_waals = "van_der_waals" in broadening_line_opacity_config
radiation = "radiation" in broadening_line_opacity_config

gammas = np.zeros((len(lines), stellar_model.no_of_depth_points), dtype=float)
if use_vald_broadening:
gammas = np.zeros((lines.shape[0], stellar_model.no_of_depth_points))
if radiation:
gammas += lines.A_ul.values[:, np.newaxis]
if linear_stark or quadratic_stark:
Expand All @@ -802,8 +803,6 @@ def calculate_molecule_broadening(
)
gammas += vdW
gammas /= 2 # FWHM to HWHM
else:
gammas = np.zeros((len(lines), stellar_model.no_of_depth_points), dtype=float)

ions = stellar_plasma.molecule_ion_map.loc[lines.molecule]

Expand Down

0 comments on commit 5c41d21

Please sign in to comment.