thesis
This commit is contained in:
parent
d6e6879a21
commit
c4c839bf25
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
246
notebooks/thesis_electrons.ipynb
Normal file
246
notebooks/thesis_electrons.ipynb
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
BIN
notebooks/utils/__pycache__/components.cpython-310.pyc
Normal file
BIN
notebooks/utils/__pycache__/components.cpython-310.pyc
Normal file
Binary file not shown.
48
notebooks/utils/components.py
Normal file
48
notebooks/utils/components.py
Normal file
@ -0,0 +1,48 @@
|
||||
# flake8: noqaq
|
||||
import inspect
|
||||
import re
|
||||
import importlib
|
||||
import warnings
|
||||
from collections import OrderedDict
|
||||
from functools import lru_cache
|
||||
from html import escape as html_escape
|
||||
|
||||
# String that separates a name from its unique ID
|
||||
_UNIQUE_SEPARATOR = "_"
|
||||
_IDENTITY_LENGTH = 8
|
||||
_IDENTITY_TABLE = {}
|
||||
|
||||
# If a property ends with this key, it is a pseudo-property which exists to
|
||||
# hold the data dependencies of another property value
|
||||
_DATA_DEPENDENCY_KEY_SUFFIX = "_PyConfDataDependencies"
|
||||
|
||||
_FLOW_GRAPH_NODE_COLOUR = "aliceblue"
|
||||
_FLOW_GRAPH_INPUT_COLOUR = "deepskyblue1"
|
||||
_FLOW_GRAPH_OUTPUT_COLOUR = "coral1"
|
||||
|
||||
|
||||
def unique_name_ext_re():
|
||||
return "(?:%s[1234567890abcdef]{%s})?" % (_UNIQUE_SEPARATOR, _IDENTITY_LENGTH)
|
||||
|
||||
|
||||
def findRootObjByName(rootFile, name):
|
||||
"""
|
||||
Finds the object with given name in the given root file,
|
||||
where name is a regular expression or a set of them separated by '/' in case directories are used
|
||||
"""
|
||||
curObj = rootFile
|
||||
for n in name.split("/"):
|
||||
matches = [
|
||||
k.GetName() for k in curObj.GetListOfKeys() if re.fullmatch(n, k.GetName())
|
||||
]
|
||||
if len(matches) > 1:
|
||||
raise Exception(
|
||||
"Collision of names in Root : found several objects with name matching %s inside %s : %s"
|
||||
% (n, curObj.GetName(), matches)
|
||||
)
|
||||
if len(matches) == 0:
|
||||
raise Exception(
|
||||
"Failed to find object with name %s inside %s" % (n, curObj.GetName())
|
||||
)
|
||||
curObj = curObj.Get(matches[0])
|
||||
return curObj
|
BIN
thesis/emitted_energy.pdf
Normal file
BIN
thesis/emitted_energy.pdf
Normal file
Binary file not shown.
BIN
thesis/emitted_energy_difference.pdf
Normal file
BIN
thesis/emitted_energy_difference.pdf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user