mpylab.env.tem.emission_prescreen module

Helpers for GTEM/TEM emission prescreening.

mpylab.env.tem.emission_prescreen.dbuvm_to_field(dbuvm)

Convert an electric-field level from dBµV/m to V/m.

Parameters:

dbuvm (float) – Electric-field level in dBµV/m.

Returns:

Linear electric field strength in V/m.

Return type:

scuq.quantities.Quantity

mpylab.env.tem.emission_prescreen.emission_field_from_equal_position_voltage(freq, voltage, e0y, *, position_count=3, Zc=50, Dmax=3.0, s=10, hg=0.8, RH=(1, 4), rstep=None, is_oats=True)

Calculate a correlated far-field estimate for equal position voltages.

The helper mirrors the forward GTEM/TEM emission calculation used by TEMCell.Calculate_Prad and TEMCell.Calculate_Emax. It assumes that all measured EUT positions have the same receiver voltage. This is useful for deriving a conservative prescreening voltage limit from an electric field limit.

Parameters:
  • freq (float) – Frequency in Hz.

  • voltage (scuq.quantities.Quantity or float) – Corrected receiver voltage at each EUT position. A number is interpreted in V.

  • e0y (scuq.quantities.Quantity or float) – Normalized primary field strength in (V/m)/sqrt(W). A number is interpreted in that unit.

  • position_count (int, optional) – Number of equal-voltage EUT positions entering the correlation.

  • Zc (scuq.quantities.Quantity or float, optional) – TEM-cell characteristic impedance. A number is interpreted in ohms.

  • Dmax (float or callable, optional) – Maximum directivity, either as a constant or a function of frequency.

  • s (float, optional) – Horizontal OATS or free-space measurement distance in metres.

  • hg (float, optional) – Height of the equivalent radiating source in metres.

  • RH (tuple of float, optional) – Inclusive receive-antenna height interval in metres. For free-space evaluation, its first value defines the fixed receive height.

  • rstep (float or None, optional) – Receive-height search increment in metres. None selects the wavelength-dependent default of the geometry helper.

  • is_oats (bool, optional) – Use the OATS geometry factor when true; otherwise use free space.

Returns:

Larger of the correlated horizontal and vertical fields in V/m.

Return type:

scuq.quantities.Quantity

Raises:

ValueError – If position_count, e0y, Zc, or Dmax is not positive.

mpylab.env.tem.emission_prescreen.equal_position_voltage_limit_from_field_limit(freq, field_limit, e0y, *, position_count=3, Zc=50, Dmax=3.0, s=10, hg=0.8, RH=(1, 4), rstep=None, is_oats=True)

Invert a field limit to an equal-position receiver-voltage limit.

The inversion is exact for the stated equal-voltage assumption because the forward correlation is linear in receiver voltage for fixed frequency, geometry, e0y source, and OATS/FAR assumptions.

Parameters:
  • freq (float) – Frequency in Hz.

  • field_limit (scuq.quantities.Quantity or float) – Positive radiated-emission field limit. A number is interpreted in V/m.

  • e0y (scuq.quantities.Quantity or float) – Normalized primary field strength in (V/m)/sqrt(W).

  • position_count (int, optional) – Number of equal-voltage EUT positions assumed by the inversion.

  • Zc (scuq.quantities.Quantity or float, optional) – TEM-cell characteristic impedance in ohms.

  • Dmax (float or callable, optional) – Maximum directivity, either constant or frequency dependent.

  • s (float, optional) – Horizontal OATS or free-space measurement distance in metres.

  • hg (float, optional) – Height of the equivalent radiating source in metres.

  • RH (tuple of float, optional) – Receive-antenna height interval in metres.

  • rstep (float or None, optional) – Receive-height search increment in metres, or None for the geometry helper’s wavelength-dependent default.

  • is_oats (bool, optional) – Use OATS geometry when true; otherwise use free-space geometry.

Returns:

Receiver voltage in V which, at every assumed position, reconstructs field_limit.

Return type:

scuq.quantities.Quantity

Raises:

ValueError – If field_limit is not positive or a forwarded correlation parameter is invalid.

mpylab.env.tem.emission_prescreen.field_limit_at_frequency(limit, freq)

Evaluate a radiated-emission field limit at one frequency.

Parameters:
  • limit (object, callable, str, mapping, or None) – Limit specification accepted by resolve_emission_limit().

  • freq (float) – Frequency in Hz.

Returns:

Linear field limit in V/m. None means that no limit is configured or that the limit curve has no finite value at freq; this is a valid result and disables detector remeasurement at that frequency.

Return type:

scuq.quantities.Quantity or None

Raises:

ValueError – If the limit declares an unsupported field-strength unit.

mpylab.env.tem.emission_prescreen.maximum_emission_voltage(raw_emission, freq, port, detector=None, fallback_detector='PK')

Find the maximum corrected emission voltage for one port.

Parameters:
  • raw_emission (mapping) – Raw emission result containing voltage data indexed by detector when available, then by frequency, port, and EUT position.

  • freq (object) – Frequency key used by raw_emission.

  • port (object) – Receiver-port key used by raw_emission.

  • detector (str or None, optional) – Preferred detector. None selects fallback_detector.

  • fallback_detector (str, optional) – Detector used when the preferred detector has no data.

Returns:

Maximum absolute voltage in V over all positions and readings, or None if no usable reading exists.

Return type:

scuq.quantities.Quantity or None

mpylab.env.tem.emission_prescreen.needs_quasi_peak_remeasure(measured_voltage, voltage_limit, margin_db=6.0)

Decide whether a peak result requires quasi-peak remeasurement.

Parameters:
  • measured_voltage (scuq.quantities.Quantity or float) – Corrected peak voltage in V.

  • voltage_limit (scuq.quantities.Quantity or float) – Inverted quasi-peak voltage limit in V.

  • margin_db (float, optional) – Positive distance below the limit at which remeasurement is still requested.

Returns:

True when the measured voltage is no more than margin_db below the inverted voltage limit, or is above it.

Return type:

bool

mpylab.env.tem.emission_prescreen.resolve_emission_limit(limit)

Resolve a radiated-emission limit specification.

limit may be an already constructed limit object, a callable, a module name string below mpylab.limits, or a configuration dictionary. Example:

{
    "module": "radiated_emission.en_55011",
    "group": "2",
    "classification": "B",
    "detector": "QP",
    "port": "AC (<= 20 kVA)",
    "distance": "10 m",
}
Parameters:

limit (object, callable, str, mapping, or None) – Existing limit object, limit callable, module name, configuration mapping, or None to disable limit-based remeasurement.

Returns:

Resolved limit object or callable. None is returned unchanged.

Return type:

object, callable, or None

Raises:
  • ValueError – If a configuration mapping contains no module or limit name.

  • TypeError – If the specification has an unsupported type.

  • ImportError – If the configured limit module cannot be imported.

  • AttributeError – If the configured limit class does not exist in the module.

mpylab.env.tem.emission_prescreen.voltage_margin_db(measured_voltage, voltage_limit)

Calculate the measured-voltage margin relative to a voltage limit.

Parameters:
  • measured_voltage (scuq.quantities.Quantity or float) – Corrected measured voltage. A number is interpreted in V.

  • voltage_limit (scuq.quantities.Quantity or float) – Positive inverted voltage limit. A number is interpreted in V.

Returns:

20 * log10(measured_voltage / voltage_limit) in dB. A zero measured voltage yields negative infinity.

Return type:

float

Raises:

ValueError – If voltage_limit is not positive.