Commit 3ce7aa5c authored by thbuffet's avatar thbuffet
Browse files

SIGMON-53 adapt all notebooks to refactoring

parent e93bd33f
Pipeline #2555397 passed with stage
in 14 seconds
...@@ -506,7 +506,7 @@ ...@@ -506,7 +506,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"if u_hds_dfs:\n", "if u_hds_dfs:\n",
" analysis.analyze_qh(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n", " analysis.analyze_single_qh_voltage_with_ref(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n",
"else:\n", "else:\n",
" print('No Quench Heater discharges!')" " print('No Quench Heater discharges!')"
] ]
......
...@@ -422,7 +422,7 @@ ...@@ -422,7 +422,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"if u_hds_dfs:\n", "if u_hds_dfs:\n",
" analysis.analyze_qh(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n", " analysis.analyze_single_qh_voltage_with_ref(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n",
"else:\n", "else:\n",
" print('No Quench Heater discharges!')" " print('No Quench Heater discharges!')"
] ]
......
...@@ -536,7 +536,7 @@ ...@@ -536,7 +536,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"if u_hds_dfs:\n", "if u_hds_dfs:\n",
" analysis.analyze_qh(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n", " analysis.analyze_single_qh_voltage_with_ref(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n",
"else:\n", "else:\n",
" print('No Quench Heater discharges!')" " print('No Quench Heater discharges!')"
] ]
......
...@@ -462,7 +462,7 @@ ...@@ -462,7 +462,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"if u_hds_dfs:\n", "if u_hds_dfs:\n",
" analysis.analyze_qh(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n", " analysis.analyze_single_qh_voltage_with_ref(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n",
"else:\n", "else:\n",
" print('No Quench Heater discharges!')" " print('No Quench Heater discharges!')"
] ]
......
...@@ -425,7 +425,7 @@ ...@@ -425,7 +425,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"if u_hds_dfs:\n", "if u_hds_dfs:\n",
" ipq_analysis.analyze_qh(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n", " ipq_analysis.analyze_single_qh_voltage_with_ref(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n",
"else:\n", "else:\n",
" print('No Quench Heater discharges!')" " print('No Quench Heater discharges!')"
] ]
......
...@@ -606,7 +606,7 @@ ...@@ -606,7 +606,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"if u_hds_dfs:\n", "if u_hds_dfs:\n",
" ipq_analysis.analyze_qh(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n", " ipq_analysis.analyze_single_qh_voltage_with_ref(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n",
"else:\n", "else:\n",
" print('No Quench Heater discharges!')" " print('No Quench Heater discharges!')"
] ]
......
...@@ -567,7 +567,7 @@ ...@@ -567,7 +567,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"if u_hds_dfs:\n", "if u_hds_dfs:\n",
" it_analysis.analyze_qh(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n", " it_analysis.analyze_single_qh_voltage_with_ref(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n",
"else:\n", "else:\n",
" print('No Quench Heater discharges!')" " print('No Quench Heater discharges!')"
] ]
......
...@@ -612,7 +612,7 @@ ...@@ -612,7 +612,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"if u_hds_dfs:\n", "if u_hds_dfs:\n",
" it_analysis.analyze_qh(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n", " it_analysis.analyze_single_qh_voltage_with_ref(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n",
"else:\n", "else:\n",
" print('No Quench Heater discharges!')" " print('No Quench Heater discharges!')"
] ]
......
...@@ -679,7 +679,7 @@ ...@@ -679,7 +679,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"if u_hds_dfs:\n", "if u_hds_dfs:\n",
" it_analysis.analyze_qh(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n", " it_analysis.analyze_single_qh_voltage_with_ref(circuit_name, timestamp_qds, u_hds_dfs, u_hds_ref_dfs)\n",
"else:\n", "else:\n",
" print('No Quench Heater discharges!')" " print('No Quench Heater discharges!')"
] ]
......
...@@ -112,7 +112,10 @@ ...@@ -112,7 +112,10 @@
"index = 0\n", "index = 0\n",
"for u_hds_dfs, u_hds_ref_dfs in zip(u_hds_dfss, u_hds_ref_dfss):\n", "for u_hds_dfs, u_hds_ref_dfs in zip(u_hds_dfss, u_hds_ref_dfss):\n",
" print(index, qh_pm_search.source_timestamp_df.loc[index, 'timestamp'])\n", " print(index, qh_pm_search.source_timestamp_df.loc[index, 'timestamp'])\n",
" ipd_analysis.analyze_qh(qh_pm_search.get_circuit_name(), qh_pm_search.source_timestamp_df.loc[index, 'timestamp'], u_hds_dfs, u_hds_ref_dfs, nominal_voltage=qh_pm_search.get_discharge_level())\n", " if u_hds_dfs:\n",
" ipd_analysis.analyze_single_qh_voltage_with_ref(qh_pm_search.get_circuit_name(), qh_pm_search.source_timestamp_df.loc[index, 'timestamp'], u_hds_dfs, u_hds_ref_dfs, nominal_voltage=qh_pm_search.get_discharge_level())\n",
" else:\n",
" print(f\"No Quench Heater Discharges !\")\n",
" index += 1" " index += 1"
] ]
}, },
......
...@@ -111,7 +111,10 @@ ...@@ -111,7 +111,10 @@
"index = 0\n", "index = 0\n",
"for u_hds_dfs, u_hds_ref_dfs in zip(u_hds_dfss, u_hds_ref_dfss):\n", "for u_hds_dfs, u_hds_ref_dfs in zip(u_hds_dfss, u_hds_ref_dfss):\n",
" print(index, qh_pm_search.source_timestamp_df.loc[index, 'timestamp'])\n", " print(index, qh_pm_search.source_timestamp_df.loc[index, 'timestamp'])\n",
" ipq_analysis.analyze_qh(qh_pm_search.get_circuit_name(), qh_pm_search.source_timestamp_df.loc[index, 'timestamp'], u_hds_dfs, u_hds_ref_dfs, nominal_voltage=qh_pm_search.get_discharge_level())\n", " if u_hds_dfs:\n",
" ipq_analysis.analyze_single_qh_voltage_with_ref(qh_pm_search.get_circuit_name(), qh_pm_search.source_timestamp_df.loc[index, 'timestamp'], u_hds_dfs, u_hds_ref_dfs, nominal_voltage=qh_pm_search.get_discharge_level())\n",
" else:\n",
" print(f\"No Quench Heater Discharges!\")\n",
" index += 1" " index += 1"
] ]
}, },
......
...@@ -112,8 +112,11 @@ ...@@ -112,8 +112,11 @@
"source": [ "source": [
"index = 0\n", "index = 0\n",
"for u_hds_dfs, u_hds_ref_dfs in zip(u_hds_dfss, u_hds_ref_dfss):\n", "for u_hds_dfs, u_hds_ref_dfs in zip(u_hds_dfss, u_hds_ref_dfss):\n",
" print(index, qh_pm_search.source_timestamp_df.loc[index, 'timestamp'])\n", " if u_hds_dfs:\n",
" it_analysis.analyze_qh(qh_pm_search.get_circuit_name(), qh_pm_search.source_timestamp_df.loc[index, 'timestamp'], u_hds_dfs, u_hds_ref_dfs, nominal_voltage=qh_pm_search.get_discharge_level())\n", " print(index, qh_pm_search.source_timestamp_df.loc[index, 'timestamp'])\n",
" it_analysis.analyze_single_qh_voltage_with_ref(qh_pm_search.get_circuit_name(), qh_pm_search.source_timestamp_df.loc[index, 'timestamp'], u_hds_dfs, u_hds_ref_dfs, nominal_voltage=qh_pm_search.get_discharge_level())\n",
" else:\n",
" print(f\"No Quench Heater discharges for {qh_pm_search.get_circuit_name()} on time {qh_pm_search.source_timestamp_df.loc[index, 'timestamp']}!\")\n",
" index += 1" " index += 1"
] ]
}, },
......
This diff is collapsed.
...@@ -876,8 +876,11 @@ ...@@ -876,8 +876,11 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"%matplotlib inline\n", "%matplotlib inline\n",
"rb_analysis.analyze_qh(source_timestamp_qh_df, u_hds_dfs, i_hds_dfs, u_hds_ref_dfs, i_hds_ref_dfs)\n", "if u_hds_dfs:\n",
"rb_analysis.results_table[['Circuit Name', 'Position', 'Delta_t(iQPS-PIC)', 'I_Q_circ', 'I_Q_M', 'Delta_t(nQPS-PIC)', 'QDS trigger origin', 'QH analysis']]" " rb_analysis.analyze_single_qh_voltage_current_with_ref(source_timestamp_qh_df, u_hds_dfs, i_hds_dfs, u_hds_ref_dfs, i_hds_ref_dfs)\n",
" rb_analysis.results_table[['Circuit Name', 'Position', 'Delta_t(iQPS-PIC)', 'I_Q_circ', 'I_Q_M', 'Delta_t(nQPS-PIC)', 'QDS trigger origin', 'QH analysis']]\n",
"else:\n",
" print('No Quench Heater discharges!')"
] ]
}, },
{ {
......
...@@ -820,9 +820,11 @@ ...@@ -820,9 +820,11 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"rb_analysis.analyze_qh(source_timestamp_qh_df, u_hds_dfs, i_hds_dfs, u_hds_ref_dfs, i_hds_ref_dfs)\n", "if u_hds_dfs:\n",
"\n", " rb_analysis.analyze_single_qh_voltage_current_with_ref(source_timestamp_qh_df, u_hds_dfs, i_hds_dfs, u_hds_ref_dfs, i_hds_ref_dfs)\n",
"rb_analysis.results_table[['Circuit Name', 'Position', 'Delta_t(iQPS-PIC)','I_Q_circ', 'Delta_t(nQPS-PIC)', 'QDS trigger origin', 'QH analysis']]" " rb_analysis.results_table[['Circuit Name', 'Position', 'Delta_t(iQPS-PIC)','I_Q_circ', 'Delta_t(nQPS-PIC)', 'QDS trigger origin', 'QH analysis']]\n",
"else:\n",
" print(f\"No quench heater discharges!\")"
] ]
}, },
{ {
......
...@@ -829,13 +829,16 @@ ...@@ -829,13 +829,16 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"%matplotlib inline\n", "%matplotlib inline\n",
"if Time.to_unix_timestamp(timestamp_fgc_rqd) > 1577833200000000000:\n", "if u_hds_rq_dfs:\n",
" from lhcsmapi.analysis.qh.QuenchHeaterAnalysis import QuenchHeaterRbAnalysis\n", " if Time.to_unix_timestamp(timestamp_fgc_rqd) > 1577833200000000000:\n",
" QuenchHeaterRbAnalysis(circuit_type, rq_analysis.results_table).analyze_qh(source_timestamp_qh_rq_df, u_hds_rq_dfs, i_hds_rq_dfs, u_hds_rq_ref_dfs, i_hds_rq_ref_dfs)\n", " from lhcsmapi.analysis.qh.QuenchHeaterAnalysis import QuenchHeaterRbAnalysis\n",
"else:\n", " QuenchHeaterRbAnalysis(circuit_type, rq_analysis.results_table).analyze_single_qh_voltage_current_with_ref(source_timestamp_qh_rq_df, u_hds_rq_dfs, i_hds_rq_dfs, u_hds_rq_ref_dfs, i_hds_rq_ref_dfs)\n",
" rq_analysis.analyze_qh(source_timestamp_qh_rq_df, circuit_type, u_hds_rq_dfs, u_hds_rq_ref_dfs)\n", " else:\n",
" rq_analysis.analyze_single_qh_voltage_with_ref(source_timestamp_qh_rq_df, circuit_type, u_hds_rq_dfs, u_hds_rq_ref_dfs)\n",
"\n", "\n",
"rq_analysis.results_table[['Circuit Name', 'Position', 'Delta_t(iQPS-PIC)','I_Q_RQD', 'I_Q_RQF', 'QH analysis']]" " rq_analysis.results_table[['Circuit Name', 'Position', 'Delta_t(iQPS-PIC)','I_Q_RQD', 'I_Q_RQF', 'QH analysis']]\n",
"else:\n",
" print(f\"No Quench heater Discharges!\")"
] ]
}, },
{ {
......
...@@ -837,12 +837,15 @@ ...@@ -837,12 +837,15 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"%matplotlib inline\n", "%matplotlib inline\n",
"if Time.to_unix_timestamp(timestamp_fgc_rqd) > 1577833200000000000:\n", "if u_hds_rq_dfs:\n",
" rq_analysis.analyze_qh_voltage_current(source_timestamp_qh_rq_df, u_hds_rq_dfs, i_hds_rq_dfs, u_hds_rq_ref_dfs, i_hds_rq_ref_dfs)\n", " if Time.to_unix_timestamp(timestamp_fgc_rqd) > 1577833200000000000:\n",
"else:\n", " rq_analysis.analyze_single_qh_voltage_current_with_ref(source_timestamp_qh_rq_df, u_hds_rq_dfs, i_hds_rq_dfs, u_hds_rq_ref_dfs, i_hds_rq_ref_dfs)\n",
" rq_analysis.analyze_qh(source_timestamp_qds_rq_df, circuit_type, u_hds_rq_dfs, u_hds_rq_ref_dfs)\n", " else:\n",
" rq_analysis.analyze_single_qh_voltage_with_ref(source_timestamp_qds_rq_df, circuit_type, u_hds_rq_dfs, u_hds_rq_ref_dfs)\n",
"\n", "\n",
"rq_analysis.results_table[['Circuit Name', 'Position', 'Date (FGC)', 'Time (FGC)', 'I_Q_MQD', 'I_Q_MQF', 'QH analysis']]" " rq_analysis.results_table[['Circuit Name', 'Position', 'Date (FGC)', 'Time (FGC)', 'I_Q_MQD', 'I_Q_MQF', 'QH analysis']]\n",
"else:\n",
" print(f\"No Quench Heater Discharges!\")"
] ]
}, },
{ {
......
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