|
14 | 14 | from validphys.api import API |
15 | 15 | from validphys.tests.conftest import DATA |
16 | 16 | from validphys.tests.test_covmats import CORR_DATA |
| 17 | +from validphys.tests.conftest import PDF |
17 | 18 |
|
18 | 19 | SEED = 123456 |
19 | 20 |
|
@@ -81,6 +82,29 @@ def test_pseudodata_seeding(data_config, dataset_inputs, use_cuts): |
81 | 82 | np.testing.assert_allclose(rep_1, rep_2) |
82 | 83 |
|
83 | 84 |
|
| 85 | +@pytest.mark.parametrize("dataset_inputs", [DATA, CORR_DATA]) |
| 86 | +def test_pseudodata_t0_and_not(data_config, dataset_inputs): |
| 87 | + """ |
| 88 | + Check that using t0-sampling produces different pseudodata to not using |
| 89 | + t0-sampling. |
| 90 | + """ |
| 91 | + config = dict(data_config) |
| 92 | + config["dataset_inputs"] = dataset_inputs |
| 93 | + config["use_cuts"] = "internal" |
| 94 | + config["replica_mcseed"] = SEED |
| 95 | + config["use_t0"] = True |
| 96 | + config["t0pdfset"] = PDF |
| 97 | + |
| 98 | + config2 = deepcopy(config) |
| 99 | + config2["use_t0_sampling"] = True |
| 100 | + |
| 101 | + rep_1 = API.make_replica(**config) |
| 102 | + rep_2 = API.make_replica(**config2) |
| 103 | + |
| 104 | + # Check that the two replicas are different |
| 105 | + assert not np.allclose(rep_1, rep_2) |
| 106 | + |
| 107 | + |
84 | 108 | @pytest.mark.parametrize("use_cuts", ["nocuts", "internal"]) |
85 | 109 | @pytest.mark.parametrize("dataset_inputs", [DATA, CORR_DATA, SINGLE_SYS_DATASETS]) |
86 | 110 | def test_pseudodata_has_correct_ndata(data_config, dataset_inputs, use_cuts): |
|
0 commit comments