Addition of photons in `coffea` fails because they don't have `mass` and `charge` fields.
まだ誰も着手していません。
評価
調査の方向性
示されている NanoEventsFactory による Photon-array の追加で失敗を再現し、質量フィールドまたは電荷フィールドを持たない配列に使用されるベクトルの behavior dispatch を調査してください。この issue は、フィールドを必須にするのではなく、これらの入力を behaviors 経由で提供することを示しています。完了条件は、現在の Photon スキーマを正常に追加でき、そのスキーマを使用するテストでリグレッションがカバーされていることです。
索引モデルが issue の本文から書いたものです。
説明
Vector Version
1.4.1
Python Version
3.11
OS / Environment
macOS but doesn't matter
Describe the bug
Currently in coffea if you do
from coffea.nanoevents import NanoEventsFactory
events = NanoEventsFactory.from_root({"tests/samples/DYto2E.root": "Events"}).events()
events.Photon + events.Photon
you will get an error
ValueError: array does not have temporal coordinates (t/E/e/energy or tau/M/m/mass): seediEtaOriX, cutBased, cutBased_Fall17V2, electronVeto, isScEtaEB, isScEtaEE, mvaID_Fall17V2_WP80, mvaID_Fall17V2_WP90, mvaID_WP80, mvaID_WP90, pixelSeed, seedGain, electronIdx, jetIdx, seediPhiOriY, vidNestedWPBitmap, vidNestedWPBitmap_Fall17V2, energyErr, energyRaw, esEffSigmaRR, esEnergyOverRawE, eta, etaWidth, haloTaggerMVAVal, hoe, hoe_PUcorr, mvaID, mvaID_Fall17V2, pfChargedIsoPFPV, pfChargedIsoWorstVtx, pfPhoIso03, pfRelIso03_all_Fall17V2, pfRelIso03_all_quadratic, pfRelIso03_chg_Fall17V2, pfRelIso03_chg_quadratic, phi, phiWidth, pt, r9, s4, sieie, sieip, sipip, trkSumPtHollowConeDR03, x_calo, y_calo, z_calo, electronIdxG, jetIdxG
This error occurred while calling
numpy.add.__call__(
<PhotonArray-typetracer [...] type='## * var * Photon[seediEtaOriX:...'>
<PhotonArray-typetracer [...] type='## * var * Photon[seediEtaOriX:...'>
)
If my understanding is correct, it's looking for mass field rather than an accessor. The photons don't have mass and a charge field right now in nanoaod. They used to at some point and it was set to zero. That's why you will not get this failure if you try this with the nano_dy.root file from coffea because it's old and thats why this wasn't caught by tests I assume.
Lindsey commented that this should be solved with behaviors that supply the necessary inputs and and not keep hard-requiring fields to be present.
cc @lgray
Any additional but relevant log output
No response
- 主要言語
- Python
- スター
- 101
- フォーク
- 43
- 平均マージ
- 3時間 38分
- マージ済み PR(30日)
- 7
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
scikit-hep/vector のほかの issue
-
Numba object backend: missing to_2D/to_3D/to_4D, momentum-named conversions, and like()再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンfeature
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
scikit-hep/vector#750 ·
-
Add ability to somehow map field names to coordinate axis names that vector expects再び着手できるかも @hjaat が 82 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンfeature
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
scikit-hep/vector#732 · コメント 3 件 ·
-
feature
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
scikit-hep/vector#731 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
scikit-hep/vector#711 · コメント 1 件 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
scikit-hep/vector#654 ·
scikit-hep/vector の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
PolicyEngine/policyengine-us#10262 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
kellyjonbrazil/jc#788 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
`/search.json` ignores the documented `editions.sort` parameter対応中かも @PranavD2905 が今日担当しました。 オープンAffects: Server Good First Issue Module: Solr Needs: Triage Theme: Public APIs Theme: Search
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
internetarchive/openlibrary#13989 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug P2: misleading query
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
jeffknupp/association#478 ·