-
Notifications
You must be signed in to change notification settings - Fork 12
Title: docs: add physics callout box for Higgs search data distribution #127 #167
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
Open
Riya-code2003
wants to merge
7
commits into
hsf-training:gh-pages
Choose a base branch
from
Riya-code2003:gh-pages
base: gh-pages
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6d1fe85
fix #127: Add physics callout box for higgs search data distributioney6
Riya-code2003 e53ec02
docs: update callout to include python unpacking explanation to Higgs…
Riya-code2003 7c0696f
Enhance challenge section on Python and physics concepts
Riya-code2003 2d62ee8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 93a24c1
Revise section titles and enhance explanations
Riya-code2003 da5627c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] ffae3ef
Fix formatting in Python Unpacking & Physics Logic section
Riya-code2003 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -177,7 +177,7 @@ ax.hist(branches["data_A"]["m4l"]) | |
| {: .output} | ||
|
|
||
|  | ||
|
|
||
| > | ||
| > ## Exercise | ||
| > | ||
| > Make the histogram of the variable `m4l` for sample `mc_363490.llll`. | ||
|
|
@@ -402,14 +402,24 @@ for k in range(0, 3): | |
| ~~~ | ||
| {: .output} | ||
|
|
||
| And then make a plot, actually, let's make 2 plots, with matplotlib we can add sub-plots to the figure, then, we will be able to compare the MC distribution without and with weights. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the comma should stay |
||
| And then make a plot, actually, let's make 2 plots, with matplotlib we can add sub-plots to the figure, then we will be able to compare the MC distribution without and with weights. | ||
|
|
||
| ```python | ||
| var_name = "m4l" | ||
| units = " [GeV]" | ||
| ranges = [[80, 170]] | ||
| bins = 24 | ||
| ``` | ||
| > ##Python Unpacking & Physics Logic | ||
| > | ||
| > In the code `fig, (ax_1, ax_2) = plt.subplots(1, 2)`, we use 'tuple unpacking'. | ||
| > This is a very common pattern in Python when a function returns multiple values. | ||
| > Here, `subplots` returns a figure object and an array of axes. We "unpack" them | ||
| > into two separate variables, `ax_1` and `ax_2`, so we can plot different | ||
| > distributions side-by-side. | ||
| {: .callout} | ||
|
|
||
|
|
||
|
|
||
| ```python | ||
| fig, (ax_1, ax_2) = plt.subplots(1, 2) | ||
|
|
@@ -497,6 +507,10 @@ ax.legend(fontsize=18, frameon=False) | |
| ``` | ||
|
|
||
|  | ||
|
|
||
| > | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's also remove the |
||
|
|
||
|
|
||
| > ## Exercise | ||
| > | ||
| > Modify a bit the previous code to include the ticks and text, in the text and axis labels use latex to achieve the final plot. | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep the empty line here to separate things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, I have restored the empty line after the image link to maintain proper spacing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still not empty. There's a
>