-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersphysicsphysics featuresphysics features
Description
this isn't always true, right? Compass at least is muon scattering ... yadism and the whole of NNPDF is actually completely lepton-blind, so maybe it is not important, but I believe you can just do an simple `if` similar to the one above
obs["ProjectileDIS"] = "muon" if "_mup_" in str(src_path.stem) or blub or bla else "electron"
Originally posted by @felixhekhorn in #232 (comment)
but will yadism work then?
yadism/src/yadism/coefficient_functions/coupling_constants.py
Lines 346 to 354 in 99d3534
proj = observables.get("ProjectileDIS", "electron") | |
projectile_pids = { | |
"electron": 11, | |
"positron": -11, | |
"neutrino": 12, | |
"antineutrino": -12, | |
} | |
if proj not in projectile_pids: | |
raise ValueError(f"Unknown projectile {proj}") |
Originally posted by @giacomomagni in #232 (comment)
the answer to the last question is: it won't - let's fix that;
note that "electron"
there gets translated to 11 and then later there are a few more of those in the code e.g. here:
if projectile_pid in [-11, 12]: |
a relevant function may be is_left_handed_lepton
alecandido
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomersphysicsphysics featuresphysics features