diff --git a/src/aliases.jl b/src/aliases.jl index b16a469..a480959 100644 --- a/src/aliases.jl +++ b/src/aliases.jl @@ -2,6 +2,10 @@ const ELECTRON_ALIASES = ("electron", "e-", "e") const PROTON_ALIASES = ("proton", "p+", "p", "H+") +const POSITRON_ALIASES = ("positron", "e+") +const NEUTRON_ALIASES = ("neutron", "n") +const MUON_ALIASES = ("muon", "μ", "μ-", "mu-", "mu") + """ PARTICLE_ALIASES @@ -10,10 +14,11 @@ Dictionary of common particle aliases and their corresponding (symbol, charge, m Each entry maps a string alias to a tuple of (symbol, charge, mass_number) """ PARTICLE_ALIASES = Dict( - "e+" => ("e", 1, 0), - "positron" => ("e", 1, 0), - "neutron" => :Neutron, - "n" => :Neutron, + (PROTON_ALIASES .=> Ref(("H", 1, 1)))..., + (ELECTRON_ALIASES .=> :Electron)..., + (NEUTRON_ALIASES .=> :Neutron)..., + (POSITRON_ALIASES .=> :Positron)..., + (MUON_ALIASES .=> :Muon)..., "alpha" => ("He", 2, 4), "deuteron" => ("H", 1, 2), "D+" => ("H", 1, 2), @@ -21,12 +26,8 @@ PARTICLE_ALIASES = Dict( "T" => ("H", 0, 3), "triton" => ("H", 1, 3), "T+" => ("H", 1, 3), - "mu-" => ("μ", -1, 0), - "muon" => ("μ", -1, 0), + "mu-" => :Muon, + "muon" => :Muon, "antimuon" => ("μ", 1, 0), "mu+" => ("μ", 1, 0), -) - -ELECTRON_ALIASES_DICT = Dict(str => :Electron for str in ELECTRON_ALIASES) -PROTON_ALIASES_DICT = Dict(str => ("H", 1, 1) for str in PROTON_ALIASES) -PARTICLE_ALIASES = merge(PARTICLE_ALIASES, ELECTRON_ALIASES_DICT, PROTON_ALIASES_DICT) \ No newline at end of file +) \ No newline at end of file