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

Replace recipes with jupyter notebook #309

Merged
merged 9 commits into from
Sep 26, 2024
Merged

Conversation

Radonirinaunimi
Copy link
Member

This is something I had started a while ago but hasn't pushed as I believe the tutorial could be a bit more extensive but decided to do so anyway in case you have suggestions on which aspects to cover.

@Radonirinaunimi Radonirinaunimi added the python python extention label Sep 18, 2024
@felixhekhorn felixhekhorn added the documentation Improvements or additions to documentation label Sep 19, 2024
Copy link
Contributor

@felixhekhorn felixhekhorn left a comment

Choose a reason for hiding this comment

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

Unfortunately I can not comment on the notebook lines, so I just collect some points here.

  • this is already better than before, but since we are already on it let's make it even better
  • I would consider introducing pandas - I find it quite useful for this kind of problems; (see also Como 🙃 )
  • don't print bin_left and bin_right separately but zip them (e.g. this would be more natural in pandas)
  • we need to explain channels and orders
  • maybe we want to give some sort of physics motivation, why one would adjust the bin normalization (e.g. plotting reasons)

@Radonirinaunimi
Copy link
Member Author

Unfortunately I can not comment on the notebook lines, so I just collect some points here.

* this is already better than before, but since we are already on it let's make it even better

* I would consider introducing `pandas` - I find it quite useful for this kind of problems; (see also Como 🙃 )

* don't print `bin_left` and `bin_right` separately but zip them (e.g. this would be more natural in pandas)

* we need to explain channels and orders

* maybe we want to give some sort of physics motivation, why one would adjust the bin normalization (e.g. plotting reasons)

Great, thanks! I will address these. These are mainly points that concern the current existing tutorials, are there some PineAPPL concepts that should be definitely highlighted on top of these (combining grids, etc.)?

@felixhekhorn
Copy link
Contributor

Mmm depends on how much we want to stuff into this ... if we want to add more, then I guess that one of the first things people want to know is more about convolve_with_one: all arguments are useful for physics, plotting, numerics. Also the scale* methods are sometimes useful ...

One thing that we should maybe link is the (Python) example in the repo - and maybe we want to even show it verbatim in the docs (next to recipes e.g.).

@Radonirinaunimi
Copy link
Member Author

Ok, I believe the tutorial is now complete. It includes both basic and (slightly) advanced (based on the examples use cases.

@felixhekhorn
Copy link
Contributor

One thing that we should maybe link is the (Python) example in the repo - and maybe we want to even show it verbatim in the docs (next to recipes e.g.).

Mmm now we have the Python tutorial almost the same twice, I guess we want to maintain only one ... so do we want to drop one, e.g. the one in examples and just point to the documentation there instead? Can we enforce the example being run also here? i.e. execute the notebook upon release? which I think is not happening by default

@Radonirinaunimi
Copy link
Member Author

So I removed the examples/python/dyaa.py as it is a bit of duplication (and it was deprecated).

Can we enforce the example being run also here? i.e. execute the notebook upon release? which I think is not happening by default

In principle we can run all of the examples in some CI, at least to make sure that they are always up to date with the changes. But I'd do so in a separate PR.

Also, btw, it would be nice to to have this up online before the code meeting.

@Radonirinaunimi Radonirinaunimi merged commit a30d3b5 into master Sep 26, 2024
9 checks passed
@Radonirinaunimi Radonirinaunimi deleted the modify-tutorial branch September 26, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation python python extention
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants