| Conditions | 1 |
| Total Lines | 25 |
| Code Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # -*- coding: utf-8 -*- |
||
| 9 | @pytest.mark.parametrize( |
||
| 10 | "edissfunc", |
||
| 11 | [ |
||
| 12 | aur.rr1987, |
||
| 13 | aur.rr1987_mod, |
||
| 14 | aur.fang2008, |
||
| 15 | aur.fang2010_mono, |
||
| 16 | aur.fang2010_maxw_int, |
||
| 17 | aur.fang2013_protons, |
||
| 18 | aur.berger1974, |
||
| 19 | ] |
||
| 20 | ) |
||
| 21 | def test_endiss(edissfunc): |
||
| 22 | energies = np.logspace(-1, 2, 4) |
||
| 23 | fluxes = np.ones_like(energies) |
||
| 24 | # ca. 100, 150, 200 km |
||
| 25 | scale_heights = np.array([6e5, 27e5, 40e5]) |
||
| 26 | rhos = np.array([5e-10, 1.7e-12, 2.6e-13]) |
||
| 27 | # energy dissipation "profiles" |
||
| 28 | ediss = edissfunc( |
||
| 29 | energies[None, :], fluxes[None, :], |
||
| 30 | scale_heights[:, None], rhos[:, None] |
||
| 31 | ) |
||
| 32 | assert ediss.shape == (3, 4) |
||
| 33 | return |
||
| 34 | |||
| 47 |