Commit fedb019e authored by Aleksandra Mnich's avatar Aleksandra Mnich
Browse files

Merge branch 'SIGMON-145_do_not_crash' into 'dev'

[SIGMON-145] do not crash

See merge request !47
parents 23a55b70 deefef50
Pipeline #3153255 failed with stages
in 240 minutes and 41 seconds
......@@ -31,27 +31,28 @@
"- The grid comes from the left axis\n",
"- Title contains timestamp, circuit name, signal name allowing for re-access the signal.\n",
"- The plots assigned to the left scale got colors: blue (C0) and orange (C1). Plots presented on the right have colors red (C2) and green (C3).\n",
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, change color of the label to match the signal's color. Otherwise, the label color is black.\n",
 
 
 
 
 
 
 
 
"cell_type": "markdown",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false,
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false,
"scrolled": true
},
"outputs": [],
"source": [
"# External libraries\n",
"print('Loading (1/16)'); import pandas as pd\n",
......@@ -120,15 +121,15 @@
" end_date_time='2021-01-31 00:00:00+01:00'), circuit_type='600A_RCBXHV')"
]
},
{
"cell_type": "markdown",
 
 
"source": [
"# 2. Query All Signals Prior to Analysis"
]
 
 
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false,
......@@ -165,14 +166,14 @@
" timestamp_pic_rcbxv = query_rcbxv.find_timestamp_pic(timestamp_fgc_rcbxv, spark=spark)\n",
"\n",
" # QDS NXCALS - To check if there was any drift of QDS cards prior to the trigger\n",
" # # RCBXH\n",
" i_meas_nxcals_rcbxh_df = query_rcbxh.query_pc_nxcals(timestamp_fgc_rcbxh, signal_names=['I_MEAS'], spark=spark)[0]\n",
" u_res_nxcals_rcbxh_df = query_rcbxh.query_iqps_nxcals(timestamp_fgc_rcbxh, signal_names=['U_RES'], spark=spark)[0]\n",
 
" i_meas_nxcals_rcbxv_df = query_rcbxv.query_pc_nxcals(timestamp_fgc_rcbxv, signal_names=['I_MEAS'], spark=spark)[0]\n",
" u_res_nxcals_rcbxv_df = query_rcbxv.query_iqps_nxcals(timestamp_fgc_rcbxv, signal_names=['U_RES'], spark=spark)[0]\n",
" u_res_nxcals_rcbxh_df = query_rcbxh.query_iqps_nxcals(timestamp_fgc_rcbxh, signal_names=['U_RES'], spark=spark)[0]\n",
 
" i_meas_nxcals_rcbxv_df = query_rcbxv.query_pc_nxcals(timestamp_fgc_rcbxv, signal_names=['I_MEAS'], spark=spark)[0]\n",
" u_res_nxcals_rcbxv_df = query_rcbxv.query_iqps_nxcals(timestamp_fgc_rcbxv, signal_names=['U_RES'], spark=spark)[0]\n",
"\n",
" # QDS PM\n",
" # # RCBXH\n",
" source_timestamp_qds_rcbxh_df = query_rcbxh.find_source_timestamp_qds_board_ab(timestamp_fgc_rcbxh, duration=[(2, 's'), (2, 's')])\n",
" timestamp_qds_rcbxh = lhcsmnb.utils.get_at(source_timestamp_qds_rcbxh_df, 0, 'timestamp', default=np.nan)\n",
......
......@@ -29,27 +29,28 @@
"- If a reference signal is present, it is represented with a dashed line.\n",
"- If the main current is present, its axis is on the left. Remaining signals are attached to the axis on the right. The legend of these signals is located on the lower left and upper right, respectively.\n",
"- The grid comes from the left axis.\n",
"- The title contains timestamp, circuit name, and signal name allowing to re-access the signal.\n",
"- The plots assigned to the left scale have colors: blue (C0) and orange (C1). Plots presented on the right have colors red (C2) and green (C3).\n",
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
 
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
 
{
"cell_type": "markdown",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false
},
"outputs": [],
"source": [
"# External libraries\n",
"print('Loading (1/16)'); import pandas as pd\n",
......@@ -119,23 +120,23 @@
"fgc_pm_search = FgcPmSearchModuleMediator(DateTimeBaseModule(start_date_time='2021-01-26 00:00:00+01:00',\n",
" end_date_time='2021-01-31 00:00:00+01:00'), circuit_type='600A_RCDO')"
]
},
{
 
 
"metadata": {
"deletable": false
},
"source": [
"# 2. Query All Signals Prior to Analysis"
]
},
 
 
"cell_type": "code",
"execution_count": null,
"metadata": {
 
 
"tags": [
"skip_output"
]
},
"outputs": [],
......@@ -157,14 +158,14 @@
" i_meas_rcd_df, i_a_rcd_df, i_ref_rcd_df, i_earth_rcd_df = query_rcd.query_pc_pm(timestamp_fgc_rcd, timestamp_fgc_rcd, signal_names=['I_MEAS', 'I_A', 'I_REF', 'I_EARTH'])\n",
" events_action_rcd_df, events_symbol_rcd_df = query_rcd.query_pc_pm_events(timestamp_fgc_rcd, signal_names=['ACTION', 'SYMBOL'])\n",
" # RCO\n",
" i_meas_rco_df, i_a_rco_df, i_ref_rco_df, i_earth_rco_df = query_rco.query_pc_pm(timestamp_fgc_rco, timestamp_fgc_rco, signal_names=['I_MEAS', 'I_A', 'I_REF', 'I_EARTH'])\n",
" events_action_rco_df, events_symbol_rco_df = query_rco.query_pc_pm_events(timestamp_fgc_rco, signal_names=['ACTION', 'SYMBOL'])\n",
 
 
 
