PowerMeter

class tam.PowerMeter(ipaddr, port)[source]
calibrate(ctl_id, src_device, device_id, src_pwr, startf, stopf, stepf)[source]

Run a calibration on the selected power detector.

Parameters:
  • ctl_id (int) – The detector to calibrate (either 0 or 1)

  • src_device (str) – The signal source being used to carry out the calibration. This will be one of: ‘SMHU58’, ‘DSG815’ or ‘DDSGEN’.

  • device_id (str) – The id of the calibrating signal source.

  • src_pwr (float) – The signal power level used for the calibration (in dBm).

  • startf (float) – The calibration start frequency in MHz.

  • stopf (float) – The calibration stop frequency in MHz.

  • stepf (float) – The frequency step for each calibration point in MHz.

Note

Calibration is a long running process and is synchronous. For this reason the ~rpyc~ synchronous request timeout is disabled for the duration of the calibration.

property chan: int

Get or set the power meter channel to use.

initialize()[source]

Initialize the power meter state.

measure_pwr(freq, apply_correction=False)[source]

Measure the channel signal power.

Parameters:
  • freq (float) – The signal frequency in MHz.

  • apply_correction (bool) – If this is True then insertion loss correction (if available) will be applied to the measured signal power.

Returns:

The signal power in dBm.