mpylab.tools.PControler moduleΒΆ
Compatibility wrapper for the legacy power-leveling demonstrator.
The exported Leveler API is not compatible with the callback-based
controllers in mpylab.tools.level_control. New code should import one
of those Control* classes directly. This module only preserves historical
imports of the old demonstrator.
- class mpylab.tools.PControler.Leveler(sg, amp, pin=None)
Bases:
objectIterative level controller using sampled inverse interpolation.
- add_samples(pin)
Measure and store output samples for one or more input levels.
- adjust_level(soll, maxiter=10, relerr=0.01)
Iteratively adjust input level to reach target output level.
- update_interpol()
Rebuild forward and inverse interpolators from current samples.
- class mpylab.tools.PControler.Rapp(g, Ps, S, PinMax=0.001, noise_loc=1.0, noise_sc=0.5)
Bases:
objectSimple Rapp-like amplifier model with additive random noise.
- Pout(Pin)
Return noisy output power for a given input power.
- class mpylab.tools.PControler.SG
Bases:
objectMinimal signal-generator stub exposing a level setter.
- SetLevel(lv)
Set generator level (console stub implementation).
- mpylab.tools.PControler.extrap1d(interpolator)
Wrap a 1D interpolator with bounded linear extrapolation at both ends.