" timestamp_pic_rcd = query_rcd.find_timestamp_pic(timestamp_fgc_rcd, spark=spark)\n",
 
 
 
 
" # # RCO\n",
" timestamp_pic_rco = query_rco.find_timestamp_pic(timestamp_fgc_rco, spark=spark)\n",
"\n",
" # QDS NXCALS - To check if there was any drift of QDS cards prior to the trigger\n",
" # # RCD\n",
......
......@@ -29,27 +29,28 @@
"- If a reference signal is present, it is represented with a dashed line.\n",
"- If the main current is present, its axis is on the left. Remaining signals are attached to the axis on the right. The legend of these signals is located on the lower left and upper right, respectively.\n",
"- The grid comes from the left axis.\n",
"- The title contains timestamp, circuit name, and signal name allowing to re-access the signal.\n",
"- The plots assigned to the left scale have colors: blue (C0) and orange (C1). Plots presented on the right have colors red (C2) and green (C3).\n",
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
 
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
 
{
"cell_type": "markdown",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false
},
"outputs": [],
"source": [
"# External libraries\n",
"print('Loading (1/16)'); import pandas as pd\n",
......@@ -104,22 +105,22 @@
"**Note that 24 hours is the maximum duration of a single PM query for an event. To avoid delays in querying events, please restrict your query duration as much as possible.**"
]
},
{
"cell_type": "code",
 
 
"metadata": {
"deletable": false,
"scrolled": false,
"tags": [
"parameters"
]
},
"outputs": [],
"source": [
"circuit_type = '600A'\n",
"fgc_pm_search = FgcPmSearchModuleMediator(DateTimeBaseModule(start_date_time='2021-01-26 00:00:00+01:00',\n",
"fgc_pm_search = FgcPmSearchModuleMediator(DateTimeBaseModule(start_date_time='2021-01-26 00:00:00+01:00',\n",
" end_date_time='2021-01-31 00:00:00+01:00'), circuit_type=circuit_type)"
]
},
{
"cell_type": "markdown",
......@@ -128,14 +129,14 @@
},
"source": [
"# 2. Query All Signals Prior to Analysis"
]
},
 
 
 
 
"execution_count": null,
 
 
"deleteable": false,
"scrolled": false,
"tags": [
"skip_output"
]
......
......@@ -55,25 +55,26 @@
"- If the main current is present, its axis is on the left. Remaining signals are attached to the axis on the right. The legend of these signals is located on the lower left and upper right, respectively.\n",
"- The grid comes from the left axis.\n",
"- The title contains timestamp, circuit name, and signal name allowing to re-access the signal.\n",
"- The plots assigned to the left scale have colors: blue (C0) and orange (C1). Plots presented on the right have colors red (C2) and green (C3).\n",
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
 
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
 
