-
Notifications
You must be signed in to change notification settings - Fork 14
Make the sqlite theorydb into a folder of yaml files #1997
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
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 |
|---|---|---|
|
|
@@ -26,7 +26,6 @@ requirements: | |
| - pymongo <4 | ||
| - seaborn | ||
| - lhapdf | ||
| - sqlite | ||
| - numpy | ||
| - pkg-config | ||
| - reportengine | ||
|
|
||
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
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 |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| #!/usr/bin/env python | ||
| """ | ||
| Generate the theory csv using validphys functions | ||
| """ | ||
| from argparse import ArgumentParser | ||
| from pathlib import Path | ||
|
|
||
| from validphys.datafiles import theory_cards | ||
| from validphys.theorydbutils import fetch_all | ||
|
|
||
| if __name__ == "__main__": | ||
| parser = ArgumentParser() | ||
|
|
||
| parser.add_argument("csvpath", type=Path, help="Path to write the csv to") | ||
|
|
||
| args = parser.parse_args() | ||
|
|
||
| theory_df = fetch_all(theory_cards) | ||
| theory_df.to_csv(args.csvpath) |
Empty file.
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
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
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
This file was deleted.
Oops, something went wrong.
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 |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| .. _th_parameter_info: | ||
|
|
||
| ===================================== | ||
| Looking up the parameters of a theory | ||
| ===================================== | ||
|
|
||
| The parameters for all of the theories can be found in the ``theory_cards`` folder. | ||
| The ``theory_cards`` folder is installed together, with the data, as part of the validphys package. | ||
| This is an sqlite database file. The information contained within this file can also be | ||
| viewed [within the docs](theory-indexes). | ||
|
|
||
| The tools required to extract the parameters for a given theory are already in | ||
| the validphys framework: | ||
|
|
||
| .. code-block:: python | ||
|
|
||
| from validphys.loader import Loader | ||
|
|
||
| l = Loader() | ||
| # replace 53 with the relevant theoryID | ||
| tinfo = l.check_theoryID(53) | ||
| print(tinfo.get_description()) | ||
| {'ID': 53, 'PTO': 2, 'FNS': 'FONLL-C', 'DAMP': 0, 'IC': 1, 'ModEv': 'TRN', | ||
| 'XIR': 1.0, 'XIF': 1.0, 'NfFF': 5, 'MaxNfAs': 5, 'MaxNfPdf': 5, 'Q0': 1.65, | ||
| 'alphas': 0.118, 'Qref': 91.2, 'QED': 0, 'alphaqed': 0.007496252, | ||
| 'Qedref': 1.777, 'SxRes': 0, 'SxOrd': 'LL', 'HQ': 'POLE', 'mc': 1.51, | ||
| 'Qmc': 1.51, 'kcThr': 1.0, 'mb': 4.92, 'Qmb': 4.92, 'kbThr': 1.0, 'mt': 172.5, | ||
| 'Qmt': 172.5, 'ktThr': 1.0, 'CKM': '0.97428 0.22530 0.003470 0.22520 0.97345 0.041000 0.00862 0.04030 0.999152', | ||
| 'MZ': 91.1876, 'MW': 80.398, 'GF': 1.1663787e-05, 'SIN2TW': 0.23126, 'TMC': 1, | ||
| 'MP': 0.938, 'Comments': 'NNPDF3.1 NNLO central', 'global_nx': 0, 'EScaleVar': 1} | ||
|
|
||
|
|
||
| Given that printing a dictionary in a python terminal is a bit cumbersome, the above | ||
| method for checking theory parameters has been added to a command line | ||
| script ``vp-checktheory`` which essentially does the same thing but prints the | ||
| table in a nicer format. | ||
|
|
||
| The usage is simple: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| $ vp-checktheory 53 | ||
| Info for theory 53 | ||
| ID 53 | ||
| PTO 2 | ||
| FNS FONLL-C | ||
| DAMP 0 | ||
| IC 1 | ||
| ModEv TRN | ||
| XIR 1 | ||
| XIF 1 | ||
| NfFF 5 | ||
| MaxNfAs 5 | ||
| MaxNfPdf 5 | ||
| Q0 1.65 | ||
| alphas 0.118 | ||
| Qref 91.2 | ||
| QED 0 | ||
| alphaqed 0.00749625 | ||
| Qedref 1.777 | ||
| SxRes 0 | ||
| SxOrd LL | ||
| HQ POLE | ||
| mc 1.51 | ||
| Qmc 1.51 | ||
| kcThr 1 | ||
| mb 4.92 | ||
| Qmb 4.92 | ||
| kbThr 1 | ||
| mt 172.5 | ||
| Qmt 172.5 | ||
| ktThr 1 | ||
| CKM 0.97428 0.22530 0.003470 0.22520 0.97345 0.041... | ||
| MZ 91.1876 | ||
| MW 80.398 | ||
| GF 1.16638e-05 | ||
| SIN2TW 0.23126 | ||
| TMC 1 | ||
| MP 0.938 | ||
| Comments NNPDF3.1 NNLO central | ||
| global_nx 0 | ||
| EScaleVar 1 | ||
|
|
||
| Some of the entries of the table have been truncated to fit in the terminal, for | ||
| example the CKM matrix elements. If you want to see the | ||
| full output or wish to keep a permanent copy of the table then you can use the | ||
| command line option ``-d``, which stands for ``--dumptable`` which will save the | ||
| table in your current working directory as ``theory_<id>_info.csv``:: | ||
|
|
||
| $vp-checktheory --fit FIT | ||
|
|
||
| where ``FIT`` is a valid fit name. If the fit cannot be found locally, the script | ||
| will attempt to download it. | ||
|
Radonirinaunimi marked this conversation as resolved.
|
||
|
|
||
| The parameters in the above are defined [here](./theoryparamsdefinitions). | ||
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.