Comments (4)
Hi Bill, thanks for creating this issue. Do you have an example of how you solved this that you could share so that it's easier to test and reproduce (and then to change eventually)?
from hepdata_lib.
Thanks for the feedback, but HEPData doesn't support string values for the uncertainties. Recommendations for how to encode missing bins are given in:
https://hepdata-submission.readthedocs.io/en/latest/data_yaml.html#uncertainties (second paragraph)
The implementation in hepdata_lib
was done in PR #161, i.e. if all uncertainties are zero for a particular bin, then the errors
key is omitted from the YAML output. The warning message was my suggestion to discourage empty bins if there is only one dependent variable. But for your use case where there are multiple dependent variables and a (different) subset of bins are empty for each dependent variable, it is legitimate to set uncertainties to zero for those bins and you should just ignore the warnings from hepdata_lib
.
I don't think the behaviour of the hepdata_lib
code needs to be changed, but there could be better documentation and perhaps an option could be added to suppress the warnings. I'll try to address these two points and I'll leave this issue open until they are addressed.
from hepdata_lib.
Thanks both. An example of the use case is Fig. 5, the second table, in [1]. A stand-alone notebook to reproduce that table, along with the needed input files, can be found in cernbox at [2]. From my perspective this works fine, other than that the warning messages seem to imply a problem.
The reason that the encoding of missing bins pointed to by Graeme doesn't work in the hepdata_lib implementation is that there uncertaintes are added, or not, for an entire column; we don't have access to treat some of the rows differently.
[1] https://www.hepdata.net/record/146018
[2] https://cernbox.cern.ch/s/8Nk392EQuLX8jJC
from hepdata_lib.
Bill, thank you for providing the detailed example. Unfortunately, it is a limitation of hepdata_lib
that it is not possible to use a different treatment of uncertainties for different rows of a dependent variable. Your existing treatment is the best that can be done with the current code. I've opened a PR #251 that adds a paragraph of explanation to the end of the Uncertainties section of the documentation. I also added an option zero_uncertainties_warning
(default value True
) to the Variable
class. In your example notebook, you could suppress the warnings using:
# Dependent variable
gy = Variable(axTitles[1][0], is_independent=False, is_binned=False, units=axTitles[1][1], zero_uncertainties_warning=False)
I also added a test that the errors
key will be omitted if the uncertainties are zero, which should have been added when PR #161 was completed. Thanks again for the feedback.
from hepdata_lib.
Related Issues (20)
- Refactor RootFileReader.retrieve_object
- submission.create_files() fails and wipes the directory clean HOT 7
- Make directory cleanup more robust HOT 2
- CMSSW setup instructions broken for CMSSW_12_X_Y and later
- Add docs for `add_additional_resource` and support `type` argument HOT 1
- Support reading arrays in C files using cfilereader
- Test all supported Python versions
- Change Zenodo record added to Submission to Concept DOI
- Drop Python 2 support HOT 3
- Yank broken Python 2 releases from PyPI with Python 3 only hepdata-validator dependencies HOT 3
- Current SWAN defaults are incompatible HOT 3
- Update readthedocs config
- Reporting a vulnerability HOT 1
- Add ability to read in YODA files HOT 10
- Pip(3) version is outdated HOT 2
- Upgrade Pylint to allow use with Python 3.11
- Add ability to specify license information HOT 2
- Upgrade to codecov/codecov-action@v4
- Possible workspace.json file submission + symerrors submission HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hepdata_lib.