{
"cell_type": "markdown",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"deletable": false
},
"outputs": [
{
"name": "stdout",
......@@ -123,11 +124,11 @@
"deleteable": false,
"tags": [
"skip_cell"
]
},
 
 
"In order to perform the analysis of a FPA in an IPD circuit please:\n",
"1. Select circuit name (e.g., RD1.L2)\n",
"2. Choose start and end time\n",
"3. Choose analysis mode (Automatic by default)\n",
"\n",
......@@ -145,12 +146,12 @@
"tags": [
"parameters"
]
},
"outputs": [],
 
 
 
 
"fgc_pm_search = FgcPmSearchModuleMediator(DateTimeBaseModule(start_date_time='2021-02-03 00:00:00+01:00',\n",
" end_date_time='2021-02-04 00:00:00+01:00'), circuit_type=circuit_type)"
]
},
{
......
......@@ -65,24 +65,25 @@
"- If a reference signal is present, it is represented with a dashed line.\n",
"- If the main current is present, its axis is on the left. Remaining signals are attached to the axis on the right. The legend of these signals is located on the lower left and upper right, respectively.\n",
"- The grid comes from the left axis.\n",
"- The title contains timestamp, circuit name, and signal name allowing to re-access the signal.\n",
"- The plots assigned to the left scale have colors: blue (C0) and orange (C1). Plots presented on the right have colors red (C2) and green (C3).\n",
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false
},
"outputs": [],
......@@ -153,11 +154,11 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
 
 
"source": [
"print('hwc_test = \\'%s\\'\\ncircuit_name = \\'%s\\'\\ncampaign = \\'%s\\'\\nt_start = \\'%s\\'\\nt_end = \\'%s\\'' % (hwc_test, circuit_name, campaign, t_start, t_end))"
]
},
{
......@@ -173,12 +174,12 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"deleteable": false,
"tags": [
 
 
 
 
},
"outputs": [],
"source": [
"circuit_type = 'IPD'\n",
"if 'hwcb' in locals():\n",
......
......@@ -72,24 +72,25 @@
"- If a reference signal is present, it is represented with a dashed line.\n",
"- If the main current is present, its axis is on the left. Remaining signals are attached to the axis on the right. The legend of these signals is located on the lower left and upper right, respectively.\n",
"- The grid comes from the left axis.\n",
"- The title contains timestamp, circuit name, and signal name allowing to re-access the signal.\n",
"- The plots assigned to the left scale have colors: blue (C0) and orange (C1). Plots presented on the right have colors red (C2) and green (C3).\n",
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false
},
"outputs": [],
......@@ -160,11 +161,11 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
 
 
"source": [
"print('hwc_test = \\'%s\\'\\ncircuit_name = \\'%s\\'\\ncampaign = \\'%s\\'\\nt_start = \\'%s\\'\\nt_end = \\'%s\\'' % (hwc_test, circuit_name, campaign, t_start, t_end))"
]
},
{
......@@ -172,12 +173,12 @@
"metadata": {
"deletable": false
},
"source": [
"# 2. Query All Signals Prior to Analysis"
 
 
 
 
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deleteable": false,
......
......@@ -74,23 +74,24 @@
"- If a reference signal is present, it is represented with a dashed line.\n",
"- If the main current is present, its axis is on the left. Remaining signals are attached to the axis on the right. The legend of these signals is located on the lower left and upper right, respectively.\n",
"- The grid comes from the left axis.\n",
"- The title contains timestamp, circuit name, and signal name allowing to re-access the signal.\n",
"- The plots assigned to the left scale have colors: blue (C0) and orange (C1). Plots presented on the right have colors red (C2) and green (C3).\n",
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
"cell_type": "markdown",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false
},
......@@ -163,11 +164,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
 
 
"print('hwc_test = \\'%s\\'\\ncircuit_name = \\'%s\\'\\ncampaign = \\'%s\\'\\nt_start = \\'%s\\'\\nt_end = \\'%s\\'' % (hwc_test, circuit_name, campaign, t_start, t_end))"
]
},
{
"cell_type": "markdown",
......@@ -187,12 +188,12 @@
"skip_output"
]
},
"outputs": [],
"source": [
 
 
 
 
" 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",
......
......@@ -74,24 +74,25 @@
"- If a reference signal is present, it is represented with a dashed line.\n",
"- If the main current is present, its axis is on the left. Remaining signals are attached to the axis on the right. The legend of these signals is located on the lower left and upper right, respectively.\n",
"- The grid comes from the left axis.\n",
"- The title contains timestamp, circuit name, and signal name allowing to re-access the signal.\n",
"- The plots assigned to the left scale have colors: blue (C0) and orange (C1). Plots presented on the right have colors red (C2) and green (C3).\n",
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false
},
"outputs": [],
......@@ -164,11 +165,11 @@
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"print('hwc_test = \\'%s\\'\\ncircuit_name = \\'%s\\'\\ncampaign = \\'%s\\'\\nt_start = \\'%s\\'\\nt_end = \\'%s\\'' % (hwc_test, circuit_name, campaign, t_start, t_end))"
"print('hwc_test = \\'%s\\'\\ncircuit_name = \\'%s\\'\\ncampaign = \\'%s\\'\\nt_start = \\'%s\\'\\nt_end = \\'%s\\'' % (hwc_test, circuit_name, campaign, t_start, t_end))"
]
},
{
"cell_type": "markdown",
"metadata": {
......@@ -178,12 +179,12 @@
"# 2. Query All Signals Prior to Analysis"
]
},
{
"cell_type": "code",
 
 
 
 
"deleteable": false,
"tags": [
"skip_output"
]
},
......
......@@ -76,24 +76,25 @@
"- If a reference signal is present, it is represented with a dashed line.\n",
"- If the main current is present, its axis is on the left. Remaining signals are attached to the axis on the right. The legend of these signals is located on the lower left and upper right, respectively.\n",
"- The grid comes from the left axis.\n",
"- The title contains timestamp, circuit name, and signal name allowing to re-access the signal.\n",
"- The plots assigned to the left scale have colors: blue (C0) and orange (C1). Plots presented on the right have colors red (C2) and green (C3).\n",
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
"- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
"- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
 
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "markdown",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false
},
"outputs": [],
......@@ -165,11 +166,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
 
 
"print('hwc_test = \\'%s\\'\\ncircuit_name = \\'%s\\'\\ncampaign = \\'%s\\'\\nt_start = \\'%s\\'\\nt_end = \\'%s\\'' % (hwc_test, circuit_name, campaign, t_start, t_end))"
]
},
{
"cell_type": "markdown",
......@@ -186,12 +187,12 @@
"metadata": {
"deleteable": false,
"tags": [
"skip_output"
]
 
 
 
 
"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",
......
......@@ -81,24 +81,25 @@
"- If a reference signal is present, it is represented with a dashed line.\n",