Skip to content

Commit

Permalink
apply black and fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jvshields committed Jul 18, 2024
1 parent 64ba57a commit 1772eb4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion stardis/radiation_field/radiation_field_solvers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))[
Expand Down

0 comments on commit 1772eb4

Please sign in to comment.