openmapp-analyses 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- openmapp_analyses/__init__.py +15 -0
- openmapp_analyses/__main__.py +6 -0
- openmapp_analyses/arxiv.py +81 -0
- openmapp_analyses/cli.py +422 -0
- openmapp_analyses/combine.py +256 -0
- openmapp_analyses/hepdata_models.py +76 -0
- openmapp_analyses/hepdata_sources.py +162 -0
- openmapp_analyses/inspire.py +174 -0
- openmapp_analyses/schema.json +141 -0
- openmapp_analyses/search.py +128 -0
- openmapp_analyses/sources.json +36 -0
- openmapp_analyses/store.py +59 -0
- openmapp_analyses-1.0.0.dist-info/METADATA +144 -0
- openmapp_analyses-1.0.0.dist-info/RECORD +17 -0
- openmapp_analyses-1.0.0.dist-info/WHEEL +5 -0
- openmapp_analyses-1.0.0.dist-info/entry_points.txt +2 -0
- openmapp_analyses-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://openmapp.gitlab.io/schemas/combined-analyses-1.0.0.json",
|
|
4
|
+
"title": "OpenMAPP combined analyses",
|
|
5
|
+
"description": "All analysis implementations from the tools, merged by INSPIRE ID.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["schema_version", "date_created", "sources", "analyses"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"schema_version": {"type": "string"},
|
|
10
|
+
"date_created": {"type": "string"},
|
|
11
|
+
|
|
12
|
+
"sources": {
|
|
13
|
+
"description": "One entry per tool: where its data came from and what happened when reading it.",
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": {"$ref": "#/$defs/source"}
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
"analyses": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"items": {"$ref": "#/$defs/analysis"}
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
"inspire_status": {
|
|
24
|
+
"description": "What happened when looking up the papers in INSPIRE during the last update.",
|
|
25
|
+
"type": "object",
|
|
26
|
+
"required": ["status"],
|
|
27
|
+
"properties": {
|
|
28
|
+
"status": {
|
|
29
|
+
"description": "ok = looked up now; kept = INSPIRE unreachable, earlier information kept; skipped = not requested",
|
|
30
|
+
"enum": ["ok", "kept", "skipped"]
|
|
31
|
+
},
|
|
32
|
+
"n_with_info": {"type": "integer", "minimum": 0},
|
|
33
|
+
"error": {"type": "string"}
|
|
34
|
+
},
|
|
35
|
+
"additionalProperties": false
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
"tool_list": {
|
|
39
|
+
"description": "Where the list of tools used in the last update came from.",
|
|
40
|
+
"type": "object",
|
|
41
|
+
"required": ["origin"],
|
|
42
|
+
"properties": {
|
|
43
|
+
"origin": {
|
|
44
|
+
"description": "hepdata = HEPData's config.py, downloaded now; hepdata-saved = the copy saved by an earlier update; packaged = the list shipped with openmapp-analyses; file = a file given with --sources",
|
|
45
|
+
"enum": ["hepdata", "hepdata-saved", "packaged", "file"]
|
|
46
|
+
},
|
|
47
|
+
"location": {"type": "string"},
|
|
48
|
+
"retrieved": {"type": ["string", "null"]},
|
|
49
|
+
"error": {"type": "string", "description": "Why HEPData's config.py could not be used, when it could not"}
|
|
50
|
+
},
|
|
51
|
+
"additionalProperties": false
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"additionalProperties": false,
|
|
55
|
+
|
|
56
|
+
"$defs": {
|
|
57
|
+
"source": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"required": ["source_url", "status"],
|
|
60
|
+
"properties": {
|
|
61
|
+
"source_url": {"type": "string"},
|
|
62
|
+
"status": {
|
|
63
|
+
"description": "ok = read in this update; kept = could not be read now, data kept from an earlier update; error = never read",
|
|
64
|
+
"enum": ["ok", "kept", "error"]
|
|
65
|
+
},
|
|
66
|
+
"kept_from": {"type": ["string", "null"], "description": "For status 'kept': date of the update the data comes from"},
|
|
67
|
+
"kind": {"enum": ["tool", "statistical_model"]},
|
|
68
|
+
"format": {"enum": ["new", "old", "hepdata"]},
|
|
69
|
+
"tool_name_in_file": {"type": ["string", "null"]},
|
|
70
|
+
"version": {"type": ["string", "null"]},
|
|
71
|
+
"date_created": {"type": ["string", "null"]},
|
|
72
|
+
"schema_version": {"type": ["string", "null"]},
|
|
73
|
+
"n_analyses": {"type": "integer", "minimum": 0},
|
|
74
|
+
"n_implementations": {"type": "integer", "minimum": 0},
|
|
75
|
+
"error": {"type": "string"}
|
|
76
|
+
},
|
|
77
|
+
"additionalProperties": false
|
|
78
|
+
},
|
|
79
|
+
|
|
80
|
+
"analysis": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"required": ["inspire_id", "tools"],
|
|
83
|
+
"properties": {
|
|
84
|
+
"inspire_id": {"type": "integer", "minimum": 1},
|
|
85
|
+
"inspire": {"$ref": "#/$defs/inspire_info"},
|
|
86
|
+
"tools": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"minProperties": 1,
|
|
89
|
+
"additionalProperties": {"$ref": "#/$defs/tool_entry"}
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"additionalProperties": false
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
"inspire_info": {
|
|
96
|
+
"description": "Information about the paper from INSPIRE (the same for all tools).",
|
|
97
|
+
"type": "object",
|
|
98
|
+
"properties": {
|
|
99
|
+
"arXiv_id": {"type": "string"},
|
|
100
|
+
"title": {"type": "string"},
|
|
101
|
+
"collaborations": {"type": "array", "items": {"type": "string"}},
|
|
102
|
+
"year": {"type": "integer"},
|
|
103
|
+
"report_numbers": {"type": "array", "items": {"type": "string"}},
|
|
104
|
+
"dois": {"type": "array", "items": {"type": "string"}},
|
|
105
|
+
"analysis_ids": {"type": "array", "items": {"type": "string"}}
|
|
106
|
+
},
|
|
107
|
+
"additionalProperties": false
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
"tool_entry": {
|
|
111
|
+
"type": "object",
|
|
112
|
+
"required": ["implementations"],
|
|
113
|
+
"properties": {
|
|
114
|
+
"analysis_info": {
|
|
115
|
+
"description": "Extra analysis-level fields given by this tool (e.g. ana_id, pretty_name, signature_type), copied as-is.",
|
|
116
|
+
"type": "object"
|
|
117
|
+
},
|
|
118
|
+
"implementations": {
|
|
119
|
+
"type": "array",
|
|
120
|
+
"minItems": 1,
|
|
121
|
+
"items": {"$ref": "#/$defs/implementation"}
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
"additionalProperties": false
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
"implementation": {
|
|
128
|
+
"description": "Raw fields from the tool's file (name, path, ...) plus finished links (main_url, val_url, ...).",
|
|
129
|
+
"type": "object",
|
|
130
|
+
"required": ["main_url"],
|
|
131
|
+
"properties": {
|
|
132
|
+
"name": {"type": "string"},
|
|
133
|
+
"path": {"type": "string"},
|
|
134
|
+
"raw_value": {"type": "string", "description": "Old-format files only: the value as given in the file."},
|
|
135
|
+
"main_url": {"type": "string", "pattern": "^https?://"},
|
|
136
|
+
"val_url": {"type": "string", "pattern": "^https?://"}
|
|
137
|
+
},
|
|
138
|
+
"additionalProperties": true
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Searching the combined database.
|
|
3
|
+
|
|
4
|
+
Tool names are matched loosely: "smodels", "SModelS", "madanalysis 5" and
|
|
5
|
+
"MadAnalysis5" all work.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import re
|
|
9
|
+
|
|
10
|
+
_CONDITION = re.compile(r"^\s*([^=~]+?)\s*(=|~)\s*(.*?)\s*$")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _norm(name):
|
|
14
|
+
return re.sub(r"[\s\-_/.]", "", str(name)).lower()
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def find_tool_name(database, name):
|
|
18
|
+
"""
|
|
19
|
+
Return the tool's key in the database for a loosely written name, or raise ValueError.
|
|
20
|
+
Exact names win; otherwise a clear abbreviation works ("madanalysis" -> MadAnalysis5).
|
|
21
|
+
"""
|
|
22
|
+
wanted = _norm(name)
|
|
23
|
+
sources = database.get("sources", {})
|
|
24
|
+
spellings = {key: {_norm(key), _norm(r.get("tool_name_in_file") or "")} - {""}
|
|
25
|
+
for key, r in sources.items()}
|
|
26
|
+
for key, names in spellings.items():
|
|
27
|
+
if wanted in names:
|
|
28
|
+
return key
|
|
29
|
+
starts = [key for key, names in spellings.items() if any(n.startswith(wanted) for n in names)]
|
|
30
|
+
if wanted and len(starts) == 1:
|
|
31
|
+
return starts[0]
|
|
32
|
+
available = ", ".join(sources)
|
|
33
|
+
if len(starts) > 1:
|
|
34
|
+
raise ValueError(f"'{name}' could mean {', '.join(starts)}. Available tools: {available}")
|
|
35
|
+
raise ValueError(f"unknown tool '{name}'. Available tools: {available}")
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def parse_condition(text):
|
|
39
|
+
"""'signature_type=prompt' -> ('signature_type', '=', 'prompt')."""
|
|
40
|
+
m = _CONDITION.match(text)
|
|
41
|
+
if not m or not m.group(3):
|
|
42
|
+
raise ValueError(f"cannot understand condition '{text}' (use field=value or field~value)")
|
|
43
|
+
return m.group(1), m.group(2), m.group(3)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def field_values(obj, field):
|
|
47
|
+
"""All values of a field anywhere inside a nested dict/list (e.g. every 'name' of every implementation)."""
|
|
48
|
+
found = []
|
|
49
|
+
if isinstance(obj, dict):
|
|
50
|
+
for key, value in obj.items():
|
|
51
|
+
if key == field and not isinstance(value, (dict, list)):
|
|
52
|
+
found.append(value)
|
|
53
|
+
elif key == field and isinstance(value, list):
|
|
54
|
+
found.extend(v for v in value if not isinstance(v, (dict, list)))
|
|
55
|
+
found.extend(field_values(value, field))
|
|
56
|
+
elif isinstance(obj, list):
|
|
57
|
+
for item in obj:
|
|
58
|
+
found.extend(field_values(item, field))
|
|
59
|
+
return found
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# Fields that can hold an analysis ID: the tools' ana_id, implementation names and paths,
|
|
63
|
+
# and INSPIRE report numbers and analysis IDs (from the arXiv comment)
|
|
64
|
+
ANALYSIS_ID_FIELDS = ("ana_id", "analysis_ids", "name", "path", "raw_value", "report_numbers")
|
|
65
|
+
_EXPERIMENT_PREFIX = re.compile(r"^(atlas|cms|lhcb|alice)-")
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def _id_text(text):
|
|
69
|
+
"""Lower case, with '_' and spaces as '-', so ATLAS_SUSY_2018_31 and atlas-susy-2018-31 compare equal."""
|
|
70
|
+
return re.sub(r"[\s_]+", "-", str(text).strip().lower())
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def analysis_id_pattern(analysis_id):
|
|
74
|
+
"""
|
|
75
|
+
Finds an analysis ID inside longer text. The experiment prefix is optional, so
|
|
76
|
+
"ATLAS-SUSY-2018-31" also finds SimpleAnalysis's "ANA-SUSY-2018-31". A number is never
|
|
77
|
+
extended: "SUSY-2018-3" does not match "SUSY-2018-31".
|
|
78
|
+
"""
|
|
79
|
+
core = _EXPERIMENT_PREFIX.sub("", _id_text(analysis_id))
|
|
80
|
+
if len(core) < 3:
|
|
81
|
+
raise ValueError(f"analysis ID '{analysis_id}' is too short to search for")
|
|
82
|
+
return re.compile(r"(?<![a-z0-9])" + re.escape(core) + r"(?![0-9])")
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def _matches_analysis_id(analysis, patterns):
|
|
86
|
+
texts = [_id_text(v) for field in ANALYSIS_ID_FIELDS for v in field_values(analysis, field)]
|
|
87
|
+
return any(p.search(text) for p in patterns for text in texts)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def _matches(analysis, field, op, value):
|
|
91
|
+
if field == "tool": # "tool=SModelS" is allowed as a condition too
|
|
92
|
+
names = [_norm(t) for t in analysis["tools"]]
|
|
93
|
+
return any(_norm(value) == n if op == "=" else _norm(value) in n for n in names)
|
|
94
|
+
target = value.lower()
|
|
95
|
+
for v in field_values(analysis, field):
|
|
96
|
+
text = str(v).lower()
|
|
97
|
+
if (op == "=" and text == target) or (op == "~" and target in text):
|
|
98
|
+
return True
|
|
99
|
+
return False
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
def search(database, tools=None, any_tools=None, not_tools=None, inspire_ids=None, where=None,
|
|
103
|
+
analysis_ids=None):
|
|
104
|
+
"""Return the list of analyses (papers) that satisfy every given condition."""
|
|
105
|
+
tools = [find_tool_name(database, t) for t in (tools or [])]
|
|
106
|
+
any_tools = [find_tool_name(database, t) for t in (any_tools or [])]
|
|
107
|
+
not_tools = [find_tool_name(database, t) for t in (not_tools or [])]
|
|
108
|
+
ids = {int(i) for i in (inspire_ids or [])}
|
|
109
|
+
conditions = [parse_condition(c) if isinstance(c, str) else c for c in (where or [])]
|
|
110
|
+
id_patterns = [analysis_id_pattern(a) for a in (analysis_ids or [])]
|
|
111
|
+
|
|
112
|
+
results = []
|
|
113
|
+
for analysis in database["analyses"]:
|
|
114
|
+
present = analysis["tools"]
|
|
115
|
+
if ids and analysis["inspire_id"] not in ids:
|
|
116
|
+
continue
|
|
117
|
+
if any(t not in present for t in tools):
|
|
118
|
+
continue
|
|
119
|
+
if any_tools and not any(t in present for t in any_tools):
|
|
120
|
+
continue
|
|
121
|
+
if any(t in present for t in not_tools):
|
|
122
|
+
continue
|
|
123
|
+
if not all(_matches(analysis, *c) for c in conditions):
|
|
124
|
+
continue
|
|
125
|
+
if id_patterns and not _matches_analysis_id(analysis, id_patterns):
|
|
126
|
+
continue
|
|
127
|
+
results.append(analysis)
|
|
128
|
+
return results
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"_comment": "Fallback list of tools, used only when HEPData's config.py cannot be downloaded and no copy was saved by an earlier update. Generated from ANALYSES_ENDPOINTS in HEPData's config.py with 'openmapp-analyses sources -o FILE'.",
|
|
3
|
+
"origin": "https://raw.githubusercontent.com/HEPData/hepdata/refs/heads/main/hepdata/config.py",
|
|
4
|
+
"retrieved": "2026-11-06",
|
|
5
|
+
"tools": {
|
|
6
|
+
"rivet": {
|
|
7
|
+
"url": "https://heprivet.org/analyses.json"
|
|
8
|
+
},
|
|
9
|
+
"MadAnalysis": {
|
|
10
|
+
"url": "https://raw.githubusercontent.com/MadAnalysis/HEPData-link/refs/heads/main/analyses.json"
|
|
11
|
+
},
|
|
12
|
+
"SModelS": {
|
|
13
|
+
"url": "https://smodels.github.io/docs/smodels-analyses.hepdata.json"
|
|
14
|
+
},
|
|
15
|
+
"CheckMATE": {
|
|
16
|
+
"url": "https://raw.githubusercontent.com/CheckMATE2/checkmate2/refs/heads/master/data/analyses.json"
|
|
17
|
+
},
|
|
18
|
+
"HackAnalysis": {
|
|
19
|
+
"url": "https://goodsell.pages.in2p3.fr/hackanalysis/json/HackAnalysis_HEPData.json",
|
|
20
|
+
"url_template": "{0}"
|
|
21
|
+
},
|
|
22
|
+
"Combine": {
|
|
23
|
+
"url": "https://cms-public-likelihoods-list.web.cern.ch/artifacts/output.json",
|
|
24
|
+
"url_template": "https://doi.org/{0}"
|
|
25
|
+
},
|
|
26
|
+
"GAMBIT": {
|
|
27
|
+
"url": "https://gambitbsm.org/analyses.json"
|
|
28
|
+
},
|
|
29
|
+
"SimpleAnalysis": {
|
|
30
|
+
"url": "https://simpleanalysis.docs.cern.ch/analyses.json"
|
|
31
|
+
},
|
|
32
|
+
"ADL": {
|
|
33
|
+
"url": "https://raw.githubusercontent.com/ADL4HEP/ADL4Reinterpretation/main/analyses.json"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Where the combined database is saved on the user's computer, so searches work
|
|
3
|
+
without internet.
|
|
4
|
+
|
|
5
|
+
Default location:
|
|
6
|
+
Linux: ~/.local/share/openmapp-analyses/analyses.json
|
|
7
|
+
macOS: ~/Library/Application Support/openmapp-analyses/analyses.json
|
|
8
|
+
Windows: %LOCALAPPDATA%\\openmapp-analyses\\analyses.json
|
|
9
|
+
Override with the environment variable OPENMAPP_ANALYSES_DATA (a folder).
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
import json
|
|
13
|
+
import os
|
|
14
|
+
import sys
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
|
|
17
|
+
APP_NAME = "openmapp-analyses"
|
|
18
|
+
FILE_NAME = "analyses.json"
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class NoDatabaseError(Exception):
|
|
22
|
+
"""Raised when no database has been downloaded yet."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def data_dir():
|
|
26
|
+
if os.environ.get("OPENMAPP_ANALYSES_DATA"):
|
|
27
|
+
return Path(os.environ["OPENMAPP_ANALYSES_DATA"]).expanduser()
|
|
28
|
+
if sys.platform.startswith("win"):
|
|
29
|
+
base = Path(os.environ.get("LOCALAPPDATA", Path.home() / "AppData" / "Local"))
|
|
30
|
+
elif sys.platform == "darwin":
|
|
31
|
+
base = Path.home() / "Library" / "Application Support"
|
|
32
|
+
else:
|
|
33
|
+
base = Path(os.environ.get("XDG_DATA_HOME", Path.home() / ".local" / "share"))
|
|
34
|
+
return base / APP_NAME
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def data_file():
|
|
38
|
+
return data_dir() / FILE_NAME
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def save(database, path=None):
|
|
42
|
+
"""Save the database (writes to a temporary file first, so a crash never leaves a half-written file)."""
|
|
43
|
+
path = Path(path) if path else data_file()
|
|
44
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
45
|
+
tmp = path.with_suffix(".tmp")
|
|
46
|
+
tmp.write_text(json.dumps(database, indent=2, ensure_ascii=False) + "\n", encoding="utf-8")
|
|
47
|
+
tmp.replace(path)
|
|
48
|
+
return path
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def load(path=None):
|
|
52
|
+
"""Load the saved database."""
|
|
53
|
+
path = Path(path) if path else data_file()
|
|
54
|
+
if not path.exists():
|
|
55
|
+
raise NoDatabaseError(
|
|
56
|
+
f"No database found at {path}.\n"
|
|
57
|
+
f"Run 'openmapp-analyses update' first (needs internet once)."
|
|
58
|
+
)
|
|
59
|
+
return json.loads(path.read_text(encoding="utf-8"))
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: openmapp-analyses
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Which reinterpretation and analysis-preservation tools implement which experimental analyses, and which analyses have a published statistical model; search them offline
|
|
5
|
+
Author: Arpita Mondal
|
|
6
|
+
Project-URL: Web page, https://openmapp.gitlab.io/analysis-summary/
|
|
7
|
+
Project-URL: OpenMAPP, https://openmapp.gitlab.io
|
|
8
|
+
Keywords: HEP,LHC,reinterpretation,recasting,HEPData,OpenMAPP
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
Requires-Dist: jsonschema>=4.18
|
|
15
|
+
Provides-Extra: test
|
|
16
|
+
Requires-Dist: pytest; extra == "test"
|
|
17
|
+
|
|
18
|
+
# openmapp-analyses
|
|
19
|
+
|
|
20
|
+
A command-line tool to find which reinterpretation and analysis-preservation tools (Rivet,
|
|
21
|
+
MadAnalysis 5, SModelS, CheckMATE, HackAnalysis, GAMBIT, SimpleAnalysis, ADL) implement which
|
|
22
|
+
experimental analyses, and which analyses have a published statistical model (Combine,
|
|
23
|
+
HistFactory, HS3). It combines the analysis lists into one database, matched by INSPIRE ID, saves
|
|
24
|
+
it on your computer and lets you search it offline.
|
|
25
|
+
|
|
26
|
+
The same information can be browsed on the web page:
|
|
27
|
+
**https://openmapp.gitlab.io/analysis-summary/**
|
|
28
|
+
|
|
29
|
+
Developed by Arpita Mondal within [OpenMAPP](https://openmapp.gitlab.io).
|
|
30
|
+
|
|
31
|
+
## Requirements
|
|
32
|
+
|
|
33
|
+
- Python 3.8 or newer
|
|
34
|
+
- internet access for `openmapp-analyses update`; everything else works offline
|
|
35
|
+
|
|
36
|
+
## Installation
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
python3 -m venv venv
|
|
40
|
+
source venv/bin/activate
|
|
41
|
+
pip install openmapp-analyses
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Check the installation with `openmapp-analyses --version`.
|
|
45
|
+
|
|
46
|
+
## Usage
|
|
47
|
+
|
|
48
|
+
### Get the data
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
openmapp-analyses update # download and combine all lists (needs internet, a few minutes the first time)
|
|
52
|
+
openmapp-analyses tools # the tools and statistical models, and how many analyses each covers
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Run `update` again whenever you want the latest lists; later updates are faster.
|
|
56
|
+
|
|
57
|
+
### Search
|
|
58
|
+
|
|
59
|
+
All conditions given together must match. Names are flexible: `smodels`, `SModelS` and
|
|
60
|
+
`"MadAnalysis 5"` all work.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
openmapp-analyses search --tool smodels # implemented in SModelS
|
|
64
|
+
openmapp-analyses search --tool smodels --tool checkmate # in both
|
|
65
|
+
openmapp-analyses search --any-tool smodels --any-tool checkmate # in at least one
|
|
66
|
+
openmapp-analyses search --tool smodels --not-tool checkmate # in SModelS but not CheckMATE
|
|
67
|
+
openmapp-analyses search --tool smodels --tool histfactory # in SModelS, with a HistFactory likelihood
|
|
68
|
+
openmapp-analyses search --tool smodels --other # how many of them each tool has
|
|
69
|
+
|
|
70
|
+
openmapp-analyses search --analysis-id ATLAS-SUSY-2018-31 # by analysis ID
|
|
71
|
+
openmapp-analyses search --arxiv 2102.10874 # by arXiv number
|
|
72
|
+
openmapp-analyses search --inspire-id 1847779 --links # by INSPIRE ID, with links
|
|
73
|
+
|
|
74
|
+
openmapp-analyses search --where collaborations=CMS --where year=2021
|
|
75
|
+
openmapp-analyses search --where "title~dark matter" # ~ means "contains"
|
|
76
|
+
openmapp-analyses search --tool smodels --json > smodels.json # save the results as JSON
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
| Option | Meaning |
|
|
80
|
+
|---|---|
|
|
81
|
+
| `--tool T` | in T (repeat: in all of them) |
|
|
82
|
+
| `--any-tool T` | in at least one of these (repeat) |
|
|
83
|
+
| `--not-tool T` | not in T |
|
|
84
|
+
| `--analysis-id ID` | this analysis ID, e.g. `ATLAS-SUSY-2018-31` |
|
|
85
|
+
| `--arxiv ID` | this arXiv number |
|
|
86
|
+
| `--inspire-id N` | this INSPIRE ID (repeatable) |
|
|
87
|
+
| `--where FIELD=VALUE` | any field in the data, e.g. `year`, `title`, `collaborations`; `~` for "contains" |
|
|
88
|
+
| `--other` | only show how many analyses, per tool |
|
|
89
|
+
| `--links` | also show the link of each implementation |
|
|
90
|
+
| `--json` | print the full results as JSON |
|
|
91
|
+
| `--limit N` | how many analyses to list (default 50, `0` = all) |
|
|
92
|
+
|
|
93
|
+
`--tool`, `--any-tool` and `--not-tool` also accept the statistical models: `combine`,
|
|
94
|
+
`histfactory`, `hs3`.
|
|
95
|
+
|
|
96
|
+
### One analysis
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
openmapp-analyses show 1847779 # which tools implement it
|
|
100
|
+
openmapp-analyses show 1847779 --details # plus names and links
|
|
101
|
+
openmapp-analyses show 1847779 --tool smodels # details for one tool
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### The list of tools
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
openmapp-analyses sources # the tools and the addresses of their lists
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Run `openmapp-analyses <command> --help` for all options.
|
|
111
|
+
|
|
112
|
+
## Where the data is saved
|
|
113
|
+
|
|
114
|
+
| System | Location |
|
|
115
|
+
|---|---|
|
|
116
|
+
| Linux | `~/.local/share/openmapp-analyses/analyses.json` |
|
|
117
|
+
| macOS | `~/Library/Application Support/openmapp-analyses/analyses.json` |
|
|
118
|
+
| Windows | `%LOCALAPPDATA%\openmapp-analyses\analyses.json` |
|
|
119
|
+
|
|
120
|
+
Use another folder with the environment variable `OPENMAPP_ANALYSES_DATA`, or another file for
|
|
121
|
+
one command with `openmapp-analyses --data FILE ...`. The file follows the JSON schema
|
|
122
|
+
`schema.json` included in the package.
|
|
123
|
+
|
|
124
|
+
## Where the data comes from
|
|
125
|
+
|
|
126
|
+
- **The list of tools:** `ANALYSES_ENDPOINTS` in HEPData's
|
|
127
|
+
[`config.py`](https://github.com/HEPData/hepdata/blob/main/hepdata/config.py); a tool added
|
|
128
|
+
there is picked up automatically. The file is only read, never run.
|
|
129
|
+
- **Each tool's analyses:** the JSON file the tool publishes.
|
|
130
|
+
- **HistFactory and HS3 likelihoods:** HEPData's search, with a link to each file.
|
|
131
|
+
- **Analysis information** (arXiv number, title, collaboration, year, report numbers, DOIs):
|
|
132
|
+
[INSPIRE](https://inspirehep.net); missing analysis IDs also from the arXiv comment.
|
|
133
|
+
|
|
134
|
+
If a source cannot be reached, the data from the previous update is kept.
|
|
135
|
+
|
|
136
|
+
## Use from Python
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
from openmapp_analyses import load, search
|
|
140
|
+
|
|
141
|
+
data = load()
|
|
142
|
+
for analysis in search(data, tools=["SModelS", "CheckMATE"]):
|
|
143
|
+
print(analysis["inspire_id"], list(analysis["tools"]))
|
|
144
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
openmapp_analyses/__init__.py,sha256=Y7oSX8sFSTAP3jBvdVexxRMQ_fV15kZ5l7R8Ffz0Hk4,549
|
|
2
|
+
openmapp_analyses/__main__.py,sha256=2N49rFS5mExUQCwSoZYqsxx4b-STdjON0QvrfgAFd0U,120
|
|
3
|
+
openmapp_analyses/arxiv.py,sha256=9jtv8rB6pvB1ZWz0092zJXYPbmJ_ty07EcLFkXQkiuA,3065
|
|
4
|
+
openmapp_analyses/cli.py,sha256=gFggrpqtD21R32jkA1AVYFOYJNyo0A8lsXTyavasOYE,19198
|
|
5
|
+
openmapp_analyses/combine.py,sha256=-PH10NqTo1ejtfsrxtoH_NxiwD8iJRyogwfRh7qOJrg,11261
|
|
6
|
+
openmapp_analyses/hepdata_models.py,sha256=9CbZ3qg9Hun99x9V0kSOM1Bc9bQQ5kaUS69dRRaAqu8,2951
|
|
7
|
+
openmapp_analyses/hepdata_sources.py,sha256=WrZwlpRkv2_Nm6U6LrdyRxb2sAkQfQhoI82DjA9imTE,7289
|
|
8
|
+
openmapp_analyses/inspire.py,sha256=TNQE5YU2Qq_RADLuPCI-7UHXzO6etOR18PtRx761Hmo,6819
|
|
9
|
+
openmapp_analyses/schema.json,sha256=7bfReoDEXb4b3PDptwDH-RnqvTpPL6hvnPI-nA_Hy3s,5261
|
|
10
|
+
openmapp_analyses/search.py,sha256=rKruPDNLaUY3Z--wrLXBjsTPXYs-Cpc70q6bsG0tr10,5170
|
|
11
|
+
openmapp_analyses/sources.json,sha256=OduFQ9z-uOm0a6GFR1vZPBOCc73qANWCvXPci_LRtKk,1416
|
|
12
|
+
openmapp_analyses/store.py,sha256=u4T180EPxg-UTsDny0l0Jfrc3BzeLVyDmr1ZRYAIShE,1905
|
|
13
|
+
openmapp_analyses-1.0.0.dist-info/METADATA,sha256=OEhXH7mnwtfvlL-JI1_DQZdz_-gCVe_R_qXyz0iGBZE,5743
|
|
14
|
+
openmapp_analyses-1.0.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
15
|
+
openmapp_analyses-1.0.0.dist-info/entry_points.txt,sha256=UJO74ZhJ7CgLf9nM1Xj59BJBIPiPyYEqHNaLWmTI4nQ,65
|
|
16
|
+
openmapp_analyses-1.0.0.dist-info/top_level.txt,sha256=KTbnSyvJJFvlZXs9c_VIkovulnXUch3bwxO6MjwVGm4,18
|
|
17
|
+
openmapp_analyses-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
openmapp_analyses
|