solprop.translate.plasma_integration#
The plasma column’s running-integral rule, designed once per grid (SEP 18).
The field-grid plasma source integrates the exposure and free current along t. The
plain cumulative trapezoid integrates exp(i omega t) with the multiplier
rho(theta) = (theta/2) cot(theta/2) times the exact -i/omega
(trapezoid_multiplier()), which on the default grid leaves the top of the active
band 11 % short per integral. The band rule filters each integrand with symmetric taps
before the trapezoid, so that the composite multiplier is one to within
DESIGN_TOLERANCE over the band. design_running_integral() designs a grid’s
rule – a constrained least-squares fit and a certified extremum search, hand-rolled
numerics that live here so the physics layer only carries the result
(solprop.nonlinear.ionisation.RunningIntegral) – and
integration_record() is the record a saved run carries.
The rules, the certified ladder and the evidence are in SEP 18, section 4.3; the manual
page is docs/guide/media/field-plasma.md.
Module Attributes
The bound on |
|
The largest |
|
The bound on |
|
Uniform least-squares nodes on |
|
Independent samples of the certified maxima, refined by a bounded scalar search. |
|
Absolute tolerance in |
|
The largest scaled condition number of an admitted fit; no admitted grid nears it. |
Functions
|
Return the running-integral rule a plasma column on grid uses. |
|
Return the record of a running-integral rule a saved run carries (SEP 18, Q9). |
|
Return the trapezoid's multiplier relative to the exact integral. |
- solprop.translate.plasma_integration.ABOVE_BAND_BOUND: Final = 1.05#
The bound on
|H|from the band edge to Nyquist: at most 5 % amplification of content above the band relative to the exact integral.
- solprop.translate.plasma_integration.CERTIFICATION_SAMPLES: Final = 8193#
Independent samples of the certified maxima, refined by a bounded scalar search.
- solprop.translate.plasma_integration.CERTIFICATION_XATOL: Final = 1e-12#
Absolute tolerance in
thetaof the refinement of each sampled local maximum.
- solprop.translate.plasma_integration.CONDITION_LIMIT: Final = 10000000000.0#
The largest scaled condition number of an admitted fit; no admitted grid nears it.
- solprop.translate.plasma_integration.DESIGN_TOLERANCE: Final = 1e-05#
The bound on
|H - 1|in band; the smallest K meeting it is chosen.
- solprop.translate.plasma_integration.FIT_NODES: Final = 4097#
Uniform least-squares nodes on
[0, theta_b], zero included, unit weights.
- solprop.translate.plasma_integration.MAX_HALF_WIDTH: Final = 8#
The largest
Ktried; a grid no design up to it can serve is refused.
- solprop.translate.plasma_integration.design_running_integral(grid, policy)[source]#
Return the running-integral rule a plasma column on grid uses.
The only producer of a band rule. Its taps depend on the fine sample spacing and the upper edge of the apodised window alone, so the design is cached on those two numbers and every problem on one grid shares one rule.
- Parameters:
- gridsolprop.grid.TimeGrid
The field grid; its
dt_fineandomega_max_windowsettheta_b.- policy{‘band’, ‘trapezoid’}
The rule requested by the plasma responses.
- Returns:
- RunningIntegral
The trapezoid, or the certified band design with the smallest
K.
- Raises:
- TranslationError
If no design up to
MAX_HALF_WIDTHmeetsDESIGN_TOLERANCEandABOVE_BAND_BOUND, which happens below an oversampling factor of about 3.55; the message names the achieved error and the two ways out.
Examples
>>> from solprop.grid import FieldGrid >>> from solprop.translate.plasma_integration import design_running_integral >>> grid = FieldGrid.from_limits(1.0, 800e-9, (90e-9, 4e-6), 400e-15) >>> rule = design_running_integral(grid, "band") >>> rule.half_width, rule.certified_error < 1e-5 (4, True)
- solprop.translate.plasma_integration.integration_record(rule)[source]#
Return the record of a running-integral rule a saved run carries (SEP 18, Q9).
Every field of the rule at full precision – the taps as Python floats, which survive the JSON round trip bit for bit – with the derived
theta_bandK, so that a saved file says how its plasma was integrated without being translated again, and a resume that would integrate differently is refused by the configuration hash.- Parameters:
- rulesolprop.nonlinear.ionisation.RunningIntegral
The problem’s rule.
- Returns:
- dict
The record, plain Python values only.
Examples
>>> from solprop.nonlinear.ionisation import RunningIntegral >>> from solprop.translate.plasma_integration import integration_record >>> integration_record(RunningIntegral.trapezoid())["policy"] 'trapezoid'
- solprop.translate.plasma_integration.trapezoid_multiplier(theta)[source]#
Return the trapezoid’s multiplier relative to the exact integral.
(theta/2) cot(theta/2), with its series1 - theta^2/12 - theta^4/720below1e-4, where the closed form loses digits.- Parameters:
- thetanumpy.ndarray
omega dt, in[0, pi].
- Returns:
- numpy.ndarray
The multiplier, the shape of theta; one at zero and zero at Nyquist.
Examples
>>> import numpy as np >>> from solprop.translate.plasma_integration import trapezoid_multiplier >>> f"{trapezoid_multiplier(np.array(np.pi / 3)):.6f}" '0.906900'