temfield_mpylab.measurement_worker¶
- class temfield_mpylab.measurement_worker.AMWaveformLimits(maximum_peak_compression_db: float = 1.0, minimum_modulation_depth_percent: float = 75.0, maximum_modulation_depth_percent: float = 85.0, minimum_modulation_frequency_khz: float = 0.95, maximum_modulation_frequency_khz: float = 1.05, minimum_r_squared: float = 0.995, maximum_normalized_rmse: float = 0.03, carrier_relative_tolerance: float = 0.02, maximum_peak_relative_tolerance: float = 0.02, maximum_stability_relative_spread: float = 0.02, required_stable_waveforms: int = 3)[source]¶
Bases:
objectEngineering limits for TEMField’s in-loop AM validation.
The 2 dB difference between the ideal 5.1 dB AM peak ratio and the historical 3.1 dB saturation boundary motivates an outer compression limit. TEMField uses the more conservative 1 dB default because the EUT is already present during this validation.
- __init__(maximum_peak_compression_db: float = 1.0, minimum_modulation_depth_percent: float = 75.0, maximum_modulation_depth_percent: float = 85.0, minimum_modulation_frequency_khz: float = 0.95, maximum_modulation_frequency_khz: float = 1.05, minimum_r_squared: float = 0.995, maximum_normalized_rmse: float = 0.03, carrier_relative_tolerance: float = 0.02, maximum_peak_relative_tolerance: float = 0.02, maximum_stability_relative_spread: float = 0.02, required_stable_waveforms: int = 3) None¶
- class temfield_mpylab.measurement_worker.InLoopAMValidationResult(status: str, passed: bool, reason: str, factor: float, target_field_v_per_m: float, start_field_v_per_m: float, limits: AMWaveformLimits, ramp_points: tuple, stable_waveforms: tuple, carrier_correction_attempts: int = 0, carrier_correction_waveforms: tuple = (), method: str = 'in_loop_waveform_rapp', normative: bool = False, ramp_strategy: str = 'adaptive_square_law')[source]¶
Bases:
objectResult of TEMField’s non-normative waveform validation.
- Parameters:
status (str) – Machine-readable decision status.
passed (bool) – Whether the final waveform set satisfies all configured limits.
reason (str) – Human-readable decision reason.
factor (float) – Positive AM peak factor
1 + m.target_field_v_per_m (float) – Requested fitted carrier field in volts per metre.
start_field_v_per_m (float) – Safe CW starting field in volts per metre.
limits (AMWaveformLimits) – Engineering limits used for the decision.
ramp_points (tuple) – Fitted waveform diagnostics acquired during the upward ramp.
stable_waveforms (tuple) – Final waveform fits used for the reported decision.
carrier_correction_attempts (int, optional) – Number of downward final-carrier corrections applied.
carrier_correction_waveforms (tuple, optional) – Otherwise valid final fits superseded by the downward correction.
method (str, optional) – Validation method identifier.
normative (bool, optional) – Whether the method claims normative IEC status.
ramp_strategy (str, optional) – Actor-level ramp strategy identifier.
- limits: AMWaveformLimits¶
- __init__(status: str, passed: bool, reason: str, factor: float, target_field_v_per_m: float, start_field_v_per_m: float, limits: AMWaveformLimits, ramp_points: tuple, stable_waveforms: tuple, carrier_correction_attempts: int = 0, carrier_correction_waveforms: tuple = (), method: str = 'in_loop_waveform_rapp', normative: bool = False, ramp_strategy: str = 'adaptive_square_law') None¶
- temfield_mpylab.measurement_worker.analyse_am_waveform(times_ms, values, modulation_depth_percent)[source]¶
Fit sinusoidal and Rapp models to one measured field waveform.
peak_compression_dbis the differential AM/AM gain loss between the carrier input and the positive AM peak. It is independent of the fitted absolute field scale and is therefore directly comparable across frequencies and target field strengths.
- temfield_mpylab.measurement_worker.validate_am_fit(fit, target_field_v_per_m, modulation_depth_percent, limits, *, check_carrier=True)[source]¶
Return
(passed, reason)for one final-target waveform fit.check_carrier=Falseis used when several stable final waveforms are available and their mean carrier level is evaluated separately withvalidate_carrier_level(). All per-waveform signal-quality, modulation, compression, and peak-safety limits remain active.
- temfield_mpylab.measurement_worker.validate_carrier_level(fits, target_field_v_per_m, limits)[source]¶
Validate the mean carrier field of stable final-target waveforms.
- temfield_mpylab.measurement_worker.validate_waveform_stability(fits, limits)[source]¶
Return whether consecutive final-target waveforms are sufficiently stable.
- class temfield_mpylab.measurement_worker.TestSusceptibility(parent=None)[source]¶
Bases:
Measure- Init(names=None, datafunc=None, pin=None, dwell_time=None, e_target=None, dotfile=None, SearchPath=None, leveler_par=None, adjust_to_setting=None, probe_orientations=None)[source]¶
Configure the susceptibility measurement.
Raw field-probe readings are mapped once from probe coordinates into the final
(Ex, Ey, Ez)cell-coordinate order. Component selection and customdatafunccallbacks operate on that mapped vector.- Parameters:
names (mapping, optional) – Measurement-graph role to node-name mapping.
datafunc (callable, optional) – Custom observer function receiving an already ordered three-axis field vector. By default,
adjust_to_settingselects the value.pin (iterable of float, optional) – Initial signal-generator levels in dBm.
dwell_time (float, optional) – Exposure time in seconds; defaults to one second.
e_target (float, optional) – Requested carrier field strength in volts per metre.
dotfile (path-like, optional) – Measurement-graph DOT file.
SearchPath (iterable of path-like, optional) – Search paths used to resolve graph configuration files.
leveler_par (mapping, optional) – Explicit mpylab leveler parameters.
adjust_to_setting ({"x", "y", "z", "mag", "largest"}, optional) – Field value used for leveling. Missing and legacy
"auto"values select"y".probe_orientations (mapping, optional) – Direct or per-probe orientation configuration. Graph-node and field-probe INI metadata are used when this is omitted.
- reset_to_safe_actor_level()[source]¶
Reset the generator to its lowest configured level with RF off.
- adjust_level(target_field=None)[source]¶
Level to the target field and return the full probe field vector.
The structured
mpylab.tools.mgraph.LevelingResultis retained inlast_leveling_result. Callers must only expose the EUT to the test field when that result has statusconverged.
- prepare_am_waveform_validation(modulation_depth_percent)[source]¶
Level only to the safe CW starting field for in-loop AM validation.
- Parameters:
modulation_depth_percent (float) – Sinusoidal AM depth from 0 through 100 percent. It determines the peak-to-carrier factor used to keep the initial AM peak at or below the requested carrier field.
- Returns:
Three-axis probe field at
e_target / (1 + modulation_depth).- Return type:
Notes
TEMField deliberately does not approach
factor * e_targetas CW: the EUT is already in the test volume. Amplifier linearity is assessed later from the actual AM waveform while its level is increased from this safe starting point.
- class temfield_mpylab.measurement_worker.TEMFieldWorker(*, dwell_time, e_target, names, dotfile, searchpath, adjust_to_setting, am, freqs, eut_monitor=None, manual_eut_monitor=None, performance_criterion='A', eut_event_policy=None, post_exposure_timeout=10.0, probe_orientations=None, am_waveform_limits=None, am_ramp_step_db=1.0, am_ramp_settle_time=0.05)[source]¶
Bases:
QObject- __init__(*, dwell_time, e_target, names, dotfile, searchpath, adjust_to_setting, am, freqs, eut_monitor=None, manual_eut_monitor=None, performance_criterion='A', eut_event_policy=None, post_exposure_timeout=10.0, probe_orientations=None, am_waveform_limits=None, am_ramp_step_db=1.0, am_ramp_settle_time=0.05)[source]¶
Create a measurement worker.
Raw field-probe components are mapped once into TEM-cell coordinates by the measurement layer before the worker evaluates or exports them.
- Parameters:
dwell_time (float) – Exposure time per frequency in seconds.
e_target (float) – Requested carrier field strength in volts per metre.
names (mapping) – Measurement-graph role to node-name mapping.
dotfile (path-like) – Measurement-graph DOT file.
searchpath (iterable of path-like) – Search paths used to resolve graph configuration files.
adjust_to_setting ({"x", "y", "z", "mag", "largest"}) – Field value used for leveling and waveform analysis.
am (float) – Sinusoidal AM depth in percent.
freqs (iterable of float) – RF frequencies in hertz.
eut_monitor (mpylab.env.eut.EUTMonitor, optional) – Automatic EUT monitor.
manual_eut_monitor (mpylab.env.eut.ManualEUTMonitor, optional) – Operator-driven EUT monitor.
performance_criterion (str, optional) – IEC 61000-4-20 EUT performance criterion.
eut_event_policy (mapping, optional) – Actions for reported EUT event states.
post_exposure_timeout (float, optional) – Maximum post-exposure monitoring time in seconds.
probe_orientations (mapping, optional) – Direct or per-probe orientation checked against graph metadata.
am_waveform_limits (AMWaveformLimits or mapping, optional) – Model-based compression, signal-quality, field, and stability limits for the in-loop AM waveform validation.
am_ramp_step_db (float, optional) – Maximum signal-generator power step during the AM ramp.
am_ramp_settle_time (float, optional) – Settling time before each waveform acquisition, in seconds.