Station Self Check Tests subpackage

This subpackage implements station functionality for MCCS.

class BaseDaqTest(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Base class for a generic DAQ test.

__init__(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Initialise a new instance.

Parameters:
  • logger (Logger) – a logger for this model to use.

  • tile_trls (list[str]) – trls of tiles the station has.

  • subrack_trls (list[str]) – trls of subracks the station has.

  • daq_trl (str) – trl of the daq the station has.

  • component_manager (SpsStationComponentManager) – SpsStation component manager under test.

check_requirements()

Check we have at least one TPM and a DAQ.

Return type:

tuple[bool, str]

Returns:

true if we have at least one TPM and a DAQ.

reset_context()

Context manager to ensure reset is called after the test block.

Yields:

control to the block of code inside the with statement.

Return type:

Iterator[None]

class BasicTangoTest(component_manager, logger, tile_trls, subrack_trls, daq_trl)

A basic test to show we can connect to proxies.

check_requirements()

Check we have at least one TPM.

Return type:

tuple[bool, str]

Returns:

true if we have at least one TPM.

test()

A basic test to show we can connect to proxies.

Return type:

None

class InitialiseStation(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Test we can initialise and synchronise tiles correctly.

TEST STEPS

  1. Initialise the station. This should iterate through each of your tiles

    and initialise each of them.

  2. Verify each tile has reached the INITIALISED state.

  3. Synchronise the station. This should iterate through each of your tiles

    and synchronise each of them to the same reference time.

  4. Verify each tile has reached the SYNCHRONISED state.

TEST REQUIREMENTS

  1. Every SPS device in your station must be in adminmode.ENGINEERING, this is

    common for all tests.

  2. Your station must have at least 1 TPM.

  3. Your station must be DevState.ON.

check_requirements()

Check test requirements.

  • Station is in state tango.DevState.ON

  • Station has at least one Tile.

Return type:

tuple[bool, str]

Returns:

true if all checks pass.

test()

Test we can initialise tiles correctly.

Return type:

None

class TestAntennaBuffer(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Test we can read data from the Antenna Buffer to the DAQ correctly.

TEST STEPS

  1. Configure data to read from the antenna buffer.

  2. Set up the antenna buffer.

  3. Start recording to the buffer.

  4. Read from the buffer.

  5. Verify that the data is correct.

TEST REQUIREMENTS

  1. Every SPS device in your station must be in adminmode.ENGINEERING, this is

    common for all tests.

  2. Your station must have at least 1 TPM.

  3. Your TPMs must be synchronised.

  4. You must have a DAQ available.

test()

Test the data transmission from the Antenna Buffer to the DAQ.

Return type:

None

test_fpga(fpga_id=0, tile_ids=None, start_address=536870912, timestamp_capture_duration=75)

Test data stream from the Antenna Buffer to DAQ.

Parameters:
  • fpga_id (int) – FPGA ID to test (default is 0)

  • tile_ids (Optional[list]) – a list of Tile IDs to test (default is [0])

  • start_address (int) – Starting address for data transfer

  • timestamp_capture_duration (int) – time duration in timestamps.

Return type:

None

class TestBeam(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Test we can send beam data from the TPMs to DAQ correctly.

TEST STEPS

  1. Configure DAQ to be ready to receive beam data from your TPMs.

  2. Configure the pattern generator on each TPM to send a basic repeating pattern.

  3. Send data from each of TPM in sequence, collating the data into a single data

    structure.

  4. Verify the data received matches the input repeating pattern.

TEST REQUIREMENTS

  1. Every SPS device in your station must be in adminmode.ENGINEERING, this is

    common for all tests.

  2. Your station must have at least 1 TPM.

  3. Your TPMs must be synchronised.

  4. You must have a DAQ available.

test()

A test to show we can stream raw data from each available TPM to DAQ.

Return type:

None

class TestChannel(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Test we can send channel data from the TPMs to DAQ correctly.

TEST STEPS

  1. Configure DAQ to be ready to receive channel data from your TPMs.

  2. Configure the pattern generator on each TPM to send a basic repeating pattern.

  3. Send data from each of TPM in sequence, collating the data into a single data

    structure.

  4. Verify the data received matches the input repeating pattern.

TEST REQUIREMENTS

  1. Every SPS device in your station must be in adminmode.ENGINEERING, this is

    common for all tests.

  2. Your station must have at least 1 TPM.

  3. Your TPMs must be synchronised.

  4. You must have a DAQ available.

test()

A test to show we can stream raw data from each available TPM to DAQ.

Return type:

None

class TestIntegratedBeam(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Test we can send beam data from the TPMs to DAQ correctly.

TEST STEPS

  1. Configure DAQ to be ready to receive beam data from your TPMs.

  2. Configure the pattern generator on each TPM to send a basic repeating pattern.

  3. Send data from each of TPM in sequence, collating the data into a single data

    structure.

  4. Verify the data received matches the input repeating pattern.

TEST REQUIREMENTS

  1. Every SPS device in your station must be in adminmode.ENGINEERING, this is

    common for all tests.

  2. Your station must have at least 1 TPM.

  3. Your TPMs must be synchronised.

  4. You must have a DAQ available.

check_requirements()

Skip test due to known bug.

Return type:

tuple[bool, str]

Returns:

False as this test is skipped.

test()

A test to show we can stream raw data from each available TPM to DAQ.

Return type:

None

class TestIntegratedChannel(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Test we can send channel data from the TPMs to DAQ correctly.

TEST STEPS

  1. Configure DAQ to be ready to receive channel data from your TPMs.

  2. Configure the pattern generator on each TPM to send a basic repeating pattern.

  3. Send data from each of TPM in sequence, collating the data into a single data

    structure.

  4. Verify the data received matches the input repeating pattern.

TEST REQUIREMENTS

  1. Every SPS device in your station must be in adminmode.ENGINEERING, this is

    common for all tests.

  2. Your station must have at least 1 TPM.

  3. Your TPMs must be synchronised.

  4. You must have a DAQ available.

test()

A test to show we can stream raw data from each available TPM to DAQ.

Return type:

None

class TestRaw(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Test we can send raw data from the TPMs to DAQ correctly.

TEST STEPS

  1. Configure DAQ to be ready to receive raw data from your TPMs.

  2. Configure the pattern generator on each TPM to send a basic repeating pattern.

  3. Send data from each of TPM in sequence, collating the data into a single data

    structure.

  4. Verify the data received matches the input repeating pattern.

TEST REQUIREMENTS

  1. Every SPS device in your station must be in adminmode.ENGINEERING, this is

    common for all tests.

  2. Your station must have at least 1 TPM.

  3. Your TPMs must be synchronised.

  4. You must have a DAQ available.

test()

A test to show we can stream raw data from each available TPM to DAQ.

Return type:

None

class TestResult(value)

Enumerate for test results.

class TestStationBeamDataRate(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Test the station beam data rate.

TEST STEPS

  1. Configure the beamformer table for your TPMs to be for the full bandwidth

  2. Start the beamformer.

  3. Measure the data rate from DAQ for 1 min, comparing to expected rate.

  4. Repeat for n iterations.

TEST REQUIREMENTS

  1. Every SPS device in your station must be in adminmode.ENGINEERING, this is common for all tests.

  2. Your station must have at least 1 TPM.

  3. Your TPMs must be synchronised.

  4. You must have a DAQ available.

test()

Test to verify station beam data rate for a number of iterations.

Raises:

AssertionError – if the data rate is not as expected.

Return type:

None

class TestTileBeamformer(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Test the tile beamformer on each TPM.

TEST STEPS

  1. Configure DAQ to be ready to receive beam data from your TPMs.

  2. Send beam data for each antenna in sequence.

  3. Collate the data into a single data structure.

  4. Choose a random reference antenna and polarisation.

  5. Calibrate the TPMs to phase all antennas to the reference antenna.

  6. Resend the beam data for each antenna in sequence.

  7. Collate the data into a single data structure.

  8. Verify the data is now aligned with the reference antenna.

  9. Send beam data for all antennas at the same time.

  10. Collate the data into a single data structure.

  11. Verify the data is now 16 times stronger than for just 1 antenna.

TEST REQUIREMENTS

  1. Every SPS device in your station must be in adminmode.ENGINEERING, this is common for all tests.

  2. Your station must have at least 1 TPM.

  3. Your TPMs must be synchronised.

  4. You must have a DAQ available.

__init__(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Initialise a new instance.

Parameters:
  • logger (Logger) – a logger for this model to use.

  • tile_trls (list[str]) – trls of tiles the station has.

  • subrack_trls (list[str]) – trls of subracks the station has.

  • daq_trl (str) – trl of the daq the station has.

  • component_manager (SpsStationComponentManager) – SpsStation component manager under test.

test()

A test to show we can stream raw data from each available TPM to DAQ.

Return type:

None

class TestTilePointing(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Test the tile beamformer on each TPM.

TEST STEPS

  1. Configure DAQ to be ready to receive beam data from your TPMs.

  2. Send beam data from each TPM with zero delays in the test generator.

  3. Send beam data from each TPM with random delays in the test generator.

  4. Correct the beam data using pointing delays.

  5. Compare the corrected beam data with the reference beam data.

TEST REQUIREMENTS

  1. Every SPS device in your station must be in adminmode.ENGINEERING, this is common for all tests.

  2. Your station must have at least 1 TPM.

  3. Your TPMs must be synchronised.

  4. You must have a DAQ available.

__init__(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Initialise a new instance.

Parameters:
  • logger (Logger) – a logger for this model to use.

  • tile_trls (list[str]) – trls of tiles the station has.

  • subrack_trls (list[str]) – trls of subracks the station has.

  • daq_trl (str) – trl of the daq the station has.

  • component_manager (SpsStationComponentManager) – SpsStation component manager under test.

test()

Test to verify HW pointing offsets delays in the test generator.

Return type:

None

class TpmSelfCheckTest(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Base class for Tpm self check tests.

__init__(component_manager, logger, tile_trls, subrack_trls, daq_trl)

Initialise a new instance.

Parameters:
  • logger (Logger) – a logger for this model to use.

  • tile_trls (list[str]) – trls of tiles the station has.

  • subrack_trls (list[str]) – trls of subracks the station has.

  • daq_trl (str) – trl of the daq the station has.

  • component_manager (SpsStationComponentManager) – SpsStation component manager under test.

check_requirements()

Check requirements for the test before running.

Return type:

tuple[bool, str]

Returns:

true if all our proxies are in ENGINEERING mode.

run_test()

Run the self-check test, collect results.

Return type:

tuple[TestResult, str]

Returns:

test result.

abstract test()

This should be written by sub-classes.

Raises:

NotImplementedError – this is abstract.

Return type:

None