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

Polarised proton fits #1979

Merged
merged 97 commits into from
Apr 22, 2024
Merged

Polarised proton fits #1979

merged 97 commits into from
Apr 22, 2024

Conversation

Radonirinaunimi
Copy link
Member

@Radonirinaunimi Radonirinaunimi commented Mar 4, 2024

This PR implements the necessary changes to perform polarised fits. It deprecates the intial implementation in #1893.

Remaining Todos:

  • add positivity bound plots to report
  • add some tests (Some tests, such as test_fit, requires Polarised DIS and DY Commondata #1816 to be merged and then rebased here.)
  • generate the files for regression tests (will be regenerated at the very end with CI)
  • fix positivity dataset plots no longer needed as superseded by BC plots

@Radonirinaunimi Radonirinaunimi marked this pull request as draft March 4, 2024 20:33
n3fit/src/n3fit/model_gen.py Show resolved Hide resolved
validphys2/src/validphys/utils.py Outdated Show resolved Hide resolved
validphys2/src/validphys/pseudodata.py Outdated Show resolved Hide resolved
@scarlehoff
Copy link
Member

@Radonirinaunimi it would be good to rebase again since the changes to the convolution recently implemented will have an effect here (but they also simplify a lot what needs to be done, in that everything will be much more clear)

@Radonirinaunimi
Copy link
Member Author

@Radonirinaunimi it would be good to rebase again since the changes to the convolution recently implemented will have an effect here (but they also simplify a lot what needs to be done, in that everything will be much more clear)

Yep, I am doing so at the moment. Hopefully this will not be painful 🙃

@Radonirinaunimi
Copy link
Member Author

Radonirinaunimi commented Mar 6, 2024

@Radonirinaunimi it would be good to rebase again since the changes to the convolution recently implemented will have an effect here (but they also simplify a lot what needs to be done, in that everything will be much more clear)

Yep, I am doing so at the moment. Hopefully this will not be painful 🙃

It was slightly tricky but I believe it works. I will clean up a bit while adding some docs and tests.

Copy link
Member

@scarlehoff scarlehoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is good to go. Thank you for the hard work! I like how they are changes that are relatively major for how the fit works but are small nudges to the code ^__^

The only thing left for me to be happy would be having a fit + report with this latest version of the code (after comments are applied or ignored in case-by-case basis xd) before merging

n3fit/src/n3fit/tests/test_backend.py Outdated Show resolved Hide resolved
n3fit/src/n3fit/tests/test_backend.py Outdated Show resolved Hide resolved
n3fit/src/n3fit/tests/test_layers.py Outdated Show resolved Hide resolved
n3fit/src/n3fit/tests/test_layers.py Outdated Show resolved Hide resolved
n3fit/src/n3fit/tests/test_layers.py Outdated Show resolved Hide resolved
n3fit/src/n3fit/layers/observable.py Outdated Show resolved Hide resolved
n3fit/src/n3fit/layers/observable.py Show resolved Hide resolved
n3fit/src/n3fit/layers/observable.py Outdated Show resolved Hide resolved
n3fit/src/n3fit/layers/observable.py Show resolved Hide resolved
n3fit/src/n3fit/model_gen.py Outdated Show resolved Hide resolved
@Radonirinaunimi
Copy link
Member Author

The only thing left for me to be happy would be having a fit + report with this latest version of the code (after comments are applied or ignored in case-by-case basis xd) before merging

I already read your mind earlier and the evolutions are running atm xd Will generate some reports tomorrow while addressing your suggestions.

@Radonirinaunimi
Copy link
Member Author

The reports are now failing because of some recent changes in the computation of stats that appear following lines:

unpol_cv = unpol_stats.central_value()
unpol_stdv = unpol_stats.errorbarstd()
ax.plot(xgrid, unpol_cv + unpol_stdv, color="red")

I am fixing this now.

@scarlehoff
Copy link
Member

What changes?
But in any case, that function is the only non-trivial so if you can deal also with the TODO that would be perfect.

@scarlehoff
Copy link
Member

That should only happen if you are getting a list and not an array, and that should definitely not happen because the data is made into an array upon entering the Stats class.

self.data = np.atleast_2d(data)

So there might be something wrong somewhere else?

@Radonirinaunimi
Copy link
Member Author

With possibly some improvements in the sumrules module, namely (for my own recollection) modifying the _integral function to return the individual limit instead of directly their sums, I think this is now finished.

Here are some reports:

PS: These will be the fits we'll send to Stagnitto et al.

@scarlehoff scarlehoff added run-fit-bot Starts fit bot from a PR. and removed redo-regressions Recompute the regression data labels Apr 18, 2024
Copy link

Greetings from your nice fit 🤖 !
I have good news for you, I just finished my tasks:

Check the report carefully, and please buy me a ☕ , or better, a GPU 😉!

Copy link
Member

@scarlehoff scarlehoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fitbot corresponding to the last commit #2057 (comment)

@Radonirinaunimi Radonirinaunimi merged commit 546bb90 into master Apr 22, 2024
6 checks passed
@Radonirinaunimi Radonirinaunimi deleted the nnpdfpol branch April 22, 2024 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request physics Polarised Polarised PDF fits run-fit-bot Starts fit bot from a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants