Skip to content

Commit

Permalink
unit test civers all five layers now
Browse files Browse the repository at this point in the history
  • Loading branch information
gschwefer committed Oct 27, 2023
1 parent f62213b commit c0c7f29
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions ctapipe/tests/test_atmosphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,17 @@ def test_height_overburden_circle(table_profile):

profile_5 = atmo.FiveLayerAtmosphereDensityProfile.from_array(fit_reference)

circle_height_5_layer = profile_5.height_from_overburden(
profile_5.integral(47 * u.km)
)
layer_5_heights=u.Quantity([5,15,30,70,110]*u.km)

for height in layer_5_heights:

circle_height_5_layer = profile_5.height_from_overburden(
profile_5.integral(height)
)

assert np.allclose(circle_height_5_layer, height, rtol=0.005)


assert np.allclose(circle_height_5_layer, 47 * u.km, rtol=0.0001)

# Exponential atmosphere
density_model = atmo.ExponentialAtmosphereDensityProfile(
Expand Down

0 comments on commit c0c7f29

Please sign in to comment.