Feature: auto enable LNA in receiver Frontend
Background
Hardware
Both the L-band and K-band receivers have 2 LNAs installed -- one LNA per antenna feed polarization.
- In the case of L-band, the antenna feed is H, V polarization
- In the case of K-band, the atenna feed is RCHP, LCHP polarization.
The hardware configuration is the same between both receivers. LNAs and associated electronics are labeled as
mmic1
and mmic2
in the katcp command to EDD Frontend controller.
I don't know which way {1,2} are connected to 2 polarization of each antenna feed. We have to ask operation team and confirm with test.
Software
tcs/tnrt/LGPL/CommonSoftware/Frontend/idl/Frontend.idl
defines the public interface function
interface BaseFrontend: ACS::ACSComponent {
...
ResponseMessage set_mmic(in string chain, in boolean val) raises (FrontendError::inputErrorEx, FrontendError::requestErrorEx, FrontendError::noConnectionErrorEx);
This interface function is the same for both FrontendL
and FrontendK
.
This function was implemented last year, and I believe it already works, but needs new test on real hardware. We can use the same old unittests:
tcs/tnrt/LGPL/CommonSoftware/Frontend/test/test_FrontendL.py
tcs/tnrt/LGPL/CommonSoftware/Frontend/test/test_FrontendK.py
Current System Operation
The operation team uses kGui
on the Windows workstation to set RF chain ("CHAIN-A" or "CHAIN-B") that includes Low Noise Amplifier (LNA) enabled = True
or False
. This is equivalent to function set_mmic("<chain number>", True|False)
This issue
Provide a user parameter for operation script that allows the scan control to automatically enable and disable the the LNA per scan.
Define parameter for User Script
In file tcs/tnrt/LGPL/CommonSoftware/nash/src/ParameterBlocks.py
, class
FrontendParamsL
FrontendParamsK
Create a new parameter in the python constructor with default value , and create an object of the IDL valuetype that we can send to Scan controller.
def __init__(self, auto_enable_lna=False):
# validate that user input is boolean, not another data type
self.objval = ScanMod.FrontendParamsL(auto_enable_lna)
Update web documentation
class FrontendParamsL:
"""
.. todo:: add content
"""
Replace .. todo:: add content
with description of this new parameter auto_enable_lna
In path
tcs/tnrt/LGPL/CommonSoftware/nash/src
, run
make install
make sphinx
Then, in the web browser, open file (use your local file path):
file:///home/ssarris/repo/narit-raoc/tcs/tnrt/LGPL/CommonSoftware/nash/sphinx-doc/build/html/automatic_observations.html#ParameterBlocks.FrontendParamsL
Confirm you can see the new web doc for your new parameter
Define parameter in IDL valuetype
In file
tcs/tnrt/LGPL/CommonSoftware/Scan/idl/Scan.idl
,
valuetype FrontendParamsL
valuetype FrontendParamsK
Add a boolean auto_enable_lna
to the valuetype definition.
Save the new parameter in each new Scan object
In file
tcs/tnrt/LGPL/CommonSoftware/Scan/src/scantype_models.py
, class AbstractBaseScan
, constructor function __init__()
def __init__(
self,
schedule_params,
scantype_params,
tracking_params,
frontend_params,
backend_params,
data_params,
):
...
self.auto_enable_lna = frontend_params.auto_enable_lna
Use the new parameter in the scan flow control
In file
tcs/tnrt/LGPL/CommonSoftware/Scan/src/scantype_models.py
, class AbstractBaseScan
,
function run()
In the section that controls frontend
...
if self.frontend:
...
if self.auto_enable_lna is True:
self.frontend.set_mmic("1", True)
self.frontend.set_mmic("2", True)
function stop()
add new section to control with frontend
...
if self.frontend:
...
if self.auto_enable_lna is True:
self.frontend.set_mmic("1", False)
self.frontend.set_mmic("2", False)
Commit web documentation
After everything is finished, go to dir
tcs/tnrt
make nash_doc
It will generate the latest web documentation for the entire project. After finished git add
, git commit
all of the web files.
After Merge Request is merged to main
, Gitlab pushes this new website content to https://tnrt-nash.netlify.com/