Add ability to somehow map field names to coordinate axis names that vector expects

Aperta
#732 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@hjaat ci sta già lavorando.

Dal 26/7/2026.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
data

Direzione di ricerca

Inizia esaminando come vector interpreta attualmente i nomi dei campi delle coordinate e come gli schemi coffea assegnano alias ai branch ROOT come Pt, Eta, Phi e Mass. Definisci il comportamento atteso della mappatura e il suo ambito; il lavoro è completato quando gli array che usano nomi di campo alternativi possono fornire lo stesso comportamento delle coordinate senza richiedere tali alias.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature
Describe the potential feature

Vector expects coordinates to have very strict names. For example to have an array with a Momentum4D behavior, the fields can be named pt, eta, phi, and mass but if pt is named "pT" for example, it's broken.
We want to have the ability to add a mapping between the fields present in the array and the coordinates that vector actually needs

Motivation

Often arrays are created directly from root files for example in coffea's schemas. And the root files may call things Pt, Eta, Phi, and Mass for example. What we now do in coffea is inside the schema to alias these branches to pt, eta, phi, and mass that vector expects. It's not a full copy as the memory is shared but it's annoting that the resulting array now has Pt and pt because vector cannot work with the former. A way to tell vector what the mapping is from field names to the names it expects would be cool.

Possible Implementation

No response

Lingua principale
Python
Stelle
102
Fork
47
Merge medio
7g 3h
PR unite (30g)
2

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di scikit-hep/vector

Tutte le issue di scikit-hep/vector

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.