asgardpy.data.tests.test_catalog   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 1

1 Function

Rating   Name   Duplication   Size   Complexity  
A test_3d_hess_1d_magic_catalog() 0 16 1
1
from asgardpy.analysis import AsgardpyAnalysis
2
3
4
def test_3d_hess_1d_magic_catalog(gpy_hess_magic):
5
    """
6
    Test the usage of Source Catalog for FoV background source models.
7
    """
8
9
    analysis = AsgardpyAnalysis(gpy_hess_magic)
10
11
    analysis.config.target.use_catalog.selection_radius = "10 deg"
12
    analysis.config.target.roi_selection.roi_radius = "2.8 deg"
13
14
    analysis.config.general.steps = ["datasets-3d", "datasets-1d"]
15
16
    analysis.run()
17
18
    assert "3FHL J0536.2+1733" in analysis.final_model.names
19
    assert len(list(analysis.final_model.parameters.free_parameters)) == 32
20