Commit f3e3da3a authored by Michal Maciejewski's avatar Michal Maciejewski
Browse files

Final check of notebooks prior to the HWC

parent 99fc546b
Pipeline #2223868 failed with stage
in 53 seconds
......@@ -72,6 +72,48 @@ deploy_production_eos_ipd:
before_script: []
after_script: []
deploy_production_eos_qh:
stage: deploy
variables:
"EOS_PATH": "/eos/project/l/lhcsm/hwc/lhc-sm-hwc/qh"
"CI_OUTPUT_DIR": "qh"
# Only when the pushed with tags
only:
- tags
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer
script:
- deploy-eos
before_script: []
after_script: []
deploy_production_eos_60A:
stage: deploy
variables:
"EOS_PATH": "/eos/project/l/lhcsm/hwc/lhc-sm-hwc/60A"
"CI_OUTPUT_DIR": "60A"
# Only when the pushed with tags
only:
- tags
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer
script:
- deploy-eos
before_script: []
after_script: []
deploy_production_eos_80_120A:
stage: deploy
variables:
"EOS_PATH": "/eos/project/l/lhcsm/hwc/lhc-sm-hwc/80-120A"
"CI_OUTPUT_DIR": "80-120A"
# Only when the pushed with tags
only:
- tags
image: gitlab-registry.cern.ch/ci-tools/ci-web-deployer
script:
- deploy-eos
before_script: []
after_script: []
variables:
KRB5CCNAME: "/tmp/krb5cc"
NAME: "gitlab-registry.cern.ch/pkothuri/spark-pipelines/sparknotebook"
......
......@@ -135,6 +135,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"scrolled": false,
"tags": [
"skip_output"
]
......
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h1><center>Analysis of an FPA in an 60A Circuit</center></h1>\n",
"The LHC comprises a total of 376 pairs of horizontal and vertical orbit correctors which are installed at each focusing and defocusing main quadrupole magnet in the arcs. Quenches on 60 A magnets are detected by the power converter through magnet impedance growing. In addition, the power converter also provides current lead protection. The Figure below shows the circuit diagram of the 60 A arc orbit correctors.\n",
"\n",
"<img src=\"https://gitlab.cern.ch/LHCData/lhc-sm-hwc/-/raw/master/figures/60A/60A.png\" width=70%>\n",
"\n",
"source: Test Procedure and Acceptance Criteria for the 60 A Circuits, MP3 Procedure, <a href=\"https://edms.cern.ch/document/874724/\">https://edms.cern.ch/document/874724/</a>"
......@@ -82,22 +84,19 @@
]
},
{
"cell_type": "code",
"execution_count": null,
 
 
"scrolled": false
},
"outputs": [],
"source": [
"circuit_type = '60A'\n",
"fgc_pm_search = FgcPmSearchModuleMediator(DateTimeBaseModule(start_date_time='2018-03-12 00:00:00+01:00',\n",
" end_date_time='2018-03-13 00:00:00+01:00'), R60AFgcPmSearchBaseModule(), circuit_type=circuit_type)"
"circuit_type = '60A'\n",
"fgc_pm_search = FgcPmSearchModuleMediator(DateTimeBaseModule(start_date_time='2018-03-12 00:00:00+01:00',\n",
" end_date_time='2018-03-13 00:00:00+01:00'), R60AFgcPmSearchBaseModule(), circuit_type=circuit_type)"
 
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
......
......@@ -2,10 +2,12 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<h1><center>Analysis of an FPA in an 80-120A Circuit</center></h1>\n",
"\n",
"Figure below shows the electrical diagram of the 80-120 A corrector circuits including the connection to the PC. It’s important to note the positioning of the crowbar with respect to the DCCTs. During a power abort the current will transfer from the PC into the crowbar and the measured current (I_MEAS) goes immediately to almost 0 A, and is therefore not representative for the current in the cold part of the circuit including the magnet. Note that there is no QPS present in these circuits but that the PC will shut-down in case of overvoltage.\n",
"\n",
"<img src=\"https://gitlab.cern.ch/LHCData/lhc-sm-hwc/-/raw/master/figures/80-120A/80-120A.png\" width=70%>\n",
"\n",
"source: Test Procedure and Acceptance Criteria for the 80 A and 120 A Dipole Corrector Circuits, MP3 Procedure, <a href=\"https://edms.cern.ch/document/874722/\">https://edms.cern.ch/document/874722/</a>"
......@@ -66,16 +68,10 @@
"metadata": {},
"source": [
"# 1. Select FGC Post Mortem Entry"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In order to perform the analysis of a FPA in an IPQ circuit please:\n",
"1. Select circuit name prefix (e.g., RQ5)\n",
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In order to perform the analysis of a FPA in an IPQ circuit please:\n",
......@@ -89,22 +85,19 @@
]
},
{
"cell_type": "code",
"execution_count": null,
 
 
"scrolled": false
},
"outputs": [],
"scrolled": false
},
"outputs": [],
"source": [
"source": [
"circuit_type = '80-120A'\n",
"fgc_pm_search = FgcPmSearchModuleMediator(DateTimeBaseModule(start_date_time='2018-09-06 00:00:00+01:00',\n",
" end_date_time='2018-09-07 00:00:00+01:00'), R80_120AFgcPmSearchBaseModule(), circuit_type=circuit_type)"
 
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
......
__version__ = "1.4.0"
__version__ = "1.5.0"
......@@ -82,39 +82,64 @@
"print('Loading (1/12)'); import sys\n",
"print('Loading (2/12)'); import pandas as pd\n",
"print('Loading (3/12)'); from IPython.display import display, Javascript, clear_output\n",
"\n",
"# Internal libraries\n",
"print('Loading (4/12)'); import lhcsmapi\n",
"print('Loading (5/12)'); from lhcsmapi.Time import Time\n",
"print('Loading (6/12)'); from lhcsmapi.Timer import Timer\n",
"print('Loading (7/12)'); from lhcsmapi.analysis.IpdCircuitQuery import IpdCircuitQuery\n",
"print('Loading (8/12)'); from lhcsmapi.analysis.IpdCircuitAnalysis import IpdCircuitAnalysis\n",
"print('Loading (8/12)'); from lhcsmapi.analysis.IpdCircuitAnalysis import IpdCircuitAnalysis\n",
"print('Loading (9/12)'); from lhcsmapi.analysis.report_template import apply_report_template\n",
"print('Loading (10/12)'); from lhcsmapi.gui.hwc.HwcSearchModuleMediator import HwcSearchModuleMediator\n",
"print('Loading (11/12)'); from lhcsmapi.pyedsl.PlotBuilder import create_hwc_plot_title_with_circuit_name\n",
"print('Loading (12/12)'); from lhcsmapi.analysis.expert_input import get_expert_decision\n",
"\n",
"analysis_start_time = Time.get_analysis_start_time()\n",
"clear_output()\n",
"lhcsmapi.get_lhcsmapi_version()\n",
"lhcsmapi.get_lhcsmhwc_version('../__init__.py')\n",
"print('Analysis performed by %s' % HwcSearchModuleMediator.get_user())"
]
},
{
"print('Loading (10/12)'); from lhcsmapi.gui.hwc.HwcSearchModuleMediator import HwcSearchModuleMediator\n",
"print('Loading (11/12)'); from lhcsmapi.pyedsl.PlotBuilder import create_hwc_plot_title_with_circuit_name\n",
"print('Loading (12/12)'); from lhcsmapi.analysis.expert_input import get_expert_decision\n",
"cell_type": "markdown",
"metadata": {},
"source": [
"# 1. User Input\n",
"1. Copy code from AccTesting and paste into an empty cell below\n",
"<img src=\"https://gitlab.cern.ch/LHCData/lhc-sm-hwc/-/raw/master/figures/swan-manual-acctesting-integration.png\">\n",
"\n",
" - If you only want to test the notebook only for the copy&paste feature (without opening the AccTesting), please copy and execute the code below\n",
" ```\n",
" hwc_test = 'PIC2'\n",
" circuit_name = 'RD1.L2'\n",
" campaign = 'HWC_2018_1'\n",
" t_start = '2018-03-13 19:13:07.613'\n",
" t_end = '2018-03-13 19:30:26.299'\n",
" ```\n",
"\n",
"2. To analyze a historical test with a browser GUI, copy and execute the following code in the cell below\n",
"```\n",
"circuit_type = 'IPD'\n",
"hwc_test = 'PIC2'\n",
"hwcb = HwcSearchModuleMediator(circuit_type=circuit_type, hwc_test=hwc_test, hwc_summary_path='/eos/project/l/lhcsm/hwc/HWC_Summary.csv')\n",
"```\n",
]
"\n",
" - After opening the browser GUI, choose a circuit name in order to display HWC test with, campaign name as well as start and end time"
]
},
{
"execution_count": null,
"cell_type": "code",
"editable": false
"execution_count": null,
"metadata": {
"deletable": false
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 2. Query All Signals Prior to Analysis"
]
......
......@@ -89,39 +89,64 @@
"print('Loading (1/12)'); import sys\n",
"print('Loading (2/12)'); import pandas as pd\n",
"print('Loading (3/12)'); from IPython.display import display, Javascript, clear_output\n",
"\n",
"# Internal libraries\n",
"print('Loading (4/12)'); import lhcsmapi\n",
"print('Loading (5/12)'); from lhcsmapi.Time import Time\n",
"print('Loading (6/12)'); from lhcsmapi.Timer import Timer\n",
"print('Loading (7/12)'); from lhcsmapi.analysis.IpdCircuitQuery import IpdCircuitQuery\n",
"print('Loading (8/12)'); from lhcsmapi.analysis.IpdCircuitAnalysis import IpdCircuitAnalysis\n",
"print('Loading (8/12)'); from lhcsmapi.analysis.IpdCircuitAnalysis import IpdCircuitAnalysis\n",
"print('Loading (9/12)'); from lhcsmapi.analysis.report_template import apply_report_template\n",
"print('Loading (10/12)'); from lhcsmapi.gui.hwc.HwcSearchModuleMediator import HwcSearchModuleMediator\n",
"print('Loading (11/12)'); from lhcsmapi.pyedsl.PlotBuilder import create_hwc_plot_title_with_circuit_name\n",
"print('Loading (12/12)'); from lhcsmapi.analysis.expert_input import get_expert_decision\n",
"\n",
"analysis_start_time = Time.get_analysis_start_time()\n",
"clear_output()\n",
"lhcsmapi.get_lhcsmapi_version()\n",
"lhcsmapi.get_lhcsmhwc_version('../__init__.py')\n",
"print('Analysis performed by %s' % HwcSearchModuleMediator.get_user())"
]
},
{
"print('Loading (10/12)'); from lhcsmapi.gui.hwc.HwcSearchModuleMediator import HwcSearchModuleMediator\n",
"print('Loading (11/12)'); from lhcsmapi.pyedsl.PlotBuilder import create_hwc_plot_title_with_circuit_name\n",
"print('Loading (12/12)'); from lhcsmapi.analysis.expert_input import get_expert_decision\n",
"cell_type": "markdown",
"metadata": {},
"source": [
"# 1. User Input\n",
"1. Copy code from AccTesting and paste into an empty cell below\n",
"<img src=\"https://gitlab.cern.ch/LHCData/lhc-sm-hwc/-/raw/master/figures/swan-manual-acctesting-integration.png\">\n",
"\n",
" - If you only want to test the notebook only for the copy&paste feature (without opening the AccTesting), please copy and execute the code below\n",
" ```\n",
" hwc_test = 'PLI1.c2'\n",
" circuit_name = 'RD1.L2'\n",
" campaign = 'HWC_2017'\n",
" t_start = '2017-04-21 15:29:16.672' \n",
" t_end = '2017-04-21 15:37:08.150'\n",
" ```\n",
"\n",
"2. To analyze a historical test with a browser GUI, copy and execute the following code in the cell below\n",
"```\n",
"circuit_type = 'IPD'\n",
"hwc_test = 'PLI1.c2'\n",
"hwcb = HwcSearchModuleMediator(circuit_type=circuit_type, hwc_test=hwc_test, hwc_summary_path='/eos/project/l/lhcsm/hwc/HWC_Summary.csv')\n",
"```\n",
]
"\n",
" - After opening the browser GUI, choose a circuit name in order to display HWC test with, campaign name as well as start and end time"
]
},
{
"execution_count": null,
"cell_type": "code",
"outputs": [],
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 2. Query All Signals Prior to Analysis"
]
},
{
......
......@@ -90,39 +90,64 @@
"# External libraries\n",
"print('Loading (1/11)'); import pandas as pd\n",
"print('Loading (2/11)'); import sys\n",
"print('Loading (3/11)'); from IPython.display import display, Javascript, clear_output, HTML\n",
"\n",
"# Internal libraries\n",
"print('Loading (4/11)'); import lhcsmapi\n",
"print('Loading (5/11)'); from lhcsmapi.Time import Time\n",
"print('Loading (6/11)'); from lhcsmapi.Timer import Timer\n",
"print('Loading (7/11)'); from lhcsmapi.analysis.IpdCircuitQuery import IpdCircuitQuery\n",
"print('Loading (7/11)'); from lhcsmapi.analysis.IpdCircuitQuery import IpdCircuitQuery\n",
"print('Loading (8/11)'); from lhcsmapi.analysis.IpdCircuitAnalysis import IpdCircuitAnalysis\n",
"print('Loading (9/11)'); from lhcsmapi.analysis.expert_input import get_expert_decision\n",
"print('Loading (10/11)'); from lhcsmapi.analysis.report_template import apply_report_template\n",
"print('Loading (11/11)'); from lhcsmapi.gui.hwc.HwcSearchModuleMediator import HwcSearchModuleMediator\n",
"\n",
"analysis_start_time = Time.get_analysis_start_time()\n",
"clear_output()\n",
"lhcsmapi.get_lhcsmapi_version()\n",
"lhcsmapi.get_lhcsmhwc_version('../__init__.py')\n",
"print('Analysis performed by %s' % HwcSearchModuleMediator.get_user())"
]
},
{
"print('Loading (9/11)'); from lhcsmapi.analysis.expert_input import get_expert_decision\n",
"print('Loading (10/11)'); from lhcsmapi.analysis.report_template import apply_report_template\n",
"print('Loading (11/11)'); from lhcsmapi.gui.hwc.HwcSearchModuleMediator import HwcSearchModuleMediator\n",
"cell_type": "markdown",
"metadata": {},
"source": [
"# 1. User Input\n",
"1. Copy code from AccTesting and paste into an empty cell below\n",
"<img src=\"https://gitlab.cern.ch/LHCData/lhc-sm-hwc/-/raw/master/figures/swan-manual-acctesting-integration.png\">\n",
"\n",
" - If you only want to test the notebook only for the copy&paste feature (without opening the AccTesting), please copy and execute the code below\n",
" ```\n",
" hwc_test = 'PLI2.f2'\n",
" circuit_name = 'RD1.L2'\n",
" campaign = 'HWC_2014'\n",
" t_start = '2015-02-14 07:50:31.801'\n",
" t_end = '2015-02-14 08:08:01.351'\n",
" ```\n",
"\n",
"2. To analyze a historical test with a browser GUI, copy and execute the following code in the cell below\n",
"```\n",
"circuit_type = 'IPD'\n",
"hwc_test = 'PLI2.f2'\n",
"hwcb = HwcSearchModuleMediator(circuit_type=circuit_type, hwc_test=hwc_test, hwc_summary_path='/eos/project/l/lhcsm/hwc/HWC_Summary.csv')\n",
"```\n",
]
"\n",
" - After opening the browser GUI, choose a circuit name in order to display HWC test with, campaign name as well as start and end time"
]
},
{
"execution_count": null,
"cell_type": "code",
"scrolled": false
"execution_count": null,
"metadata": {
"scrolled": false
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 2. Query All Signals Prior to Analysis"
]
......@@ -150,11 +175,11 @@
"\n",
"query = IpdCircuitQuery(circuit_type, circuit_name, max_executions=11)\n",
"\n",
"with Timer():\n",
" # PC\n",
 
 
" timestamp_fgc = source_timestamp_df.at[0, 'timestamp']\n",
" i_meas_nxcals_df = query.query_signal_nxcals(t_start, t_end, t0=timestamp_fgc, system='PC', signal_names='I_MEAS', spark=spark)[0]\n",
" i_meas_df, i_a_df, i_ref_df, i_earth_df, i_earth_pcnt_df = query.query_pc_pm(timestamp_fgc, timestamp_fgc, signal_names=['I_MEAS', 'I_A', 'I_REF', 'I_EARTH', 'I_EARTH_PCNT'])\n",
"\n",
" # PIC\n",
......
......@@ -44,11 +44,11 @@
"<center>IPD currents during PLI3.C5. Note: the actual parameters are listed in Appendix 1.</center>\n",
"\n",
"Offline analyses are listed below:\n",
"\n",
"|Responsible|Type of Analysis|Criteria|\n",
"|-----------|----------------|--------|\n",
"|-----------|----------------|--------|\n",
"|PC|Analysis of the current and waveform decay.|Agreement of V_MEAS(t) and I_MEAS(t) to the theoretical decay curve withing a tolerance of 10 %.\n",
"|MP3|Check if QPS PM event was created (it is not expected).||\n",
"| |Check if FGC PM event was created (it is expected).||\n",
"|MP3|Calculate splice resistances (**not possible due to limited logging resolution**)| $R_\\text{max}$ < 5 nOhm|\n",
"|MP3|Check DFB regulation|$T_\\text{top HTS}$ = temperature at 0 A current +/- 4K|\n",
......@@ -91,40 +91,65 @@
"print('Loading (1/12)'); import sys\n",
"print('Loading (2/12)'); import pandas as pd\n",
"print('Loading (3/12)'); from IPython.display import display, Javascript, clear_output\n",
"\n",
"# Internal libraries\n",
"print('Loading (4/12)'); import lhcsmapi\n",
"print('Loading (5/12)'); from lhcsmapi.Time import Time\n",
"print('Loading (6/12)'); from lhcsmapi.Timer import Timer\n",
"print('Loading (7/12)'); from lhcsmapi.analysis.IpdCircuitQuery import IpdCircuitQuery\n",
"print('Loading (8/12)'); from lhcsmapi.analysis.IpdCircuitAnalysis import IpdCircuitAnalysis\n",
"print('Loading (8/12)'); from lhcsmapi.analysis.IpdCircuitAnalysis import IpdCircuitAnalysis\n",
"print('Loading (9/12)'); from lhcsmapi.analysis.report_template import apply_report_template\n",
"print('Loading (10/12)'); from lhcsmapi.gui.hwc.HwcSearchModuleMediator import HwcSearchModuleMediator\n",
"print('Loading (11/12)'); from lhcsmapi.pyedsl.PlotBuilder import create_hwc_plot_title_with_circuit_name\n",
"print('Loading (12/12)'); from lhcsmapi.analysis.expert_input import get_expert_decision\n",
"print('Loading (10/12)'); from lhcsmapi.gui.hwc.HwcSearchModuleMediator import HwcSearchModuleMediator\n",
"\n",
"analysis_start_time = Time.get_analysis_start_time()\n",
"clear_output()\n",
"lhcsmapi.get_lhcsmapi_version()\n",
"lhcsmapi.get_lhcsmhwc_version('../__init__.py')\n",
"print('Analysis performed by %s' % HwcSearchModuleMediator.get_user())"
]
},
{
"print('Loading (12/12)'); from lhcsmapi.analysis.expert_input import get_expert_decision\n",
"cell_type": "markdown",
"metadata": {},
"source": [
"# 1. User Input\n",
"1. Copy code from AccTesting and paste into an empty cell below\n",
"<img src=\"https://gitlab.cern.ch/LHCData/lhc-sm-hwc/-/raw/master/figures/swan-manual-acctesting-integration.png\">\n",
"\n",
" - If you only want to test the notebook only for the copy&paste feature (without opening the AccTesting), please copy and execute the code below\n",
" ```\n",
" hwc_test = 'PLI3.c5'\n",
" circuit_name = 'RD1.L2'\n",
" campaign = 'HWC_2017'\n",
" t_start = '2017-04-21 16:12:20.835'\n",
" t_end = '2017-04-21 16:27:48.341'\n",
" ```\n",
"\n",
"2. To analyze a historical test with a browser GUI, copy and execute the following code in the cell below\n",
"```\n",
"circuit_type = 'IPD'\n",
"hwc_test = 'PLI3.c5'\n",
"hwcb = HwcSearchModuleMediator(circuit_type=circuit_type, hwc_test=hwc_test, hwc_summary_path='/eos/project/l/lhcsm/hwc/HWC_Summary.csv')\n",
"```\n",
]
"\n",
" - After opening the browser GUI, choose a circuit name in order to display HWC test with, campaign name as well as start and end time"
]
},
{
"execution_count": null,
"cell_type": "code",
"outputs": [],
"source": [
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 2. Query All Signals Prior to Analysis"
]
},
{
"cell_type": "code",
......@@ -138,11 +163,10 @@
"source": [
"circuit_type = 'IPD'\n",
"if 'hwcb' in locals():\n",
" circuit_name = hwcb.get_circuit_name()\n",
" t_start = Time.to_unix_timestamp(hwcb.get_start_time())\n",
]
" t_end = Time.to_unix_timestamp(hwcb.get_end_time())\n",
" is_automatic = hwcb.is_automatic_mode()\n",
"else:\n",
" t_start = Time.to_unix_timestamp(t_start)\n",
" t_end = Time.to_unix_timestamp(t_end)\n",
......@@ -185,45 +209,31 @@
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"metadata": {},
"source": [
"# 3. Timestamps\n",
"The analysis for MP3 consists of checking the existence of PM file and of consistency of the PM timestamps (PC, QPS). The criterion of passing this test described in detail in 600APIC2.\n",
"In short the following criteria should be checked:\n",
"- The PC timestamp (51_self) is QPS timestamp +-20 ms. \n",
"- The difference between QPS board A and B timestamp = 1ms.\n",
"\n",
"If one or more of these conditions are not fulfilled, then an in-depth analysis has to be performed by the QPS team."
]
},
{
"cell_type": "code",
"cell_type": "code",
"execution_count": null,
"metadata": {
"editable": false,
"scrolled": true
},
"outputs": [],
"source": [
"analysis.create_timestamp_table(timestamp_dct)"
]
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 4. PC\n",
"## 4.1. Main Current\n",
"\n",
"*GRAPHS*: \n",
"- t = 0 s corresponds to the start of the test\n"
]
},
{
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 4. PC\n",
......
......@@ -93,43 +93,67 @@
"print('Loading (1/12)'); import sys\n",
"print('Loading (2/12)'); import pandas as pd\n",
"print('Loading (3/12)'); from IPython.display import display, Javascript, clear_output\n",
"\n",
"# Internal libraries\n",
"print('Loading (4/12)'); import lhcsmapi\n",
"print('Loading (5/12)'); from lhcsmapi.Time import Time\n",
"print('Loading (6/12)'); from lhcsmapi.Timer import Timer\n",
"print('Loading (7/12)'); from lhcsmapi.analysis.IpdCircuitQuery import IpdCircuitQuery\n",
"print('Loading (8/12)'); from lhcsmapi.analysis.IpdCircuitAnalysis import IpdCircuitAnalysis\n",
"print('Loading (8/12)'); from lhcsmapi.analysis.IpdCircuitAnalysis import IpdCircuitAnalysis\n",
"print('Loading (9/12)'); from lhcsmapi.analysis.report_template import apply_report_template\n",
"print('Loading (10/12)'); from lhcsmapi.gui.hwc.HwcSearchModuleMediator import HwcSearchModuleMediator\n",
"print('Loading (11/12)'); from lhcsmapi.pyedsl.PlotBuilder import create_hwc_plot_title_with_circuit_name\n",
"print('Loading (12/12)'); from lhcsmapi.analysis.expert_input import get_expert_decision\n",
"print('Loading (10/12)'); from lhcsmapi.gui.hwc.HwcSearchModuleMediator import HwcSearchModuleMediator\n",
"\n",
"analysis_start_time = Time.get_analysis_start_time()\n",
"clear_output()\n",
"lhcsmapi.get_lhcsmapi_version()\n",
"lhcsmapi.get_lhcsmhwc_version('../__init__.py')\n",
"print('Analysis performed by %s' % HwcSearchModuleMediator.get_user())"
]
},
{
"print('Loading (12/12)'); from lhcsmapi.analysis.expert_input import get_expert_decision\n",
"cell_type": "markdown",
"metadata": {},
"source": [
"# 1. User Input\n",
"1. Copy code from AccTesting and paste into an empty cell below\n",
"<img src=\"https://gitlab.cern.ch/LHCData/lhc-sm-hwc/-/raw/master/figures/swan-manual-acctesting-integration.png\">\n",
"\n",
" - If you only want to test the notebook only for the copy&paste feature (without opening the AccTesting), please copy and execute the code below\n",
" ```\n",
" hwc_test = 'PNO.a8'\n",
" circuit_name = 'RD1.L2'\n",
" campaign = 'HWC_2018_2'\n",
" t_start = '2018-12-03 13:36:52.811'\n",
" t_end = '2018-12-03 13:59:04.050'\n",
" ```\n",
"\n",
"2. To analyze a historical test with a browser GUI, copy and execute the following code in the cell below\n",
"```\n",
"circuit_type = 'IPD'\n",
"hwc_test = 'PNO.a8'\n",
"hwcb = HwcSearchModuleMediator(circuit_type=circuit_type, hwc_test=hwc_test, hwc_summary_path='/eos/project/l/lhcsm/hwc/HWC_Summary.csv')\n",
"```\n",
]
"\n",
" - After opening the browser GUI, choose a circuit name in order to display HWC test with, campaign name as well as start and end time"
]
},
{
"execution_count": null,
"cell_type": "code",
"editable": false
},
"execution_count": null,
"metadata": {
"deletable": false
},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"hwc_test = 'PNO.a8'\n",
"# 2. Query All Signals Prior to Analysis"
]
},
{
"cell_type": "code",
......@@ -148,11 +172,10 @@
" t_end = Time.to_unix_timestamp(hwcb.get_end_time())\n",
" is_automatic = hwcb.is_automatic_mode()\n",
"else:\n",
" t_start = Time.to_unix_timestamp(t_start)\n",
" t_end = Time.to_unix_timestamp(t_end)\n",
" t_start = Time.to_unix_timestamp(hwcb.get_start_time())\n",
" is_automatic = False\n",
"\n",
"query = IpdCircuitQuery(circuit_type, circuit_name, max_executions=12)\n",
"analysis = IpdCircuitAnalysis(query.circuit_type, pd.DataFrame())\n",
"\n",
......@@ -189,12 +212,15 @@
" \n",
" timestamp_dct = {'FGC': timestamp_fgc, 'PIC': timestamp_pic,\n",
" 'QDS_A':source_timestamp_qds_df.loc[0, 'timestamp'] if len(source_timestamp_qds_df) > 0 else float('nan'), \n",
" 'QDS_B':source_timestamp_qds_df.loc[1, 'timestamp'] if len(source_timestamp_qds_df) > 1 else float('nan')}\n"
]
" 'QDS_B':source_timestamp_qds_df.loc[1, 'timestamp'] if len(source_timestamp_qds_df) > 1 else float('nan')}\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# 3. Timestamps\n",
"The analysis for MP3 consists of checking the existence of PM events and of consistency of the PM timestamps (PC, QPS). The criterion of passing this test described in detail in 600APIC2.\n",
"In short the following criteria should be checked:\n",
"- The PC timestamp (51_self) is QPS timestamp +-20 ms. \n",
"- The difference between QPS board A and B timestamp = 1ms.\n",
......@@ -250,33 +276,20 @@
"DQAMG - controller attached to global protection \n",
"\n",
"**Current Leads:**\n",
"- Typical resistance for U_RES: 7 uOhm\n",
"- Threshold for U_HTS: 3 mV, 1s\n",
"\n",