Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jvshields committed Dec 4, 2024
1 parent dee312e commit 4d0fe56
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions stardis/radiation_field/opacities/opacities_solvers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,7 @@ def calc_alan_entries(
):
"""
This is a helper function to prepare appropriate calling of the voigt profile calculation and allow for structure that
can be parallelized. In the no broadening case it simply calls the voigt profile calculator with the appropriate structure.
In the broadening case it first creates a mask to only consider lines within the broadening range, and then calls the function
only on those lines. The variable line would make the input matrix not square, and prohibits easy access with numba, so an
explicit for loop must be called.
can be parallelized.
Parameters
----------
Expand Down Expand Up @@ -545,8 +542,7 @@ def calc_alan_entries(

# We want to consider grid points within a certain range of the line_nu
line_broadening = (
np.sqrt(line_gamma**2 + doppler_width**2)
* alpha # Scale by alpha of the line
(line_gamma + doppler_width) * alpha # Scale by alpha of the line
) / d_nu
line_broadening_range = max(10.0, line_broadening) # Force a minimum range

Expand Down

0 comments on commit 4d0fe56

Please sign in to comment.