5
5
6
6
class TestFkTable :
7
7
def fake_grid (self , bins = None ):
8
- lumis = [pineappl .lumi .LumiEntry ([(1 , 21 , 0.1 )])]
8
+ lumis = [pineappl .lumi .LumiEntry ([(1 , 21 , 1.0 )])]
9
9
orders = [pineappl .grid .Order (0 , 0 , 0 , 0 )]
10
10
bin_limits = np .array ([1e-7 , 1e-3 , 1 ] if bins is None else bins , dtype = float )
11
11
subgrid_params = pineappl .subgrid .SubgridParams ()
12
12
g = pineappl .grid .Grid .create (lumis , orders , bin_limits , subgrid_params )
13
+ g .set_key_value ("lumi_id_types" , "pdg_mc_ids" )
13
14
return g
14
15
15
16
def test_convolute_with_one (self ):
@@ -27,14 +28,10 @@ def test_convolute_with_one(self):
27
28
g .set_subgrid (0 , 0 , 0 , subgrid )
28
29
fk = pineappl .fk_table .FkTable .from_grid (g )
29
30
np .testing .assert_allclose (
30
- fk .convolute_with_one (2212 , lambda pid , x , q2 : 0.0 , lambda q2 : 0.0 ),
31
+ fk .convolute_with_one (2212 , lambda pid , x , q2 : 0.0 ),
31
32
[0.0 ] * 2 ,
32
33
)
33
34
np .testing .assert_allclose (
34
- fk .convolute_with_one (2212 , lambda pid , x , q2 : 1 , lambda q2 : 1.0 ),
35
- [5e6 / 9999 , 0.0 ],
36
- )
37
- np .testing .assert_allclose (
38
- fk .convolute_with_one (2212 , lambda pid , x , q2 : 1 , lambda q2 : 2.0 ),
39
- [2 ** 3 * 5e6 / 9999 , 0.0 ],
35
+ fk .convolute_with_one (2212 , lambda pid , x , q2 : 1 ),
36
+ [5e7 / 9999 , 0.0 ],
40
37
)
0 commit comments