StepIndexMode.aeff warns for modes of high radial order: its adaptive transverse integral runs out of subdivisions

Aperta
#438 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
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

The failing integrals live in StepIndexMode's normalisation and aeff() code, which calls scipy.integrate.quad with limit=200 and a split at the core radius. Run the reproduction snippet to see the IntegrationWarning, then find where the transverse integral is set up. Done when aeff() and normalisation return without warning for the listed modes, checked against an independent high-order integral.

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

Descrizione

area: waveguides bug priority: low
What happens

Once StepIndexMode builds fibres of large V (#148, PR #432), modes of high radial order can be constructed. Their normalisation and effective area integrate the transverse field with scipy.integrate.quad (limit=200, split at the core). A mode with many radial oscillations in the core exceeds that limit, and quad raises an IntegrationWarning, which is an error under the test suite's filter:

V mode w aeff()
200 EH40,1 / EH40,22 / EH40,42 194 / 156 / 63 resolved
1000 HE60,1, EH60,1 998 resolved
1000 HE60,145, EH60,144 839 IntegrationWarning: maximum number of subdivisions (200)
1000 HE60,287, EH60,286 139 same
4990 HE300,1, EH300,1 4980 resolved
4990 HE300,721 / HE300,1439 4190 / 329 same warning

(numerical aperture about 0.21 over 1.45, profile_wavelength 1030 nm; Apple M5 Max, 2026-11-02, at the PR #432 head.) neff, dneff_domega and the unnormalised fields are finite and correct for these modes; only the transverse integrals fail.

Reproduction
import math
from solprop.modes import StepIndexMode

core, cladding, v = 1.45 / math.sqrt(0.99), 1.45, 1000.0
radius = v * 1030e-9 / (2 * math.pi * math.sqrt(core**2 - cladding**2))
StepIndexMode(radius, core=core, cladding=cladding, kind="HE", n=60, m=145,
              profile_wavelength=1030e-9).aeff()
What could be done

Split the core integral at the zeros of the radial field (the zeros of J_(n-1) and J_(n+1), or of the integrand), or use a fixed Gauss rule with nodes per oscillation, as the vector provider's panel rule does. Until then the limit could be stated in the guide's large-V paragraph, which notes it.

Done when

aeff() and the normalisation of every buildable mode up to the scan's V limit return without warning, checked against an independent integral at a high radial order.

Lingua principale
Python
Stelle
3
Fork
3
Merge medio
4h 42m
PR unite (30g)
91

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.