# \[ANN\] Corpuscles.jl - Particle properties and encodings via PDG tables

**URL:** <https://discourse.julialang.org/t/ann-corpuscles-jl-particle-properties-and-encodings-via-pdg-tables/32023>\
**Category:** Package Announcements\
**Tags:** package, announcement, physics\
**Created:** [December 8, 2019, 6:09pm UTC](https://discourse.julialang.org/t/ann-corpuscles-jl-particle-properties-and-encodings-via-pdg-tables/32023 "2019-12-08T18:09:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [December 8, 2019, 6:09pm UTC](https://discourse.julialang.org/t/ann-corpuscles-jl-particle-properties-and-encodings-via-pdg-tables/32023/1 "2019-12-08T18:09:43Z")

</div>

I’d like to announce a tiny package which was created by Johannes Schumann and myself to deal with [PDG](http://pdg.lbl.gov) particle data and different particle encodings in physics software.  
The package converts Pythia and Geant3 codes to PDG codes and provides access to particle properties like mass, spin, charge, quark composition etc. and also LaTeX codes.

GitHub repository: [GitHub - JuliaPhysics/Corpuscles.jl: Julia package for particle physics](https://github.com/KM3NeT/Corpuscles.jl)  
Docs: [https://km3net.github.io/Corpuscles.jl/dev](https://km3net.github.io/Corpuscles.jl/dev)

We hope some of you find it useful, at least as a reference 😉

```plaintext
pkg> add Corpuscles

julia> using Corpuscles

julia> p = Particle(12)
Particle(12) 'nu(e)'

julia> Particle(Geant3ID(5))
Particle(-13) 'mu'

julia> particles()
536-element Array{Particle,1}:
 Particle(-21114) 'Delta(1920)'
 Particle(12) 'nu(e)'
 Particle(-11) 'e'
 ⋮
 Particle(43122) 'Lambda(1800)'
 Particle(-4332) 'Omega(c)'
 Particle(2126) 'Delta(1905)'

julia> p = Particle(221)
Particle(221) 'eta'

julia> p.mass
547.862 MeV ± 0.017 MeV

```

We decided to use [Unitful.jl](https://github.com/PainterQubits/Unitful.jl) for the quantities `mass` and `width` in `struct` which also has the `lower_limit` and `upper_limit`.

![Corpuscles.jl](https://global.discourse-cdn.com/julialang/original/3X/3/5/35a5f7ec3c69f699a203ee28e782aad7d9ef9938.png)

---

<div class="post-metadata">

**Author:** ![jstrube](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jstrube/32/525_2.png) [@jstrube](https://discourse.julialang.org/u/jstrube)\
**Post date:** [December 9, 2019, 4:02am UTC](https://discourse.julialang.org/t/ann-corpuscles-jl-particle-properties-and-encodings-via-pdg-tables/32023/2 "2019-12-09T04:02:37Z")

</div>

Looks useful, but how did you come up with that name?  
That’s not near the top of the list of names I would search for…  
Is ParticleProperties too boring?

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [December 9, 2019, 7:17am UTC](https://discourse.julialang.org/t/ann-corpuscles-jl-particle-properties-and-encodings-via-pdg-tables/32023/3 "2019-12-09T07:17:09Z")

</div>

Well, 1) it’s kind of short and 2) has a bit of physics history [Corpuscularianism - Wikipedia](https://en.wikipedia.org/wiki/Corpuscularianism) 3) Particles was the first choice but was already taken by a non-registered package, but we didn’t want to steal the name.

I think most people who need it would search for PDG or Geant, so I guess that should be fine thanks to the full text search 😉

---

<div class="post-metadata">

**Author:** ![jstrube](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jstrube/32/525_2.png) [@jstrube](https://discourse.julialang.org/u/jstrube)\
**Post date:** [December 9, 2019, 5:50pm UTC](https://discourse.julialang.org/t/ann-corpuscles-jl-particle-properties-and-encodings-via-pdg-tables/32023/4 "2019-12-09T17:50:22Z")

</div>

Interesting, thanks for the wiki link. Have a degree in particle physics, but didn’t know about corpuscularianism…  
I hope I get an excuse to use your package soon. Waiting for a project to get approved…
