TpmPreAdu

Overview

This plugin is responsible for managing the TPM PreADUs; respsonsible for the optical to electrical signal conversion of the antenna voltages. Predominantly this plugin manages the configurable gain/attenuation that can be applied to the preADU to ensure the incoming signal amplitude is within range of the ADCs.

Python Class & Methods Index

class ska_low_sps_tpm_api.plugins.preadu.TpmPreAdu(board, logger=None, **kwargs)[source]

TpmPreAdu plugin

__init__(board, logger=None, **kwargs)[source]

TpmPreAdu initialiser.

Parameters:

board – Pointer to board instance

static bit_reverse(value)[source]

Reverse bits in value.

Parameters:

value – Value to bit reverse

check_present()[source]

Detects if a preADU is present. Sets attribute “is_present”. A gain of 21 is written to all channels and read back. If the first gain value read back is 21, then a preADU is present.

The starting configuration of the software gains and preADU hardware gains are copied and restored at the end of the method.

clean_up()[source]

Perform cleanup.

Returns:

Success

disable_channels(channels=None)[source]
enable_channels(channels=None)[source]
get_attenuation()[source]

Returns the current attenuation value. Stored in channel_filters[7:1] with the 2 least significant bits of which forming a fractional component. For example if channel_filters[7:1] == 33 this corresponds to an attenuation of 1000.01 (base 2) or 8.25 (base 10)

static get_bit(input, bit)[source]

Gets the specified bit in input.

Parameters:
  • input – value to get bit.

  • bit – position of bit.

get_bits(input, bit_range)[source]

Gets the specified bits in an input.

Parameters:
  • input – value to get bit.

  • bit_range – position of bits to get (from,to).

get_passband()[source]
property info
initialise()[source]

Initialise AdcPowerMeter

property powered_on
read_configuration()[source]

Read configuration from preadu

select_high_passband()[source]
select_low_passband()[source]
set_attenuation(attenuation, channels=None)[source]

Set attenuation level for a particular channel. Supports attenuation from 0 to 31 with a precision of 0.25.

Parameters:
  • attenuation – Value of attenuation

  • channels – Preadu channels (None if to be applied to all channels

static set_bit(input, bit, value)[source]

Sets the specified bit in input with a value.

Parameters:
  • input – value before set bit.

  • bit – position of bit to set.

  • value – value of bit in returned value

set_bits(input, bit_range, value)[source]

Sets the specified bits in input with value.

Parameters:
  • input – value before set bits.

  • bit_range – position of bits to set (from,to).

  • value – value of bits in returned value

status_check()[source]

Perform status check.

Returns:

Status

switch_off()[source]

Switch preadu off

switch_on()[source]

Switch preadu on

write_configuration(update_preadu_reg=True)[source]

Write configuration to preadu WARNING if update_preadu_reg is false, the preadu shift registers and attenuation registers out of sync