Commit 9fbedc59 authored by Aleksandra Mnich's avatar Aleksandra Mnich
Browse files

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

[SIGMON-145] notebook syntax fixes

See merge request !53
parents 6e07335d 4bc756c6
Pipeline #3167299 failed with stages
in 174 minutes and 17 seconds
......@@ -130,11 +130,11 @@
"source": [
"# 2. Query All Signals Prior to Analysis"
]
},
{
 
"cell_type": "code",
"execution_count": null,
"metadata": {
"deleteable": false,
"scrolled": false,
"tags": [
......
......@@ -53,25 +53,26 @@
"- 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",
"metadata": {
"deletable": false
},
"source": [
"# 0. Initialise Working Environment"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false
},
"outputs": [],
"source": [
......@@ -165,11 +166,11 @@
"metadata": {
"deleteable": false,
"tags": [
"skip_output"
]
 
 
"outputs": [],
"source": [
"circuit_type = 'IPQ'\n",
"if 'hwcb' in locals():\n",
" circuit_name = hwcb.get_circuit_name()\n",
......
......@@ -173,13 +173,13 @@
" t_end = Time.to_unix_timestamp(t_end)\n",
" t_start_ref, t_end_ref = HwcSearchModuleMediator.get_last_ref_start_end_time('/eos/project/l/lhcsm/hwc/HWC_Summary.csv', circuit_name, hwc_test, Time.to_string_short(t_start))\n",
" t_start_ref, t_end_ref = Time.to_unix_timestamp(t_start_ref), Time.to_unix_timestamp(t_end_ref)\n",
" is_automatic = False\n",
"\n",
 
"rb_query = RbCircuitQuery(circuit_type, circuit_name, max_executions=28)\n",
"rb_analysis = RbCircuitAnalysis(circuit_type, results_table=None, is_automatic=is_automatic)\n",
 
"\n",
"with Timer():\n",
" # PC\n",
" i_meas_nxcals_df = rb_query.query_signal_nxcals(t_start, t_end, t0=t_start, system='PC', signal_names='I_MEAS', spark=spark)[0] \n",
"\n",
" source_timestamp_pc = rb_query.find_source_timestamp_pc(t_start, t_end)\n",
......
......@@ -150,13 +150,13 @@
" t_start = Time.to_unix_timestamp(hwcb.get_start_time())\n",
" t_end = Time.to_unix_timestamp(hwcb.get_end_time())\n",
" t_start_ref = Time.to_unix_timestamp(hwcb.get_ref_start_time())\n",
" t_end_ref = Time.to_unix_timestamp(hwcb.get_ref_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_ref, t_end_ref = HwcSearchModuleMediator.get_last_ref_start_end_time('/eos/project/l/lhcsm/hwc/HWC_Summary.csv', circuit_name, hwc_test, Time.to_string_short(t_start))\n",
" t_start_ref, t_end_ref = Time.to_unix_timestamp(t_start_ref), Time.to_unix_timestamp(t_end_ref)\n",
" if 'is_automatic' not in locals():\n",
" is_automatic = False\n",
" \n",
......@@ -253,11 +253,11 @@
"\n",
" # DFB\n",
" source_timestamp_leads_odd_df = rb_query.find_timestamp_leads(timestamp_fgc, 'LEADS_ODD')\n",
" u_hts_odd_dfs = rb_query.query_leads(timestamp_fgc, source_timestamp_leads_odd_df, system='LEADS_ODD', signal_names=['U_HTS'], spark=spark)\n",
" u_res_odd_dfs = rb_query.query_leads(timestamp_fgc, source_timestamp_leads_odd_df, system='LEADS_ODD', signal_names=['U_RES'], spark=spark)\n",
"\n",
 
" source_timestamp_leads_even_df = rb_query.find_timestamp_leads(timestamp_fgc, 'LEADS_EVEN')\n",
" u_hts_even_dfs = rb_query.query_leads(timestamp_fgc, source_timestamp_leads_even_df, system='LEADS_EVEN', signal_names=['U_HTS'], spark=spark)\n",
" u_res_even_dfs = rb_query.query_leads(timestamp_fgc, source_timestamp_leads_even_df, system='LEADS_EVEN', signal_names=['U_RES'], spark=spark)\n",
"\n",
" # EE after 3 hours\n",
......
......@@ -180,11 +180,11 @@
"\n",
"with Timer():\n",
" # PC\n",
" i_meas_nxcals_df = rb_query.query_signal_nxcals(t_start, t_end, t0=t_start, system='PC', signal_names='I_MEAS', spark=spark)[0] \n",
"\n",
" source_timestamp_pc = rb_query.find_source_timestamp_pc(t_start, t_end)\n",
 
" timestamp_fgc = source_timestamp_pc.at[0, 'timestamp']\n",
" \n",
" i_meas_df, i_a_df, i_ref_df, i_earth_df, i_earth_pcnt_df, v_meas_df = rb_query.query_pc_pm(timestamp_fgc, timestamp_fgc, signal_names=['I_MEAS', 'I_A', 'I_REF', 'I_EARTH', 'I_EARTH_PCNT', 'V_MEAS'])\n",
" \n",
" # PC Reference\n",
......
......@@ -157,11 +157,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deleteable": false,
 
"scrolled": false,
"tags": [
"skip_output"
]
},
"outputs": [],
......
......@@ -205,14 +205,14 @@
if len(source_timestamp_ee_rqd_ref_df) > 1:
t_res_1_rqd_ref_df = rqd_query.query_ee_t_res_pm(lhcsmnb.utils.get_at(source_timestamp_ee_rqd_ref_df, 1, 'timestamp'), timestamp_fgc_rqd_ref, system='EE', signal_names=['T_RES'])[0]
else:
t_res_1_rqd_ref_df = pd.DataFrame(columns=['T_RES'])
u_dump_res_rqf_ref_df = rqf_query.query_ee_u_dump_res_pm(source_timestamp_ee_rqf_ref_df, 0, 'timestamp'), timestamp_fgc_rqf_ref, system='EE', signal_names=['U_DUMP_RES'])[0]
t_res_0_rqf_ref_df = rqf_query.query_ee_t_res_pm(source_timestamp_ee_rqf_ref_df, 0, 'timestamp'), timestamp_fgc_rqf_ref, system='EE', signal_names=['T_RES'])[0]
u_dump_res_rqf_ref_df = rqf_query.query_ee_u_dump_res_pm(lhcsmnb.utils.get_at(source_timestamp_ee_rqf_ref_df, 0, 'timestamp'), timestamp_fgc_rqf_ref, system='EE', signal_names=['U_DUMP_RES'])[0]
t_res_0_rqf_ref_df = rqf_query.query_ee_t_res_pm(lhcsmnb.utils.get_at(source_timestamp_ee_rqf_ref_df, 0, 'timestamp'), timestamp_fgc_rqf_ref, system='EE', signal_names=['T_RES'])[0]
if len(source_timestamp_ee_rqf_ref_df) > 1:
t_res_1_rqf_ref_df = rqf_query.query_ee_t_res_pm(source_timestamp_ee_rqf_ref_df, 1, 'timestamp'), timestamp_fgc_rqf_ref, system='EE', signal_names=['T_RES'])[0]
t_res_1_rqf_ref_df = rqf_query.query_ee_t_res_pm(lhcsmnb.utils.get_at(source_timestamp_ee_rqf_ref_df, 1, 'timestamp'), timestamp_fgc_rqf_ref, system='EE', signal_names=['T_RES'])[0]
else:
t_res_1_rqf_ref_df = pd.DataFrame(columns=['T_RES'])
t_pnob3 = (plateau_end[-1]-plateau_start[-1])/1e9
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment