Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend n3fit and vp to deal with two different initial state distributions #2110

Merged
merged 58 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from 57 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
4a66e6a
modify n3fit to accommondate for single spin polarized DY
Radonirinaunimi Jun 6, 2024
6dda547
Merge branch 'master' into polarised-dy
Radonirinaunimi Jun 7, 2024
0708e53
add new pdfbasis & re-order convolution
Radonirinaunimi Jun 9, 2024
e9d8d83
add to report POS bounds on individual flavours
Radonirinaunimi Jun 14, 2024
2a6bfc0
change DPOS data to impose bounds on individual flavours
Radonirinaunimi Jun 17, 2024
4eea373
Merge branch 'master' into polarised-dy
Radonirinaunimi Jun 17, 2024
97e1d54
remove actual non-needed files
Radonirinaunimi Jun 17, 2024
24e00cb
fix passing of when imposing BCs
Radonirinaunimi Jun 18, 2024
fc4b07b
remove s and sbar from POS bound plots
Radonirinaunimi Jun 18, 2024
b6d4f99
update run card to account for new basis & POS BCs
Radonirinaunimi Jun 19, 2024
c720b01
Merge branch 'master' into polarised-dy
Radonirinaunimi Jun 29, 2024
974254b
Merge branch 'master' into polarised-dy
giacomomagni Jul 9, 2024
fb42b24
add a template runcard
giacomomagni Jul 9, 2024
f4dd873
init work on theory covmat
giacomomagni Jul 9, 2024
ea44db3
some other work on pineparser, not working yet
giacomomagni Jul 9, 2024
ce73e46
lumi to channels
giacomomagni Jul 9, 2024
c879ba8
remove is_polarized and make it working
giacomomagni Jul 9, 2024
2b86ae3
add a template runcard
Radonirinaunimi Jul 9, 2024
4a0824a
Merge branch 'polarised-dy' of https://github.com/NNPDF/nnpdf into po…
giacomomagni Jul 10, 2024
74ebd2a
some work still test not passing
giacomomagni Jul 10, 2024
3fbc5d8
fully complete example polarized run cards
Radonirinaunimi Jul 9, 2024
97fad21
make interface more future-proof
Radonirinaunimi Jul 11, 2024
4493e90
bump pineappl version
Radonirinaunimi Jul 11, 2024
fa2d1c2
various minor adjustments
Radonirinaunimi Jul 11, 2024
cf40adb
propagate convolution_types to old Fk parser
Radonirinaunimi Jul 14, 2024
0390ff0
replace convolute_with_one -> convolve_with_one
Radonirinaunimi Jul 15, 2024
cc04b8b
at least make the tests running again
Radonirinaunimi Jul 15, 2024
1f5e55f
attempt to fix quickcard_pol regression
Radonirinaunimi Jul 15, 2024
bbaf7c6
make plot_fancy work with PDF boundary condition
Radonirinaunimi Jul 15, 2024
b29e656
update example cards with final datasets
Radonirinaunimi Jul 18, 2024
44c30bc
Merge branch 'master' into polarised-dy
giacomomagni Jul 19, 2024
9b10245
make 3pt missing running
giacomomagni Jul 19, 2024
de51203
Apply subsets of suggestions from code review
Radonirinaunimi Jul 23, 2024
59fa62d
Merge branch 'master' into polarised-dy
Radonirinaunimi Jul 23, 2024
1eebf11
reflect pineappl version bump
Radonirinaunimi Jul 23, 2024
808b5e6
Merge branch 'master' into polarised-dy
Radonirinaunimi Jul 24, 2024
0adedad
simplify filling of boundary_pdf list
Radonirinaunimi Jul 24, 2024
4bffa43
update polarized cards to use final theory IDs
Radonirinaunimi Jul 24, 2024
8bea11e
make the unpolarized boundary condition part of the PDF object
scarlehoff Jul 24, 2024
c2e2e2a
put the unpolarized bc as part of the dataspec in the comparefit
scarlehoff Jul 24, 2024
50a466d
fix 3pt prescription
scarlehoff Jul 24, 2024
42af417
add unpolarized_bc to the t0 namespace
scarlehoff Jul 24, 2024
1247393
update reg test
scarlehoff Jul 24, 2024
e852406
register boundary conditions if active during the fit when using fitc…
scarlehoff Jul 25, 2024
e4e32b3
add a PDF with only central value object
scarlehoff Jul 25, 2024
60a6d34
modified runcard in regression folder
scarlehoff Jul 25, 2024
42c94ea
Automatically regenerated regressions from PR 2133, branch polarised-…
Jul 25, 2024
042d995
apply review comments
scarlehoff Jul 25, 2024
0e0adb4
Merge pull request #2133 from NNPDF/polarised-dy-refactor-bc
Radonirinaunimi Jul 25, 2024
d36bcce
resolve conflicts
Radonirinaunimi Jul 25, 2024
68ff9f6
Automatically regenerated regressions from PR 2110, branch polarised-dy.
Jul 26, 2024
b825406
Merge branch 'master' into polarised-dy
Radonirinaunimi Jul 26, 2024
7038c54
update pol_3 following update of theory
scarlehoff Jul 26, 2024
6115f77
update documentations
Radonirinaunimi Jul 28, 2024
9ee28ab
Update validphys2/src/validphys/coredata.py
scarlehoff Jul 29, 2024
29346df
Apply suggestions from code review
Radonirinaunimi Jul 29, 2024
16580b7
Merge branch 'master' into polarised-dy
Radonirinaunimi Jul 29, 2024
523b1e7
fixes polarized in parallel replica fit
Radonirinaunimi Jul 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/fitbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
env:
N3FIT_MAXNREP: 20 # total number of replicas to fit
POSTFIT_NREP: 16 # requested replicas for postfit
REFERENCE_SET: NNBOT-03c99fd73-2024-07-26 # reference set for exact results
REFERENCE_SET: NNBOT-06f20cf6a-2024-07-26 # reference set for exact results
STABLE_REFERENCE_SET: NNBOT-c0f99b7b3-2024-02-28 # reference set for last tag
CONDA_PY: 312
PYTHONHASHSEED: "0"
Expand Down
44 changes: 39 additions & 5 deletions doc/sphinx/source/tutorials/polarized_fits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,42 @@ as a boundary condition while ``n_std`` specifies the shift in terms of the stan
deviation to be applied to the PDF central values. If ``n_std=0.0`` then the
PDF central values will be used to constrain their polarized counterparts.

