Skip to content

Commit

Permalink
better comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jvshields committed Dec 4, 2024
1 parent 7729f97 commit 6e63e88
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions stardis/radiation_field/opacities/opacities_solvers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,9 @@ def calc_alan_entries(
"""

alpha_line_at_nu = np.zeros((no_of_depth_points, len(tracing_nus_values)))
d_nu = tracing_nus_values[0] - tracing_nus_values[-1]
d_nu = (
tracing_nus_values[0] - tracing_nus_values[-1]
) # This is a bit awkward, but not sure of a better way to do it for non-uniform grids

for line_index in numba.prange(len(line_nus)):
line_nu = line_nus[line_index]
Expand All @@ -539,7 +541,7 @@ def calc_alan_entries(
tracing_nus_values[::-1], line_nu
)

# We want to consider lines within a certain range of the line_nu
# We want to consider grid points within a certain range of the line_nu
line_broadening = (
(
line_gamma + doppler_widths[line_index, depth_point_index] * 1e3
Expand All @@ -548,8 +550,7 @@ def calc_alan_entries(
line_index, depth_point_index
] # Scale by alpha of the line
) / d_nu
print(line_broadening)
line_broadening_range = max(10.0, line_broadening) # This is a placeholder
line_broadening_range = max(10.0, line_broadening) # Force a minimum range

lower_freq_index = max(
closest_frequency_index - int(line_broadening_range), 0
Expand Down

0 comments on commit 6e63e88

Please sign in to comment.