You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
E.g. in DataProcParams (fields specified in data_proc_params.json and interpreted by evaluateExpr) and Events (applyCut method) classes could benefit from more generic and safe evaluation of the contents.
Note that it will probably be necessary to more fully encapsulate what is an HDF5 path vs. what is not to allow for more complicated mathematical expressions (and to guarantee that ambiguous things like / or Python keywords are interpreted correctly as not being part of an HDF5 path).
more expressive (can do looping, almost everything you can specify in Python itself)
in order to specify arbitrary things, a fully valid Python syntax must be passed (so including line breaks and indentation for subsequent lines), which is awkward to specify in a JSON or CFG file.
supports numpy if numpy is installed (though whether e.g. sqrt is from math or from numpy isn't clear to me yet)
E.g. in
DataProcParams
(fields specified indata_proc_params.json
and interpreted byevaluateExpr
) andEvents
(applyCut
method) classes could benefit from more generic and safe evaluation of the contents.Note that it will probably be necessary to more fully encapsulate what is an HDF5 path vs. what is not to allow for more complicated mathematical expressions (and to guarantee that ambiguous things like
/
or Python keywords are interpreted correctly as not being part of an HDF5 path).Numexpr: https://github.com/pydata/numexpr
ASTEVAL: http://newville.github.io/asteval/index.html
sqrt
is frommath
or fromnumpy
isn't clear to me yet)ast.literal_eval: https://docs.python.org/2.7/library/ast.html#ast.literal_eval
The text was updated successfully, but these errors were encountered: