Commit 13238f17 authored by Michal Maciejewski's avatar Michal Maciejewski
Browse files

Upgraded RB and RQ

parent 80b20a1e
......@@ -127,11 +127,11 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
 
"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')"
]
},
......@@ -139,11 +139,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 2. Query All Signals Prior to Analysis"
]
},
 
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
......@@ -276,5 +276,11 @@
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 5.1. Resistive Voltage\n",
"\n",
"*GRAPHS*: \n",
"\n",
"- t = 0 s corresponds to the start of the test"
......
......@@ -132,11 +132,11 @@
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"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')"
]
},
{
......@@ -145,11 +145,11 @@
"source": [
"# 2. Query All Signals Prior to Analysis"
]
},
{
"cell_type": "code",
 
"execution_count": null,
"metadata": {
"tags": [
"skip_output"
]
......@@ -315,19 +315,19 @@
"- Threshold on U_RES_B1: 100 mV, 10 ms\n",
"- U_RES_B2, U_1_B2, U_2_B2 and U_INDUCT_B2 are given for diagnostics only\n",
"- Signals are measured with -2.5 V offset and with the gain factor = 0.0012\n",
"- *Attention: B1 signals and B2 singals can be shifted by 4 ms from each other*\n",
"- If pure inductive signal and di/dt < 0:\n",
" - U_1_B1 = L di/dt < 0\n",
" - U_1_B1 = L di/dt < 0\n",
" - U_2_B1 = -L di/dt < 0\n",
" \n",
"- PM file\n",
" - Buffer range 501 to 1500, event at point 1000\n",
" - Time range: -2 to 2 s\n",
" - Frequency: 250 Hz (dt = 4 ms)"
]
 
 
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 5.1. Resistive Voltage\n",
......@@ -344,5 +344,11 @@
"editable": false
},
"outputs": [],
"source": [
"analysis.plot_u_res(circuit_name, timestamp_fgc, u_res_df, i_meas_df)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
......
......@@ -134,11 +134,11 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"editable": false
},
"outputs": [],
 
"source": [
"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')"
]
......@@ -147,11 +147,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 2. Query All Signals Prior to Analysis"
]
},
 
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"editable": false,
......
......@@ -139,11 +139,11 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"editable": false
},
"outputs": [],
 
