Is the PC/HT theory covariance matrix an issue?

Open
#2,521 0 comments 0 reactions 1 assignee View on GitHub

@achiefa is already working on this.

Since Sep 28, 2026.

Assessment

This issue has not been assessed yet.

Description

If I do vp-setupfit using the following simple fit runcard,

#
# Configuration file for n3fit
#
################################################################################
description: testfit

################################################################################
dataset_inputs:
- {dataset: CMS_WPWM_13TEV_ETA_ASY}

diagonal_frac: 0.75

################################################################################
datacuts:
  t0pdfset: 260727-ach-002
  q2min: 3.49
  w2min: 12.5

################################################################################
theory:
  theoryid: 41_000_000

################################################################################
theorycovmatconfig:
  point_prescriptions: [7 point]
  
  pdf: 260727-ach-002
  use_thcovmat_in_fitting: true
  use_thcovmat_in_sampling: true


trvlseed: 1786781433
nnseed: 785309382
mcseed: 1615417329
genrep: true

trial_specs:
  hyperscan: 260204-jcm-hyperopt
  thermalization: 400
  number_of_trials: 10

parameters: # This defines the parameter dictionary that is passed to the Model Trainer
  positivity:
    initial: 184.8
    multiplier:
  integrability:
    initial: 10
    multiplier:
  threshold_chi2: 3.5
  feature_scaling_points: 5

fitting:
  fitbasis: CCBAR_ASYMM  # EVOL (7), EVOLQED (8), etc.
  savepseudodata: true
  basis:
  - {fl: sng, trainable: false, smallx: [1.024, 1.124]}
  - {fl: g, trainable: false, smallx: [0.884, 1.183]}
  - {fl: v, trainable: false, smallx: [0.4155, 0.6767]}
  - {fl: v3, trainable: false, smallx: [0.1166, 0.6085]}
  - {fl: v8, trainable: false, smallx: [0.4831, 0.7867]}
  - {fl: t3, trainable: false, smallx: [-0.5186, 1.0]}
  - {fl: t8, trainable: false, smallx: [0.5591, 1.0]}
  - {fl: t15, trainable: false, smallx: [0.965, 1.142]}
  - {fl: v15, trainable: false, smallx: [0.4234, 0.7623]}

################################################################################
positivity:
  posdatasets:
  # Positivity of MSbar PDFs
  - {dataset: NNPDF_POS_100GEV_XUQ, maxlambda: 1e6}
  - {dataset: NNPDF_POS_100GEV_XUB, maxlambda: 1e6}
  - {dataset: NNPDF_POS_100GEV_XDQ, maxlambda: 1e6}
  - {dataset: NNPDF_POS_100GEV_XDB, maxlambda: 1e6}
  - {dataset: NNPDF_POS_100GEV_XSQ, maxlambda: 1e6}
  - {dataset: NNPDF_POS_100GEV_XSB, maxlambda: 1e6}
  - {dataset: NNPDF_POS_100GEV_XCQ, maxlambda: 1e6}
  - {dataset: NNPDF_POS_100GEV_XCB, maxlambda: 1e6}
  - {dataset: NNPDF_POS_100GEV_XGL, maxlambda: 1e6}

integrability:
  integdatasets:
  - {dataset: NNPDF_INTEG_3GEV_XT8, maxlambda: 1e2}
  - {dataset: NNPDF_INTEG_3GEV_XT3, maxlambda: 1e2}

################################################################################
debug: false
maxcores: 16

I get the following error:

[WARNING]: Using q2min from runcard
[WARNING]: Using w2min from runcard
[INFO]: All requirements processed and checked successfully. Executing actions.
[INFO]: Filtering real data.
[INFO]: 18/18 datapoints in CMS_WPWM_13TEV_ETA_ASY passed kinematic cuts.
[INFO]: 260727-ach-002 T0 checked.
[INFO]: FK-table md5 hashes stored in /home/emanuele/Documents/nnpdf40_cuts/test_fit/md5fk
[INFO]: Summary: 18/18 datapoints passed kinematic cuts.
[CRITICAL]: Bug in setup-fit ocurred. Please report it.
Traceback (most recent call last):
  File "/home/emanuele/Software/nnpdfgit/nnpdf/n3fit/src/n3fit/scripts/vp_setupfit.py", line 302, in run
    super().run()
  File "/home/emanuele/Software/nnpdfgit/nnpdf/validphys2/src/validphys/app.py", line 150, in run
    super().run()
  File "/home/emanuele/Software/miniconda3/envs/nnpdf_cuts/lib/python3.12/site-packages/reportengine/app.py", line 406, in run
    rb.execute_sequential()
  File "/home/emanuele/Software/miniconda3/envs/nnpdf_cuts/lib/python3.12/site-packages/reportengine/resourcebuilder.py", line 210, in execute_sequential
    result = self.get_result(callspec.function,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/emanuele/Software/miniconda3/envs/nnpdf_cuts/lib/python3.12/site-packages/reportengine/resourcebuilder.py", line 380, in get_result
    fres = function(**kwdict)
           ^^^^^^^^^^^^^^^^^^
  File "/home/emanuele/Software/nnpdfgit/nnpdf/validphys2/src/validphys/theorycovariance/construction.py", line 539, in user_covmat
    return mult_factor_user_covmat * fromfile_covmat(
                                     ^^^^^^^^^^^^^^^^
  File "/home/emanuele/Software/nnpdfgit/nnpdf/validphys2/src/validphys/theorycovariance/construction.py", line 454, in fromfile_covmat
    filecovmat = filecovmat.reindex(shortlist, level="dataset")
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/emanuele/Software/miniconda3/envs/nnpdf_cuts/lib/python3.12/site-packages/pandas/core/frame.py", line 6090, in reindex
    return super().reindex(
           ^^^^^^^^^^^^^^^^
  File "/home/emanuele/Software/miniconda3/envs/nnpdf_cuts/lib/python3.12/site-packages/pandas/core/generic.py", line 5476, in reindex
    return self._reindex_axes(
           ^^^^^^^^^^^^^^^^^^^
  File "/home/emanuele/Software/miniconda3/envs/nnpdf_cuts/lib/python3.12/site-packages/pandas/core/generic.py", line 5498, in _reindex_axes
    new_index, indexer = ax.reindex(
                         ^^^^^^^^^^^
  File "/home/emanuele/Software/miniconda3/envs/nnpdf_cuts/lib/python3.12/site-packages/pandas/core/indexes/base.py", line 4224, in reindex
    idx = self.levels[level]  # type: ignore[attr-defined]
          ~~~~~~~~~~~^^^^^^^
  File "/home/emanuele/Software/miniconda3/envs/nnpdf_cuts/lib/python3.12/site-packages/pandas/core/indexes/frozen.py", line 78, in __getitem__
    return super().__getitem__(n)
           ^^^^^^^^^^^^^^^^^^^^^^
TypeError: list indices must be integers or slices, not str

The error disappears if I comment the line

#  user_covmat_path: wKShkHFXQgiPlPK6IPp55g==/merged_pc_covmat.csv
Dominant language
Python
Stars
44
Forks
15
Avg merge
8d 12h
Merged PRs (30d)
7

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from NNPDF/nnpdf

All issues in NNPDF/nnpdf

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.