capabilities.output states sqrt(W) and modal units for a spatial file's quantities

Aperta
#425 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à
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
api

Direzione di ricerca

Start in src/solprop/capabilities.py, in _quantities, where the spatial file's field is given the unit sqrt(W) and power, energy and spectral_density get their coordinate units. Check which route (radial, Cartesian, line, planar) the file was written by and what unit each reader returns for it, then fix only the spatial branch. Tests belong in tests/test_capabilities.py; done when radial, Cartesian and planar runs on numpy_ref report the returned unit or refuse, with modal statements unchanged.

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

Descrizione

area: free space area: output bug priority: low
What happens

solprop.capabilities.output gives a spatial file the same quantity units as a modal one, from _quantities. Its field is Quantity("coordinate", "sqrt(W)"), and power, energy and spectral_density are coordinate quantities in W, J and J s/rad. But the stored columns of a radial run are in V m, of a Cartesian or line run in V/m, and of a planar run slab amplitudes. Ran on numpy_ref (radial, 16 points, branch of #424):

spatial {'power': Quantity(kind='coordinate', unit='W'), 'energy': Quantity(kind='coordinate', unit='J'),
         'spectral_density': Quantity(kind='coordinate', unit='J s/rad'), 'field': Quantity(kind='coordinate', unit='sqrt(W)')}
Why it matters

A front end that labels an axis from this statement labels a spatial field in sqrt(W). Once #424 lands, the power, energy and density readers refuse a spatial file, so those three entries describe readers that no longer answer.

Context
  • #147 and #406, fixed by #424: the readers that read a column as a mode refuse a spatial file by name.
  • The statement is SEP 41's S16 (docs/dev/seps/archive/sep-0041-recipes-and-front-ends.md) and is documented in docs/guide/results/output.md ("What a file can give").
  • Checked against commit 5814162.
To do
  • Give a spatial file's field its stored unit per route (V m radial, V/m Cartesian and line, the slab amplitude's unit on the planar route).
  • Decide what power, energy and spectral_density say on a spatial file: the spatial functionals' physical quantities, or a statement that the modal readers refuse it.
  • Update the manual paragraph and tests/test_capabilities.py.

Must not change: the statement for modal and general modal files.

Done when

capabilities.output of a radial, a Cartesian and a planar run on numpy_ref gives each quantity the unit of what a reader returns for it, or marks it refused, and the modal statements are unchanged.

Lingua principale
Python
Stelle
3
Fork
3
Merge medio
6h 51m
PR unite (30g)
136

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 LupoLab/solprop

Tutte le issue di LupoLab/solprop

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.