.. note::

This will also be the PDF set to be used to compute observable predictions
during the fit.

Instead, the unpolarized PDF set to be used to compute the `t0` covariance matrix need to be specified under the ``datacuts`` entry:

.. code-block:: yaml

...
datacuts:
t0pdfset: NNPDFpol11_100 # PDF set to generate t0 covmat
unpolarized_bc: NNPDF40_nnlo_pch_as_01180
q2min: 1.00 # Q2 minimum
w2min: 4.00 # W2 minimum
...

And if a theory covariance matrix is included in the fit
(see :ref:`how to include a theory covariance matrix in a fit <_thcov_tutorial>`
for more details), then the unpolarized PDF set also needs to be specified in the
``theorycovmatconfig`` together with the polarized PDF to be used:

.. code-block:: yaml

# Define the unpolarized PDF set to be used to compute predictions with validphys actions
...
theorycovmatconfig:
point_prescription: '7 point'
theoryids:
from_: scale_variation_theories
pdf: NNPDFpol11_100
unpolarized_bc: NNPDF40_nnlo_pch_as_01180
use_thcovmat_in_fitting: true
use_thcovmat_in_sampling: true
...

Given that polarized fits require different fitting bases and different theory
constraints, the fields under the ``fitting`` key require some adjustments.
Specifically:
Expand All @@ -41,7 +77,7 @@ Specifically:

