Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
8846c3d0
Commit
8846c3d0
authored
3 years ago
by
Taya Snijder
Browse files
Options
Downloads
Patches
Plain Diff
removed jupyter notebook
parent
00ac2cb2
No related branches found
No related tags found
1 merge request
!188
Resolve L2SS-461 "Replace percentage s with f in logging"
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
jupyter-notebooks/SPD_status_points_report.ipynb
+0
-676
0 additions, 676 deletions
jupyter-notebooks/SPD_status_points_report.ipynb
with
0 additions
and
676 deletions
jupyter-notebooks/SPD_status_points_report.ipynb
deleted
100644 → 0
+
0
−
676
View file @
00ac2cb2
{
"cells": [
{
"cell_type": "markdown",
"id": "6bdc7054",
"metadata": {},
"source": [
"# Test LRx.y: Test Name\n",
"\n",
"This notebook documents test output.\n",
"\n",
"Instructions:\n",
"\n",
"1. *PRESS File -> Make a Copy*,\n",
"1. Rename the notebook to the name of the test,\n",
"1. Update the title at the top of this section,\n",
"1. Fill in the sections with empty blocks with code and text,\n",
"1. Execute the provided initialisation code,\n",
"1. Run the tests,\n",
"1. *Rerun everything top to bottom to make sure the notebook is correct*,\n",
"1. Fill in the results & verdict.\n",
"1. ...and you're done!"
]
},
{
"cell_type": "markdown",
"id": "0b4a59a5",
"metadata": {},
"source": [
"## Purpose\n",
"\n",
"(Describe the purpose and context of this notebook, possibly including any links to external references)"
]
},
{
"cell_type": "markdown",
"id": "09d4d0a1",
"metadata": {},
"source": [
"cfdsadasd asdasd asd "
]
},
{
"cell_type": "markdown",
"id": "4c6489f3",
"metadata": {},
"source": [
"## Methodology\n",
"\n",
"Summary of how we are going to prove compliance."
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "8f47dc0a",
"metadata": {},
"outputs": [
{
"ename": "SyntaxError",
"evalue": "invalid syntax (2085207180.py, line 1)",
"output_type": "error",
"traceback": [
"\u001b[0;36m File \u001b[0;32m\"/tmp/ipykernel_453/2085207180.py\"\u001b[0;36m, line \u001b[0;32m1\u001b[0m\n\u001b[0;31m sdfsd sdfs dfsd sdf\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
]
}
],
"source": [
"# A number of status monitor points were added to the tango device. \n",
"# These points should be relatively simple read only points. \n",
"# Simply successfully reading them should demonstrate thatour device is working correctly"
]
},
{
"cell_type": "markdown",
"id": "9033f262",
"metadata": {},
"source": [
"## Initialisation\n",
"\n",
"The following sections contain boilerplate code to get the station to a well-defined state, and to get core configuration information in the report."
]
},
{
"cell_type": "markdown",
"id": "ff837bcb",
"metadata": {},
"source": [
"### Who and when\n",
"\n",
"This test was executed by xxxxxxx"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "00418ee4",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Test was executed at 2021-11-15 14:23:18.156584\n"
]
}
],
"source": [
"import datetime\n",
"print(f\"Test was executed at {datetime.datetime.isoformat(datetime.datetime.now(), ' ')}\")"
]
},
{
"cell_type": "markdown",
"id": "7532d05e",
"metadata": {},
"source": [
"### Hot reboot\n",
"\n",
"Makes sure the software and hardware are all in a known state."
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "c7a3effa",
"metadata": {},
"outputs": [
{
"ename": "NameError",
"evalue": "name 'boot' is not defined",
"output_type": "error",
"traceback": [
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
"\u001b[0;32m/tmp/ipykernel_32/4020222899.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;31m# Restart boot device\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0mboot\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0moff\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0mboot\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minitialise\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mboot\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
"\u001b[0;31mNameError\u001b[0m: name 'boot' is not defined"
]
}
],
"source": [
"# Restart boot device\n",
"boot.off()\n",
"boot.initialise()\n",
"boot.on()"
]
},
{
"cell_type": "code",
"execution_count": 46,
"id": "b4dd21b1",
"metadata": {},
"outputs": [],
"source": [
"# Reboot the station\n",
"boot.initialise_station()"
]
},
{
"cell_type": "code",
"execution_count": 47,
"id": "78a4db84",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Initialisation at 100%: Initialisation completed\n"
]
}
],
"source": [
"# Wait for reboot to complete\n",
"import time\n",
"while boot.initialising_station_R:\n",
" time.sleep(2)\n",
" print(f\"Initialisation at {boot.initialisation_progress_R}%: {boot.initialisation_status_R}\")\n",
" \n",
"assert boot.initialisation_progress_R == 100, \"Failed to fully initialise station.\""
]
},
{
"cell_type": "markdown",
"id": "9bc072af",
"metadata": {},
"source": [
"### Active versions\n",
"\n",
"List the versions currently running on the station."
]
},
{
"cell_type": "code",
"execution_count": 50,
"id": "35b815d4",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'SC': {'LTS/Boot/1': '*master [2480b2f87d203d39ae5c774c33b985e56a55ba0a]',\n",
" 'LTS/Docker/1': '*master [2480b2f87d203d39ae5c774c33b985e56a55ba0a]',\n",
" 'LTS/RECV/1': '*master [d13e50de3efee0aee9aa110d054981980fbebf3f]',\n",
" 'LTS/SDP/1': '*master [2480b2f87d203d39ae5c774c33b985e56a55ba0a]',\n",
" 'LTS/SST/1': '*master [2480b2f87d203d39ae5c774c33b985e56a55ba0a]',\n",
" 'LTS/UNB2/1': '*master [2480b2f87d203d39ae5c774c33b985e56a55ba0a]',\n",
" 'LTS/XST/1': '*master [2480b2f87d203d39ae5c774c33b985e56a55ba0a]'},\n",
" 'SDP': {'FPGA firmware': ['8: 2021-10-21T15.10.06_878797106_lofar2_unb2b_sdp_station_full',\n",
" '9: 2021-10-02T11.38.05_828519012_lofar2_unb2b_sdp_station_full',\n",
" '10: 2021-10-06T15.45.41_808990001_lofar2_unb2b_sdp_station_full',\n",
" '11: 2021-10-06T15.45.41_808990001_lofar2_unb2b_sdp_station_full'],\n",
" 'FPGA hardware': ['8: UniBoard2b', '9: UniBoard2b', '10: UniBoard2b', '11: UniBoard2b'],\n",
" 'SDPTR': 'git'}}\n"
]
}
],
"source": [
"def summarise(l: list) -> list:\n",
" return [f\"{idx}: {version}\" for idx,version in enumerate(l) if version] or [\"no versions reported\"]\n",
"\n",
"versions = {\n",
" \"SC\": {dev.name():dev.version_R for dev in devices},\n",
" \"SDP\": {\n",
" \"FPGA firmware\": summarise(sdp.FPGA_firmware_version_R),\n",
" \"FPGA hardware\": summarise(sdp.FPGA_hardware_version_R),\n",
" \"SDPTR\": sdp.TR_software_version_R,\n",
" },\n",
"\"\"\"\n",
"NOTE: These were not functional and are simply commented out due to not being relevant to the test.\n",
"\"\"\"\n",
"# \"RECV\": {\n",
"# \"PCB\": summarise(recv.RCU_PCB_version_R),\n",
"# },\n",
"# \"APSCT\": {\n",
"# \"PCB\": apsct.APSCT_PCB_version_R,\n",
"# },\n",
"# \"APSPU\": {\n",
"# \"PCB\": apspu.APSPU_PCB_version_R,\n",
"# },\n",
"# \"UNB2\": {\n",
"# \"PCB\": summarise(unb2.UNB2_PCB_version_R),\n",
"# }\n",
"}\n",
"\n",
"from pprint import pprint\n",
"pprint(versions, width=120)"
]
},
{
"cell_type": "markdown",
"id": "e51a06b7",
"metadata": {},
"source": [
"## Test setup\n",
"\n",
"Setup the hardware for the test, with comments about what's happening."
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "e72dc2df",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<bound method name of SDP(stat/sdp/1)> now in ON state\n"
]
}
],
"source": [
"import time\n",
"import numpy\n",
"\n",
"sdp=DeviceProxy(\"STAT/SDP/1\")\n",
"\n",
"state = str(sdp.state())\n",
"\n",
"if state == \"OFF\":\n",
" sdp.initialise()\n",
" time.sleep(1)\n",
"state = str(sdp.state())\n",
"if state == \"STANDBY\":\n",
" sdp.on()\n",
"state = str(sdp.state())\n",
"\n",
"print(f\"{sdp.name} now in {sdp.state()} state\")\n"
]
},
{
"cell_type": "markdown",
"id": "772dff7c",
"metadata": {},
"source": [
"## Run test\n",
"\n",
"Run the actual test. It is acceptable if the line between setup and test is a bit blurry."
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "9f117b2a",
"metadata": {},
"outputs": [],
"source": [
"a = []"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "26570aea",
"metadata": {},
"outputs": [],
"source": [
"a.append(f\"FPGA_signal_input_mean_R: {sdp.FPGA_signal_input_mean_R} \")"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "e79b83a0",
"metadata": {},
"outputs": [],
"source": [
"a.append(f\"FPGA_signal_input_rms_R: {sdp.FPGA_signal_input_rms_R} \")"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "ec062564",
"metadata": {},
"outputs": [],
"source": [
"a.append(f\"FPGA_jesd204b_csr_rbd_count_R: {sdp.FPGA_jesd204b_csr_rbd_count_R} \")"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "860c75ba",
"metadata": {},
"outputs": [],
"source": [
"a.append(f\"FPGA_jesd204b_csr_dev_syncn_R: {sdp.FPGA_jesd204b_csr_dev_syncn_R} \")"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "47be40db",
"metadata": {},
"outputs": [],
"source": [
"a.append(f\"FPGA_jesd204b_rx_err0_R: {sdp.FPGA_jesd204b_rx_err0_R} \")"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "796025cc",
"metadata": {},
"outputs": [],
"source": [
"a.append(f\"FPGA_jesd204b_rx_err1_R: {sdp.FPGA_jesd204b_rx_err1_R} \")"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "c9aa54ba",
"metadata": {},
"outputs": [],
"source": [
"a.append(f\"FPGA_bsn_monitor_input_bsn_R: {sdp.FPGA_bsn_monitor_input_bsn_R} \")"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "29ff56ef",
"metadata": {},
"outputs": [],
"source": [
"a.append(f\"FPGA_bsn_monitor_input_nof_packets_R: {sdp.FPGA_bsn_monitor_input_nof_packets_R} \")"
]
},
{
"cell_type": "code",
"execution_count": 61,
"id": "82d56a27",
"metadata": {},
"outputs": [],
"source": [
"a.append(f\"FPGA_bsn_monitor_input_nof_valid_R: {sdp.FPGA_bsn_monitor_input_nof_valid_R} \")"
]
},
{
"cell_type": "code",
"execution_count": 62,
"id": "71c82fd3",
"metadata": {},
"outputs": [],
"source": [
"a.append(f\"FPGA_bsn_monitor_input_nof_err_R: {sdp.FPGA_bsn_monitor_input_nof_err_R} \")"
]
},
{
"cell_type": "markdown",
"id": "6c604116",
"metadata": {},
"source": [
"## Test results\n",
"\n",
"Print the results of the test."
]
},
{
"cell_type": "code",
"execution_count": 63,
"id": "d290d8dd",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"FPGA_signal_input_mean_R: [[ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 4.05462319 -17.41039919 -10.71404389 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 9.65630385 21.5598806 12.9992259 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 11.11017832 15.05460048 1.26581269 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]] \n",
"FPGA_signal_input_rms_R: [[ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 4.4754077 17.38906716 10.77156682 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [830.79833776 683.13870406 824.89582177 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 11.29810053 15.09288031 2.28362144 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 0.\n",
" 0. 0. ]\n",
" [ 0. 0. 0. 0. 0.\n",
" 0. 0. 0. 0. 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] \n",
"FPGA_jesd204b_rx_err0_R: [[ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 224 224 224 96 224 224 224 224 224]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 224 160 224 160 224 224 96 160 224]\n",
" [ 0 0 0 224 224 224 224 224 160 160 224 224]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]] \n",
"FPGA_jesd204b_rx_err1_R: [[ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 49 49 57 0 56 56 56 0 56]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 56 56 0 56 0 0 0 56]\n",
" [ 0 0 0 0 56 56 56 0 56 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]\n",
" [ 0 0 0 0 0 0 0 0 0 0 0 0]] \n",
"FPGA_bsn_monitor_input_bsn_R: [ 0 0 0 0\n",
" 0 0 0 0\n",
" 319517661914062 0 319517661914062 319517661914062\n",
" 0 0 0 0] \n",
"FPGA_bsn_monitor_input_nof_packets_R: [ 0 0 0 0 0 0 0 0 195312 0\n",
" 195312 195312 0 0 0 0] \n",
"FPGA_bsn_monitor_input_nof_valid_R: [ 0 0 0 0 0 0 0\n",
" 0 199999488 0 199999488 199999488 0 0\n",
" 0 0] \n",
"FPGA_bsn_monitor_input_nof_err_R: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] \n"
]
}
],
"source": [
"for i in a:\n",
" print(i)"
]
},
{
"cell_type": "markdown",
"id": "d3cdb620",
"metadata": {},
"source": [
"## Discuss results\n",
"\n",
"How should the results be interpreted? Are there remaining worries and todo's based on this result?"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "dbe34d41",
"metadata": {},
"outputs": [],
"source": [
"# Reading was succesful, thats as far as we need to go. The values we're reading out doesn't concern this ticket. \n",
"# Additionally the fact that only [8] [10] and [11] show any values shows that we are indeed getting the proper values\n",
"# since currently those are the only inputs that are set up and active. "
]
},
{
"cell_type": "markdown",
"id": "a95fbf48",
"metadata": {},
"source": [
"## Verdict\n",
"\n",
"Did the test pass, and why (not)?"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ccd3c506",
"metadata": {},
"outputs": [],
"source": [
"# The test passed. The goal of this test was to be able to read out all the added monitor points, and this succeeded."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "StationControl",
"language": "python",
"name": "stationcontrol"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
%% Cell type:markdown id:6bdc7054 tags:
# Test LRx.y: Test Name
This notebook documents test output.
Instructions:
1.
*PRESS File -> Make a Copy*
,
1.
Rename the notebook to the name of the test,
1.
Update the title at the top of this section,
1.
Fill in the sections with empty blocks with code and text,
1.
Execute the provided initialisation code,
1.
Run the tests,
1.
*Rerun everything top to bottom to make sure the notebook is correct*
,
1.
Fill in the results & verdict.
1.
...and you're done!
%% Cell type:markdown id:0b4a59a5 tags:
## Purpose
(Describe the purpose and context of this notebook, possibly including any links to external references)
%% Cell type:markdown id:09d4d0a1 tags:
cfdsadasd asdasd asd
%% Cell type:markdown id:4c6489f3 tags:
## Methodology
Summary of how we are going to prove compliance.
%% Cell type:code id:8f47dc0a tags:
```
python
# A number of status monitor points were added to the tango device.
# These points should be relatively simple read only points.
# Simply successfully reading them should demonstrate thatour device is working correctly
```
%% Output
File "/tmp/ipykernel_453/2085207180.py", line 1
sdfsd sdfs dfsd sdf
^
SyntaxError: invalid syntax
%% Cell type:markdown id:9033f262 tags:
## Initialisation
The following sections contain boilerplate code to get the station to a well-defined state, and to get core configuration information in the report.
%% Cell type:markdown id:ff837bcb tags:
### Who and when
This test was executed by xxxxxxx
%% Cell type:code id:00418ee4 tags:
```
python
import
datetime
print
(
f
"
Test was executed at
{
datetime
.
datetime
.
isoformat
(
datetime
.
datetime
.
now
(),
'
'
)
}
"
)
```
%% Output
Test was executed at 2021-11-15 14:23:18.156584
%% Cell type:markdown id:7532d05e tags:
### Hot reboot
Makes sure the software and hardware are all in a known state.
%% Cell type:code id:c7a3effa tags:
```
python
# Restart boot device
boot
.
off
()
boot
.
initialise
()
boot
.
on
()
```
%% Output
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
/tmp/ipykernel_32/4020222899.py in <module>
1 # Restart boot device
----> 2 boot.off()
3 boot.initialise()
4 boot.on()
NameError: name 'boot' is not defined
%% Cell type:code id:b4dd21b1 tags:
```
python
# Reboot the station
boot
.
initialise_station
()
```
%% Cell type:code id:78a4db84 tags:
```
python
# Wait for reboot to complete
import
time
while
boot
.
initialising_station_R
:
time
.
sleep
(
2
)
print
(
f
"
Initialisation at
{
boot
.
initialisation_progress_R
}
%:
{
boot
.
initialisation_status_R
}
"
)
assert
boot
.
initialisation_progress_R
==
100
,
"
Failed to fully initialise station.
"
```
%% Output
Initialisation at 100%: Initialisation completed
%% Cell type:markdown id:9bc072af tags:
### Active versions
List the versions currently running on the station.
%% Cell type:code id:35b815d4 tags:
```
python
def
summarise
(
l
:
list
)
->
list
:
return
[
f
"
{
idx
}
:
{
version
}
"
for
idx
,
version
in
enumerate
(
l
)
if
version
]
or
[
"
no versions reported
"
]
versions
=
{
"
SC
"
:
{
dev
.
name
():
dev
.
version_R
for
dev
in
devices
},
"
SDP
"
:
{
"
FPGA firmware
"
:
summarise
(
sdp
.
FPGA_firmware_version_R
),
"
FPGA hardware
"
:
summarise
(
sdp
.
FPGA_hardware_version_R
),
"
SDPTR
"
:
sdp
.
TR_software_version_R
,
},
"""
NOTE: These were not functional and are simply commented out due to not being relevant to the test.
"""
# "RECV": {
# "PCB": summarise(recv.RCU_PCB_version_R),
# },
# "APSCT": {
# "PCB": apsct.APSCT_PCB_version_R,
# },
# "APSPU": {
# "PCB": apspu.APSPU_PCB_version_R,
# },
# "UNB2": {
# "PCB": summarise(unb2.UNB2_PCB_version_R),
# }
}
from
pprint
import
pprint
pprint
(
versions
,
width
=
120
)
```
%% Output
{'SC': {'LTS/Boot/1': '*master [2480b2f87d203d39ae5c774c33b985e56a55ba0a]',
'LTS/Docker/1': '*master [2480b2f87d203d39ae5c774c33b985e56a55ba0a]',
'LTS/RECV/1': '*master [d13e50de3efee0aee9aa110d054981980fbebf3f]',
'LTS/SDP/1': '*master [2480b2f87d203d39ae5c774c33b985e56a55ba0a]',
'LTS/SST/1': '*master [2480b2f87d203d39ae5c774c33b985e56a55ba0a]',
'LTS/UNB2/1': '*master [2480b2f87d203d39ae5c774c33b985e56a55ba0a]',
'LTS/XST/1': '*master [2480b2f87d203d39ae5c774c33b985e56a55ba0a]'},
'SDP': {'FPGA firmware': ['8: 2021-10-21T15.10.06_878797106_lofar2_unb2b_sdp_station_full',
'9: 2021-10-02T11.38.05_828519012_lofar2_unb2b_sdp_station_full',
'10: 2021-10-06T15.45.41_808990001_lofar2_unb2b_sdp_station_full',
'11: 2021-10-06T15.45.41_808990001_lofar2_unb2b_sdp_station_full'],
'FPGA hardware': ['8: UniBoard2b', '9: UniBoard2b', '10: UniBoard2b', '11: UniBoard2b'],
'SDPTR': 'git'}}
%% Cell type:markdown id:e51a06b7 tags:
## Test setup
Setup the hardware for the test, with comments about what's happening.
%% Cell type:code id:e72dc2df tags:
```
python
import
time
import
numpy
sdp
=
DeviceProxy
(
"
STAT/SDP/1
"
)
state
=
str
(
sdp
.
state
())
if
state
==
"
OFF
"
:
sdp
.
initialise
()
time
.
sleep
(
1
)
state
=
str
(
sdp
.
state
())
if
state
==
"
STANDBY
"
:
sdp
.
on
()
state
=
str
(
sdp
.
state
())
print
(
f
"
{
sdp
.
name
}
now in
{
sdp
.
state
()
}
state
"
)
```
%% Output
<bound method name of SDP(stat/sdp/1)> now in ON state
%% Cell type:markdown id:772dff7c tags:
## Run test
Run the actual test. It is acceptable if the line between setup and test is a bit blurry.
%% Cell type:code id:9f117b2a tags:
```
python
a
=
[]
```
%% Cell type:code id:26570aea tags:
```
python
a
.
append
(
f
"
FPGA_signal_input_mean_R:
{
sdp
.
FPGA_signal_input_mean_R
}
"
)
```
%% Cell type:code id:e79b83a0 tags:
```
python
a
.
append
(
f
"
FPGA_signal_input_rms_R:
{
sdp
.
FPGA_signal_input_rms_R
}
"
)
```
%% Cell type:code id:ec062564 tags:
```
python
a
.
append
(
f
"
FPGA_jesd204b_csr_rbd_count_R:
{
sdp
.
FPGA_jesd204b_csr_rbd_count_R
}
"
)
```
%% Cell type:code id:860c75ba tags:
```
python
a
.
append
(
f
"
FPGA_jesd204b_csr_dev_syncn_R:
{
sdp
.
FPGA_jesd204b_csr_dev_syncn_R
}
"
)
```
%% Cell type:code id:47be40db tags:
```
python
a
.
append
(
f
"
FPGA_jesd204b_rx_err0_R:
{
sdp
.
FPGA_jesd204b_rx_err0_R
}
"
)
```
%% Cell type:code id:796025cc tags:
```
python
a
.
append
(
f
"
FPGA_jesd204b_rx_err1_R:
{
sdp
.
FPGA_jesd204b_rx_err1_R
}
"
)
```
%% Cell type:code id:c9aa54ba tags:
```
python
a
.
append
(
f
"
FPGA_bsn_monitor_input_bsn_R:
{
sdp
.
FPGA_bsn_monitor_input_bsn_R
}
"
)
```
%% Cell type:code id:29ff56ef tags:
```
python
a
.
append
(
f
"
FPGA_bsn_monitor_input_nof_packets_R:
{
sdp
.
FPGA_bsn_monitor_input_nof_packets_R
}
"
)
```
%% Cell type:code id:82d56a27 tags:
```
python
a
.
append
(
f
"
FPGA_bsn_monitor_input_nof_valid_R:
{
sdp
.
FPGA_bsn_monitor_input_nof_valid_R
}
"
)
```
%% Cell type:code id:71c82fd3 tags:
```
python
a
.
append
(
f
"
FPGA_bsn_monitor_input_nof_err_R:
{
sdp
.
FPGA_bsn_monitor_input_nof_err_R
}
"
)
```
%% Cell type:markdown id:6c604116 tags:
## Test results
Print the results of the test.
%% Cell type:code id:d290d8dd tags:
```
python
for
i
in
a
:
print
(
i
)
```
%% Output
FPGA_signal_input_mean_R: [[ 0. 0. 0. 0. 0.
0. 0. 0. 0. 0.
0. 0. ]
[ 0. 0. 0. 0. 0.
0. 0. 0. 0. 0.
0. 0. ]
[ 0. 0. 0. 0. 0.
0. 0. 0. 0. 0.
0. 0. ]
[ 0. 0. 0. 0. 0.
0. 0. 0. 0. 0.
0. 0. ]
[ 0. 0. 0. 0. 0.
0. 0. 0. 0. 0.
0. 0. ]
[ 0. 0. 0. 0. 0.
0. 0. 0. 0. 0.
0. 0. ]
[ 0. 0. 0. 0. 0.
0. 0. 0. 0. 0.
0. 0. ]
[ 0. 0. 0. 0. 0.
0. 0. 0. 0. 0.
0. 0. ]
[ 4.05462319 -17.41039919 -10.71404389 0. 0.
0. 0. 0. 0. 0.
0. 0. ]
[ 0.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 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 224 224 224 96 224 224 224 224 224]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 224 160 224 160 224 224 96 160 224]
[ 0 0 0 224 224 224 224 224 160 160 224 224]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]]
FPGA_jesd204b_rx_err1_R: [[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 49 49 57 0 56 56 56 0 56]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 56 56 0 56 0 0 0 56]
[ 0 0 0 0 56 56 56 0 56 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]
[ 0 0 0 0 0 0 0 0 0 0 0 0]]
FPGA_bsn_monitor_input_bsn_R: [ 0 0 0 0
0 0 0 0
319517661914062 0 319517661914062 319517661914062
0 0 0 0]
FPGA_bsn_monitor_input_nof_packets_R: [ 0 0 0 0 0 0 0 0 195312 0
195312 195312 0 0 0 0]
FPGA_bsn_monitor_input_nof_valid_R: [ 0 0 0 0 0 0 0
0 199999488 0 199999488 199999488 0 0
0 0]
FPGA_bsn_monitor_input_nof_err_R: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
%% Cell type:markdown id:d3cdb620 tags:
## Discuss results
How should the results be interpreted? Are there remaining worries and todo's based on this result?
%% Cell type:code id:dbe34d41 tags:
```
python
# Reading was succesful, thats as far as we need to go. The values we're reading out doesn't concern this ticket.
# Additionally the fact that only [8] [10] and [11] show any values shows that we are indeed getting the proper values
# since currently those are the only inputs that are set up and active.
```
%% Cell type:markdown id:a95fbf48 tags:
## Verdict
Did the test pass, and why (not)?
%% Cell type:code id:ccd3c506 tags:
```
python
# The test passed. The goal of this test was to be able to read out all the added monitor points, and this succeeded.
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment