XrayTube-commands.py

Documentation

This documentation gives a short description of the used functions in the program “XrayTube-commands.py”

testCurrent(int_current_mA)

function tests, if int_current_mA is in the range of current of the Xray tube

Parameters:int_current_mA – desired current
Returns:True or False
setCurrent(int_current_mA)

Set current of Xray tube after getting a current in the range, check if current is set succesfully

Parameters:int_current_mA – desired current
Returns:True or False
nominalCurrent()

Read status word for nominal current

Returns:integer in micro ampere
actualCurrent()

Read status word for actual current

Returns:integer in micro ampere
testVoltage(int_voltage_kV)

function tests, if int_voltage_kV is in the range of voltage of the Xray tube

Returns:True or False
setVoltage(int_voltage_kV)

Set voltage of Xray tube after getting a voltage in the range, check if voltage is set succesfully

Parameters:int_voltage_kV – desired voltage
Returns:True or False
nominalVoltage()

Read status word for nominal voltage

Returns:integer in volt
actualVoltage()

Read status word for actual voltage

Returns:integer in volt
openShutter(int_shutternumber)

Open Shutter 2 or 3 after checking, if shutternumber is correctly given, check status of shutters afterwards

Parameters:int_shutternumber – shutternumber (2 or 3)
Returns:statusRead3() or statusRead4() for shutter 2 or 3
closeShutter(int_shutternumber)

Close Shutter 2 or 3 after checking, if shutternumber is correctly given, check status of shutters afterwards

Parameters:int_shutternumber – shutternumber (2 or 3)
Returns:statusRead3() or statusRead4() for shutter 2 or 3
statusRead3()

Read and print status of shutter 2; if unexpected status word is received, the program will end with a warning, check status of shutters manually!!!

Returns:True (shutter 2 opened) or False (shutter 2 closed)
statusRead4()

Read and print status of shutter 3; if unexpected status word is received, the program will end with a warning, check status of shutters manually!!!

Returns:True (shutter 3 opened) or False (shutter 3 closed)
actSettings()

Check and print actual Settings of the Xray tube (nominal and actual current, nominal and actual voltage and status of shutter 2 and 3)

Returns:void