"source": [
"circuit_type = 'IPD'\n",
"hwc_test = 'PNO.c6'\n",
"hwcb = HwcSearchModuleMediator(circuit_type=circuit_type, hwc_test=hwc_test, hwc_summary_path='/eos/project/l/lhcsm/hwc/HWC_Summary.csv')"
]
......@@ -152,11 +152,11 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"# 2. Query All Signals Prior to Analysis"
]
},
 
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"tags": [
......@@ -354,5 +354,11 @@
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"editable": false
},
"outputs": [],
"source": [
"res_df = pd.DataFrame({'R_RES': {'R': res}})\n",
"analysis.analyze_busbar_magnet_resistance(res_df, 'R_RES', 5e-9)"
......
......@@ -416,14 +416,14 @@
"source": [
"u_res_b1_slope_df = ipq_analysis.calculate_u_res_slope(u_res_b1_df, col_name='dU_RES_dt_B1')\n",
"u_res_b2_slope_df = ipq_analysis.calculate_u_res_slope(u_res_b2_df, col_name='dU_RES_dt_B2')\n",
"xcenter = (u_res_b1_slope_df.index[0] + u_res_b2_slope_df.index[0]) / 2\n",
"xlim = (xcenter - 0.1, xcenter + 0.2)\n",
"ipq_analysis.plot_u_res_u_res_slope_u_1_u_2(circuit_name+'B1', timestamp_qds, u_res_b1_df, u_res_b1_slope_df, u_1_b1_df, u_2_b1_df, suffix='_B1', xlim=xlim)"
]
},
{
"ipq_analysis.plot_u_res_u_res_slope_u_1_u_2(circuit_name+'B1', timestamp_qds, u_res_b1_df, u_res_b1_slope_df, u_1_b1_df, u_2_b1_df, suffix='_B1', xlim=xlim)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
......
......@@ -110,10 +110,13 @@
"import lhcsmapi.pyedsl.SignalTransformationBuilder as SignalTransformationBuilder\n",
"from lhcsmapi.pyedsl.AssertionBuilder import AssertionBuilder\n",
"from lhcsmapi.analysis.ItCircuitQuery import ItCircuitQuery\n",
"from lhcsmapi.analysis.ItCircuitAnalysis import ItCircuitAnalysis\n",
"\n",
"# GUI\n",
"from lhcsmapi.gui.hwc.HwcSearchModuleMediator import HwcSearchModuleMediator\n",
"\n",
"analysis_start_time = datetime.now().strftime(\"%Y.%m.%d_%H%M%S\")\n",
"\n",
"import lhcsmapi\n",
"print('Analysis executed with lhcsmapi version: {}'.format(lhcsmapi.__version__))\n",
"\n",
......@@ -163,16 +166,46 @@
"hwc_test = 'PNO.d14'\n",
"hwcb = HwcSearchModuleMediator(circuit_type=circuit_type, hwc_test=hwc_test, hwc_summary_path='/eos/project/l/lhcsm/hwc/HWC_Summary.csv')"
]
},
{
" i_meas_rtqx1_nxcals_df.rename(columns={\"I_MEAS\": \"I_MEAS_RTQX1\"}, inplace=True)\n",
"cell_type": "markdown",
"metadata": {},
"source": [
"# 2. Query All Signals Prior to Analysis"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"deletable": false,
"tags": [
"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",
"author = hwcb.get_author()\n",
"is_automatic = hwcb.is_automatic_mode()\n",
"\n",
"it_query = ItCircuitQuery(circuit_type, circuit_name, max_executions=7)\n",
"it_analysis = ItCircuitAnalysis(circuit_type, results_table=None, is_automatic=is_automatic)\n",
"\n",
"with Timer():\n",
" # PC - NXCALS\n",
" i_meas_rqx_nxcals_df, i_meas_rtqx1_nxcals_df, i_meas_rtqx2_nxcals_df = it_query.query_signal_nxcals(t_start, t_end, t0=t_start, system='PC', signal_names='I_MEAS', spark=spark)\n",
" i_meas_rqx_nxcals_df.rename(columns={\"I_MEAS\": \"I_MEAS_RQX\"}, inplace=True)\n",
" i_meas_rtqx1_nxcals_df.rename(columns={\"I_MEAS\": \"I_MEAS_RTQX1\"}, inplace=True)\n",
" i_meas_rtqx2_nxcals_df.rename(columns={\"I_MEAS\": \"I_MEAS_RTQX2\"}, inplace=True)\n",
" i_meas_raw_dfs = it_query.query_raw_signal_nxcals(t_start, t_end, system='PC', signal_names='I_MEAS', spark=spark)\n",
" \n",
" # I_Q1 = I_RQX + I_RTQX1\n",
" i_meas_q1_nxcals_df = SignalTransformationBuilder.add_two_dataframes(i_meas_rqx_nxcals_df, i_meas_rtqx1_nxcals_df, col_name='I_MEAS_Q1')\n",
" # I_Q2 = I_RQX + I_RTQX2\n",
" i_meas_q2_nxcals_df = SignalTransformationBuilder.add_two_dataframes(i_meas_rqx_nxcals_df, i_meas_rtqx2_nxcals_df, col_name='I_MEAS_Q2')\n",
" # I_Q3 = I_RQX\n",
" i_meas_q3_nxcals_df = pd.DataFrame(index=i_meas_rqx_nxcals_df.index, data=i_meas_rqx_nxcals_df.values, columns=['I_MEAS_Q3'])\n",
"\n",
......
,I_ERR_MA_RQX
24.113,-2.0
24.613,-17.0
25.113,-8.0
25.613,2.0
27.613,1.0
28.113,-8.0
28.613,-7.0
29.113,1.0
29.613,13.0
30.113,-3.0
31.113,-2.0
31.613,3.0
32.113,-2.0
33.613,-1.0
34.113,3.0
34.613,-1.0
35.113,-2.0
73.613,1.0
74.113,3.0
75.613,-1.0
76.113,-3.0
77.113,0.0
77.613,2.0
78.113,-5.0
78.613,0.0
174.113,-2.0
174.613,-5.0
175.113,0.0
260.613,0.0
261.113,-6.0
261.613,-1.0
266.113,0.0
266.613,6.0
267.113,0.0
317.613,1.0
318.113,-6.0
318.613,1.0
337.113,1.0
338.113,-4.0
340.613,0.0
341.113,2.0
341.613,-3.0
348.113,0.0
348.613,2.0
353.113,1.0
353.613,-3.0
359.113,1.0
359.613,2.0
365.113,-2.0
365.613,-3.0
366.613,0.0
367.113,2.0
367.613,-1.0
368.113,-3.0
370.113,-2.0
370.613,2.0
373.613,-1.0
374.113,-3.0
376.113,0.0
376.613,2.0
381.113,-2.0
381.613,-3.0
382.113,2.0
382.613,-1.0
383.113,-3.0
385.613,-3.0
386.113,3.0
386.613,-3.0
387.113,0.0
387.613,2.0
391.113,1.0
391.613,-3.0
401.113,-1.0
401.613,3.0
402.113,-1.0
402.613,-2.0
419.113,2.0
419.613,3.0
423.113,-1.0
423.613,-2.0
434.113,0.0
434.613,5.0
435.113,1.0
437.113,-1.0
521.113,0.0
521.613,4.0
522.113,0.0
522.613,-4.0
523.113,-2.0
523.613,1.0
561.613,1.0
562.113,-4.0
562.613,2.0
568.113,0.0
569.613,-3.0
571.113,-2.0
571.613,2.0
573.113,-1.0
575.113,-3.0
576.613,0.0
577.113,2.0
582.113,-1.0
582.613,-3.0
583.113,3.0
583.613,-4.0
585.613,-3.0
586.113,1.0
597.113,0.0
597.613,-4.0
599.113,-2.0
601.113,1.0
645.113,-1.0
645.613,-5.0
646.113,-1.0
647.113,1.0
654.613,0.0
655.613,-4.0
657.113,0.0
657.613,1.0
673.613,-1.0
674.113,-4.0
674.613,2.0
675.113,-3.0
676.113,-1.0
677.113,4.0
677.613,1.0
678.113,-1.0
707.113,2.0
707.613,4.0
708.113,-1.0
802.613,0.0
803.113,4.0
803.613,-1.0
833.113,0.0
834.113,-6.0
834.613,0.0
875.613,-1.0
876.113,-5.0
877.113,-3.0
877.613,0.0
915.113,1.0
915.613,-5.0
916.113,-1.0
916.613,0.0
924.113,1.0
924.613,-5.0
925.113,-2.0
925.613,0.0
977.613,-2.0
978.113,-6.0
978.613,-2.0
979.113,-1.0
1011.613,0.0
1012.613,5.0
1013.113,-1.0
1101.113,2.0
1101.613,4.0
1102.113,0.0
1102.613,-2.0
1129.613,-3.0
1130.113,3.0
1132.113,2.0
1132.613,-2.0
1201.613,-2.0
1202.113,3.0
1202.613,1.0
1203.113,-4.0
1206.613,-1.0
1207.113,1.0
1208.113,-4.0
1208.613,0.0
1209.613,1.0
1221.113,-2.0
1221.613,-4.0
1222.113,1.0
1254.113,-1.0
1254.613,-4.0
1262.613,-1.0
1264.113,1.0
1285.613,1.0
1286.113,-5.0
1288.613,-2.0
1289.113,0.0
1361.113,0.0
1362.113,-6.0
1362.613,0.0
1480.113,-2.0
1480.613,-5.0
1481.113,0.0
1828.613,0.0
1829.113,-5.0
1829.613,-1.0
1830.113,1.0
1838.113,-2.0
1838.613,-5.0
1839.113,0.0
1890.113,1.0
1890.613,-5.0
1891.113,1.0
1907.113,-1.0
1908.113,-4.0
1912.613,0.0
1913.613,2.0
1917.113,-2.0
1917.613,-3.0
1919.613,0.0
1920.113,3.0
1920.613,0.0
1921.113,-4.0
1922.113,-1.0
1922.613,5.0
1923.113,0.0
2087.113,0.0
2087.613,-5.0
2088.113,-1.0
2088.613,1.0
2110.113,-2.0
2110.613,-5.0
2111.113,0.0
2229.613,1.0
2230.613,5.0
2231.113,-3.0
2235.113,-1.0
2235.613,2.0
2247.613,1.0
2248.113,-3.0
2252.113,1.0
2253.113,3.0
2255.113,-1.0
2255.613,-3.0
2262.113,1.0
2262.613,2.0
2264.613,-1.0
2265.613,-4.0
2269.113,-2.0
2269.613,1.0
2287.613,2.0
2288.113,-4.0
2289.613,-1.0
2290.113,1.0
2312.113,-1.0
2312.613,-5.0
2313.113,-1.0
2313.613,2.0
2315.113,0.0
2317.113,-3.0
2321.613,-3.0
2322.113,2.0
2324.613,0.0
2325.113,-4.0
2325.613,-2.0
2326.113,1.0
2345.113,-2.0
2345.613,-4.0
2346.113,1.0
2360.613,-2.0
2361.113,-5.0
2363.113,-2.0
2364.113,2.0
2366.113,-2.0
2366.613,-3.0
2368.113,-2.0
2368.613,2.0
2370.613,3.0
2371.113,-4.0
2371.613,-2.0
2372.113,1.0
2403.613,1.0
2404.113,-5.0
2404.613,1.0
2409.113,-1.0
2409.613,-4.0
2410.613,0.0
2412.113,4.0
2412.613,-2.0
2413.613,-1.0
2414.113,3.0
2414.613,-1.0
2415.113,-2.0
2439.113,-1.0
2439.613,3.0
2443.113,-1.0
2444.113,-2.0
2456.613,1.0
2457.113,3.0
2457.613,-2.0
2486.113,0.0
2486.613,3.0
2487.113,-1.0
2487.613,-2.0
2507.113,0.0
2508.113,3.0
2517.113,0.0
2517.613,-3.0
2529.613,-2.0
2530.613,2.0
2531.613,1.0
2532.113,-3.0
2534.113,0.0
2534.613,2.0
2548.613,-1.0
2549.113,-4.0
2552.113,-1.0
2553.113,1.0
2599.113,-1.0
2599.613,-4.0
2600.113,0.0
2600.613,1.0
2613.613,1.0
2614.113,-5.0
2614.613,-1.0
2615.113,1.0
2618.613,0.0
2619.613,-5.0
2620.113,0.0
2787.113,4.0
2787.613,-5.0
2788.113,1.0
2816.113,-2.0
2816.613,-4.0
2819.113,-1.0
2819.613,1.0
2858.613,0.0
2859.113,-4.0
2859.613,0.0
2860.613,1.0
2875.113,-2.0
2875.613,-4.0
2876.113,1.0
2880.113,-3.0
2880.613,-4.0
2881.113,-2.0
2881.613,1.0
2926.613,0.0
2927.613,-5.0
2929.613,-3.0
2930.113,1.0
2956.613,2.0
2957.113,-4.0
2962.613,-1.0
2963.113,2.0
2967.113,0.0
2968.113,-3.0
2977.613,-1.0
2978.613,2.0
2992.613,-1.0
2993.113,-4.0
2993.613,-3.0
2994.113,1.0
3000.613,0.0
3001.113,-4.0
3001.613,-2.0
3002.113,5.0
3002.613,-1.0
3289.113,-2.0
3289.613,4.0
3290.113,-1.0
3323.113,-2.0
3323.613,4.0
3324.113,-2.0
3348.113,2.0
3348.613,3.0
3351.113,0.0
3351.613,-2.0
3367.613,-3.0
3368.113,3.0
3369.113,0.0
3369.613,-3.0
3373.113,-1.0
3373.613,2.0
3374.113,-3.0
3378.613,0.0
3379.613,2.0
3381.113,-2.0
3382.613,-3.0
3386.613,-1.0
3387.113,2.0
3387.613,1.0
3388.113,-3.0
3393.113,-1.0
3393.613,3.0
3394.613,0.0
3395.113,-4.0
3397.113,-1.0
3398.113,1.0
3403.113,0.0
3403.613,-4.0
3404.113,1.0
3448.613,0.0
3449.113,-5.0
3449.613,-1.0
3450.113,0.0
3477.113,0.0
3477.613,-5.0
3478.113,0.0
3613.613,2.0
3614.113,-6.0
3614.613,-2.0
3615.113,0.0
3631.113,0.0
3632.113,-5.0
3632.613,0.0
3694.613,-1.0
3695.613,5.0
3696.113,0.0
3766.613,2.0
3767.113,-6.0
3767.613,0.0
3769.613,-1.0
3770.113,-5.0
3771.113,-3.0
3771.613,0.0
3859.613,0.0
3860.113,-6.0
3860.613,0.0
3966.113,0.0
3968.113,-5.0
3968.613,-3.0