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

How to get Up/Down weight from Weights() class #1118

Open
jusong21 opened this issue Jun 18, 2024 · 0 comments
Open

How to get Up/Down weight from Weights() class #1118

jusong21 opened this issue Jun 18, 2024 · 0 comments
Labels
question Further information is requested

Comments

@jusong21
Copy link

Describe what you want to do
A clear and concise description of what the goal is.

I made weight which is Weights class and save scale factors like below.

from coffea.analysis_tools import Weights
import numpy as np

weight = Weights(6, storeIndividual=True)

sfs = np.array([0.997, 1.01, 1, 1, 1, 0.997])
sfs_up = np.array([1, 1.32, 1.01, 1, 1, 1])
sfs_down = np.array([0.992, 0.699, 0.995, 0.999, 0.999, 0.992])

weight.add("test_SF", sfs, sfs_up, sfs_down)

In the weight, there are several more scale factors with different names.
I tried the below.

w = weight.partial_weight(include=["test_SF"])

When print w, it gives below which is the same to the nominal values.

array([0.997, 1.01 , 1.   , 1.   , 1.   , 0.997])

I want to get Up/Down values of "test_SF". How can I do that?
Currently, I'm using coffea==0.7.22, I can't use the recent one because of package version.

Explain what documentation is missing
If someone else has this same goal, what do you think could be added to https://coffeateam.github.io/coffea/ to help them complete the task on their own?

@jusong21 jusong21 added the question Further information is requested label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant