Vector is a Python library for 2D, 3D, and Lorentz vectors, especially arrays of vectors, to solve common physics problems in a NumPy-like way.
Main features of Vector:
- Pure Python with NumPy as its only dependency. This makes it easier to install.
- Vectors may be represented in a variety of coordinate systems: Cartesian, cylindrical, spherical, and any combination of these with time or proper time for Lorentz vectors. In all, there are 12 coordinate systems: {x-y vs ρ-φ in the azimuthal plane} × {z vs θ vs η longitudinally} × {t vs τ temporally}.
- Uses names and conventions set by ROOT’s TLorentzVector and Math::LorentzVector, as well as scikit-hep/math, uproot-methods TLorentzVector, henryiii/hepvector, and coffea.nanoevents.methods.vector.
- Implemented on a variety of backends:
- pure Python objects
- NumPy arrays of vectors (as a structured array subclass)
- Awkward Arrays of vectors
- potential for more: CuPy, TensorFlow, Torch, JAX…
- NumPy/Awkward backends also implemented in Numba for JIT-compiled calculations on vectors.
- Distinction between geometrical vectors, which have a minimum of attribute and method names, and vectors representing momentum, which have synonyms like
pt
=rho
,energy
=t
,mass
=tau
.
Team
Presentations
- 21 Oct 2024 - "A new SymPy backend for vector: uniting experimental and theoretical physicists", Saransh Chopra, CHEP 2024
- 18 Jul 2024 - "Columnar analysis and Awkward", Jim Pivarski, US ATLAS / IRIS-HEP Analysis Software Training Event 2024
- 3 Jul 2024 - "A new SymPy backend for vector: uniting experimental and theoretical physicists", Saransh Chopra, PyHEP 2024 (virtual) Workshop
- 20 Jun 2024 - "Columnar analysis and Awkward", Jim Pivarski, USCMS/IRIS-HEP Analysis Software Training
- 22 May 2024 - "Scientific Python", Jim Pivarski, HSF-India HEP Software Workshop at the University of Delhi
- 11 Mar 2024 - "Awkward Family (poster)", Jim Pivarski, ACAT 2024
- 9 Oct 2023 - "What's new with Vector? First major release is out!", Saransh Chopra, PyHEP 2023 (virtual) Workshop
- 27 Oct 2022 - "Compiling Awkward Lorentz Vectors with Numba", Saransh Chopra, 21st International Workshop on Advanced Computing and Analysis Techniques in Physics Research
- 5 Oct 2022 - "Vector - Constructors, documentation, and benchmarks", Saransh Chopra, IRIS-HEP Fellowship Final Presentations
- 13 Sep 2022 - "Constructing HEP vectors and analyzing HEP data using Vector", Saransh Chopra, PyHEP 2022 (virtual) Workshop
- 20 Jul 2022 - "Analysis Grand Challenge / HEP Scientific Python Ecosystem", Mason Proffitt, DANCE/CoDaS@Snowmass 2022 computational and data science software training
- 15 Jun 2022 - "Vector - Constructors, documentation, and benchmarks", Saransh Chopra, IRIS-HEP Fellows Lightning Talks
- 25 Apr 2022 - "Foundation libraries (uproot, awkward, hist, mplhep)", Mason Proffitt, IRIS-HEP AGC Tools 2022 Workshop
- 3 Nov 2021 - "Data handling: uproot, awkward & vector" , Mason Proffitt, IRIS-HEP AGC Tools 2021 Workshop
Publications
- How the Scientific Python ecosystem helps answer fundamental questions of the Universe, Matthew Feickert, Nikolai Hartmann, Lukas Heinrich, Alexander Held, Vangelis Kourlitis, Nils Krumnack, Giordon Stark, Matthias Vigl, Gordon Watts, SciPy 2024 (10 Jul 2024).