diff --git a/stardis/radiation_field/opacities/opacities_solvers/tests/test_broadening.py b/stardis/radiation_field/opacities/opacities_solvers/tests/test_broadening.py index 1708e5ab..c97805ce 100644 --- a/stardis/radiation_field/opacities/opacities_solvers/tests/test_broadening.py +++ b/stardis/radiation_field/opacities/opacities_solvers/tests/test_broadening.py @@ -616,6 +616,7 @@ def test_calc_gamma_van_der_waals_cuda_wrapped_sample_cuda_values( ) +# Test this with actual regression data def test_rotational_broadening(example_stardis_output): actual_wavelengths, actual_fluxes_no_broadening = rotation_broadening( 20 * u.km / u.s, @@ -625,14 +626,14 @@ def test_rotational_broadening(example_stardis_output): ) expected_broadening_fluxes = [ - 34069895.2932162, - 34069822.27391726, - 34069676.41567875, - 34069458.07948008, - 34069167.80744836, - 34068806.32366434, - 34068374.53527089, - 34067873.53390926, + 34325016.26500261, + 34324942.84601202, + 34324796.18937743, + 34324576.65805383, + 34324284.79713459, + 34323921.33466243, + 34323487.18274513, + 34322983.43899771, ] actual_wavelengths, actual_fluxes = rotation_broadening( 20 * u.km / u.s, diff --git a/stardis/radiation_field/radiation_field_solvers/base.py b/stardis/radiation_field/radiation_field_solvers/base.py index 43417837..c93edb55 100644 --- a/stardis/radiation_field/radiation_field_solvers/base.py +++ b/stardis/radiation_field/radiation_field_solvers/base.py @@ -214,7 +214,7 @@ def single_theta_trace( Array of shape (no_of_depth_points, no_of_frequencies). Output specific intensity at each depth point for each frequency in tracing_nus. """ - # Need to calculate a mean opacity for the traversal between points. Linearly interporlating. Van Noort paper suggest interpolating + # Need to calculate a mean opacity for the traversal between points. Linearly interporlating. Van Noort paper suggest interpolating # alphas in log space. Could have a choice for interpolation scheme here. mean_alphas = np.exp((np.log(alphas[1:]) + np.log(alphas[:-1])) * 0.5) taus = (mean_alphas * geometry_dist_to_next_depth_point.reshape(-1, 1))[