...
fitting:
fitbasis: POLARIZED_EVOL
fitbasis: POLARIZED_EVOL_CMP
sum_rules: TSR
basis:
- {fl: sng, trainable: false, smallx: [1.094, 1.118], largex: [1.46, 3.003]}
Expand Down Expand Up @@ -89,8 +125,8 @@ and then followed by the basis type (for example ``EVOL`` or ``FLAVOUR``).

where the subscript :math:`r` indicates that the random seed per replica is always
different. In practice, when imposing the positivity at the level of PDFs, we enforce
the constraints on the flavor combination :math:`\left( \Delta f_i + \Delta \bar{f}_i \right)`,
that is :math:`(\Delta) \mathcal{F}_k \equiv (\Delta) f_k + (\Delta) \bar{f}_k`.
the constraints on the individual flavor :math:`\Delta f_i` (or respectively :math:`\Delta \bar{f}_i`),
that is :math:`(\Delta) \mathcal{F}_k \equiv (\Delta) f_k` (or respectively :math:`(\Delta) \mathcal{F}_k \equiv (\Delta) \bar{f}_k`).

Once the runcard is ready, the user can follow the guidelines :ref:`here <run-n3fit-fits>`
to set up and run fits.
Expand All @@ -106,8 +142,6 @@ can simply be done by supplementing a flag to the ``evolven3fit``:

evolven3fit evolve $runcard_folder --use_polarized

Alternatively, the user can explicitly specify the path to the EKO using the flag ``--load``.


Comparing polarized fits
------------------------
Expand Down
1,128 changes: 564 additions & 564 deletions extra_tests/regression_fits/central_16.exportgrid

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions extra_tests/regression_fits/central_16.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,45 +51,45 @@
],
"stop_epoch": 1100,
"best_epoch": 1099,
"erf_tr": 2.6700103282928467,
"erf_vl": 2.596097469329834,
"chi2": 2.1046993732452393,
"erf_tr": 2.6700093746185303,
"erf_vl": 2.5960960388183594,
"chi2": 2.1047041416168213,
"pos_state": "POS_VETO",
"arc_lengths": [
1.3207828111870983,
1.4752518408583124,
1.1834879869850787,
1.001142499763364,
1.1960909456851319
1.3207826202191888,
1.4752515128602395,
1.1834880064420275,
1.0011424664941873,
1.1960902816154753
],
"integrability": [
0.000920317608690574,
0.0009203176086889364,
4.833287800831698e-05,
0.46257802098989376,
0.0069634128594759925
0.000920316459089382,
0.0009203164590875224,
4.833296725237357e-05,
0.46257925033569225,
0.0069633987150139465
],
"timing": {
"walltime": {
"Total": 10.047237396240234,
"Total": 10.90460753440857,
"start": 0.0,
"replica_set": 0.210205078125,
"replica_fitted": 10.047173023223877,
"replica_set_to_replica_fitted": 9.836967945098877
"replica_set": 0.22848939895629883,
"replica_fitted": 10.904474258422852,
"replica_set_to_replica_fitted": 10.675984859466553
},
"cputime": {
"Total": 11.469310126,
"Total": 12.365805662,
"start": 0.0,
"replica_set": 0.2088275399999997,
"replica_fitted": 11.469243942000002,
"replica_set_to_replica_fitted": 11.260416402
"replica_set": 0.22668013299999945,
"replica_fitted": 12.365671202000001,
"replica_set_to_replica_fitted": 12.138991069000003
}
},
"version": {
"keras": "3.4.1",
"tensorflow": "2.17.0, mkl=False",
"numpy": "1.26.4",
"nnpdf": "4.0.9.post1058.dev0+0a1b331ae",
"validphys": "4.0.9.post1058.dev0+0a1b331ae"
"nnpdf": "4.0.9.post1210.dev0+d36bcce78",
"validphys": "4.0.9.post1210.dev0+d36bcce78"
}
}
Loading