| Conditions | 1 |
| Total Lines | 17 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | from asgardpy.analysis import AsgardpyAnalysis |
||
| 18 | def test_get_pivot_energy_from_start(gpy_hess_magic): |
||
| 19 | """ |
||
| 20 | Check the pivot energy for given fit model on a dataset from the start of |
||
| 21 | the AsgardpyAnalysis object. Test using the SpectralModel of ECPL |
||
| 22 | and without any associated EBL absorption model. |
||
| 23 | """ |
||
| 24 | from asgardpy.config.operations import get_model_template |
||
| 25 | |||
| 26 | new_model = get_model_template("ecpl2") |
||
| 27 | gpy_hess_magic.target.models_file = new_model |
||
| 28 | gpy_hess_magic.target.components[0].spectral.ebl_abs.reference = "" |
||
| 29 | |||
| 30 | analysis = AsgardpyAnalysis(gpy_hess_magic) |
||
| 31 | |||
| 32 | e_ref = fetch_pivot_energy(analysis) |
||
| 33 | |||
| 34 | assert e_ref.value == 0.030128153004345924 |
||
| 35 |