File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33use super :: boc:: { Channel , Kinematics , Order } ;
44use super :: convolutions:: ConvolutionCache ;
55use super :: error:: { Error , Result } ;
6- use super :: grid:: Grid ;
6+ use super :: grid:: { Grid , GridOptFlags } ;
77use super :: pids:: { OptRules , PidBasis } ;
88use super :: subgrid:: { self , EmptySubgridV1 , Subgrid } ;
99use ndarray:: { s, ArrayD } ;
@@ -252,16 +252,9 @@ impl FkTable {
252252 /// Rotate the FK Table into the specified basis.
253253 pub fn rotate_pid_basis ( & mut self , pid_basis : PidBasis ) {
254254 self . grid . rotate_pid_basis ( pid_basis) ;
255- }
256-
257- /// Merges the factors of the channels into the subgrids to normalize channel coefficients.
258- pub fn merge_channel_factors ( & mut self ) {
259- self . grid . merge_channel_factors ( ) ;
260- }
261-
262- /// Splits the grid such that each channel contains only a single tuple of PIDs.
263- pub fn split_channels ( & mut self ) {
264255 self . grid . split_channels ( ) ;
256+ self . grid . merge_channel_factors ( ) ;
257+ self . grid . optimize_using ( GridOptFlags :: all ( ) ) ;
265258 }
266259
267260 /// Optimize the size of this FK-table by throwing away heavy quark flavors assumed to be zero
Original file line number Diff line number Diff line change @@ -244,16 +244,6 @@ impl PyFkTable {
244244 self . fk_table . rotate_pid_basis ( pid_basis. into ( ) ) ;
245245 }
246246
247- /// Merge the factors of all the channels.
248- pub fn merge_channel_factors ( & mut self ) {
249- self . fk_table . merge_channel_factors ( ) ;
250- }
251-
252- /// Splits the grid such that each channel contains only a single tuple of PIDs.
253- pub fn split_channels ( & mut self ) {
254- self . fk_table . split_channels ( ) ;
255- }
256-
257247 /// Write to file.
258248 ///
259249 /// # Panics
Original file line number Diff line number Diff line change 55"""
66
77import numpy as np
8- import pytest
98import tempfile
109
1110from pineappl .boc import Channel , Order
@@ -129,20 +128,11 @@ def test_fktable_rotations(
129128 fk_evol_facs = fk .channels_factors ()
130129 np .testing .assert_array_equal (fk_evol_facs , 1 )
131130
132- # rotate in the PDG basis and check that some factors are not `1`
131+ # rotate in the PDG basis and check that all the factors are unity
133132 fk .rotate_pid_basis (PidBasis .Pdg )
134133 assert fk .pid_basis == PidBasis .Pdg
135134 fk_pdg_facs = fk .channels_factors ()
136- with pytest .raises (expected_exception = AssertionError ):
137- np .testing .assert_array_equal (fk_pdg_facs , 1 )
138-
139- # merge the factors and check that they are back to unity
140- fk .split_channels ()
141- fk .merge_channel_factors ()
142- # optimize the FK table to remove duplicate channels
143- fk .optimize (FkAssumptions ("Nf6Ind" ))
144- fk_facs = fk .channels_factors ()
145- np .testing .assert_array_equal (fk_facs , 1 )
135+ np .testing .assert_array_equal (fk_pdg_facs , 1 )
146136
147137 # check that the FK table can be loaded properly
148138 with tempfile .TemporaryDirectory () as tmpdir :
You can’t perform that action at this time.
0 commit comments