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?
|
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
Originally posted by @felixhekhorn in #232 (comment)
yadism/src/yadism/coefficient_functions/coupling_constants.py
Lines 346 to 354 in 99d3534
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:yadism/src/yadism/coefficient_functions/kernels.py
Line 142 in 99d3534
a relevant function may be
is_left_handed_lepton