src.tlan.tarlan

The Transmit And Receiver LANguage (TARLAN) is the language for the radar controllers at the EISCAT mainland radars, that are EISCAT UHF and VHF, including receivers in Kiruna and Sodankylä.

The radar controller controls most of the physical radar equipment, that is phase shifting, beams, transmittion, reception, but not antenna steering or signal processing.

The dictionary Tarlan.commands gives an overview over the commands the system can run. More infortmation can be found at https://eiscat.se/scientist/user-documentation/radar-controllers-and-programming-for-the-kst-system/

Attributes

tarlan_command_docstring

Docstring ito be inserted to all tarlan commands.

Classes

Command

Tarlan command.

Tarlan

Class for parsing and handling an TARLAN experiment

Functions

kst_channels()

List of available channels

do_nothing(*args)

Dont delete. This function is needed for executing tarlan commands that

parse_line(line[, line_number])

Parse single line of Tarlan code.

tarlan_parser([filename])

Parse tlan file. Commands are returned in the same order as they appear in

Module Contents

src.tlan.tarlan.tarlan_command_docstring = Multiline-String
Show Value
""":param time: time [s]
:type time: float
:param line: line where the command is found. Used for error handling only.
:type line: int"""

Docstring ito be inserted to all tarlan commands.

src.tlan.tarlan.kst_channels()

List of available channels

src.tlan.tarlan.do_nothing(*args)

Dont delete. This function is needed for executing tarlan commands that cant be simulated/transferred or where is would not make sense to implement the function here.

class src.tlan.tarlan.Command(t, cmd, line=0)

Tarlan command.

Parameters:
  • t (float) – Subcycle time in seconds when command is executed.

  • cmd (str) – Command as written in the .tlan file

  • line (int) – Line in tlan file. Used for error messages

t
cmd
line = 0
__lt__(other)
Parameters:

other (Self)

Return type:

bool

__repr__()
__str__()
class src.tlan.tarlan.Tarlan(filename='', lo1=(812000000.0,) * 2, lo2=(128000000.0, 122000000.0), chfreqs=None)

Class for parsing and handling an TARLAN experiment

Parameters:
  • cycle (IntervalList) – Begin and end of experiment cycle

  • subycle (IntervalList) – Begin and end of experiment subcycles. These are defined by when SETTCR <time> is called.

  • streams (dict[str, IntervalList]) – Dictionary of all on/off times of the different settings in the radar system controller, among others “RF”, “CH1”.

  • end_time (float) – Length of tarlan program in seconds.

  • filename (str)

  • lo1 (tuple[float, float])

  • lo2 (tuple[float, float])

  • chfreqs (dict[int, src.kstconfig.nco.Nco] | None)

command_docs
cycle
subcycle_list
phaseshifter
freq_rec
stream_names = ['RF', 'RXPROT', 'LOPROT', 'CAL', 'BEAM']
_loaded_FIR = False
_selected_ADL = False
_selected_ADR = False
_selected_NCO = False
TCR = 0
end_time = 0
_lo1 = (812000000.0, 812000000.0)
_lo2 = (128000000.0, 122000000.0)
_init_streams()
from_tlan(filename='')

Parse tlan file and run Tarlan.exec_cmd() for all commands.

Parameters:

filename (str, optional) – Path of tlan file to load, defaults to “”

Return type:

None

_AD2CH(time, line, path, channels)
Parameters:
  • time (float)

  • line (int)

  • path (int)

  • channels (list[int])

AD1L(time, line)
Parameters:
  • time (float)

  • line (int)

AD1R(time, line)
Parameters:
  • time (float)

  • line (int)

AD2L(time, line)
Parameters:
  • time (float)

  • line (int)

AD2R(time, line)
Parameters:
  • time (float)

  • line (int)

ALLOFF(time, line)
Parameters:
  • time (float)

  • line (int)

NCOSEL(time, line, nco_line)
Parameters:
  • time (float)

  • line (int)

  • nco_line (int)

STFIR(time, line)
Parameters:
  • time (float)

  • line (int)

SETTCR(time, line)

Set reference time in time control

Parameters:
  • time (float)

  • line (int)

_generate_commands()
_check_command_docs()
exec_cmd(cmd)

«Execute» TARLAN command / import command to experiment

Parameters:

cmd (Command) – command as pasrsed from the file.

phaseshifts(idx=0)
Parameters:

idx (int)

Return type:

tuple[src.eventlist.EventList, list[float]]

src.tlan.tarlan.parse_line(line, line_number=0)

Parse single line of Tarlan code.

Parameters:
  • line (str) – line of code

  • line_number (int, optional) – line number in file, used for error handling only, defaults to 0

Raises:

TarlanError – for invalid commands

Returns:

list of Command objects

Return type:

list[Command]

src.tlan.tarlan.tarlan_parser(filename='')

Parse tlan file. Commands are returned in the same order as they appear in the file.

Parameters:

filename (str) – filename, defaults to “”

Returns:

list of Command objects

Return type:

list[Command]