[esssans] Better interface for defining wavelength bins and bands

Aperta
#779 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Start by reading the existing WavelengthBins and WavelengthBands definitions and the sc.linspace usage described in the issue. The issue presents several competing interface ideas but does not identify files or tests; clarify the intended design with maintainers before starting. Done means an agreed interface for defining wavelength bins and bands, with behavior that matches that decision.

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

Descrizione

esssans

Currently, we were defining the bands as a 1d variable with N+1 edges, where N is the number of bands that we want to have: sc.linspace("wavelength", 1.0, 13.0, 11, unit="angstrom").

It's a bit of a weird interface as the dimension name is wavelength, but it results in data that has a dimension band of size N.

Claude suggested that WavelengthBands should just be tuples of indices that index into the WavelengthBins. I'm not sure I like that so much...

I myself thought that maybe if we wish to have bands, we could give WavelengthBins as a DataGroup instead that contains bands. Then we combine all the entries in the group to construct a single set of wavelength bins. The bands would be each entry in the group.

But as you say, this could be a follow-up.

Originally posted by @nvaytet in https://github.com/scipp/ess/pull/726#discussion_r4183870136

Lingua principale
Python
Stelle
3
Fork
6
Merge medio
2g 13h
PR unite (30g)
35

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 scipp/ess

Tutte le issue di scipp/ess

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.