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

[SIGMON-225] AN_RB_PLI1.d2 updated

parent 23a55b70
Pipeline #3153136 passed with stage
in 26 seconds
......@@ -88,10 +88,11 @@
- 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
%% Cell type:code id: tags:parameters
``` python
# user input here
```
%% Cell type:code id: tags:
......@@ -133,22 +134,28 @@
timestamp_fgc = source_timestamp_pc.at[0, 'timestamp']
# PIC
timestamp_pic = rb_query.find_timestamp_pic(timestamp_fgc, spark=spark, duration=[(t_end-timestamp_fgc, 'ns')])
i_a_df, i_ref_df = rb_query.query_pc_pm(timestamp_fgc, timestamp_fgc, signal_names=['I_A', 'I_REF'])
i_meas_df, i_earth_df, i_earth_pcnt_df, v_meas_df = rb_query.query_pc_pm(timestamp_fgc, min(timestamp_pic), signal_names=['I_MEAS', 'I_EARTH', 'I_EARTH_PCNT', 'V_MEAS'])
# time scale is normalized to timestamp_pic
i_meas_pic_df, i_earth_pic_df, i_earth_pcnt_pic_df, v_meas_pic_df = rb_query.query_pc_pm(timestamp_fgc, min(timestamp_pic), signal_names=['I_MEAS', 'I_EARTH', 'I_EARTH_PCNT', 'V_MEAS'])
# time scale is normalized to timestamp_fgc
i_meas_fgc_df, i_earth_fgc_df, i_earth_pcnt_fgc_df, v_meas_fgc_df = rb_query.query_pc_pm(timestamp_fgc, timestamp_fgc, signal_names=['I_MEAS', 'I_EARTH', 'I_EARTH_PCNT', 'V_MEAS'])
# PC Reference
if t_start_ref:
source_timestamp_pc_ref = rb_query.find_source_timestamp_pc(t_start_ref, t_end_ref)
timestamp_fgc_ref = source_timestamp_pc_ref.at[0, 'timestamp']
else:
timestamp_fgc_ref = float('nan')
# PIC Reference
timestamp_pic_ref = rb_query.find_timestamp_pic(timestamp_fgc_ref, spark=spark, duration=[(t_end_ref-timestamp_fgc_ref, 'ns')])
i_meas_ref_df = rb_query.query_pc_pm(timestamp_fgc_ref, min(timestamp_pic_ref), signal_names=['I_MEAS'])[0]
# time scale is normalized to timestamp_pic_ref
i_meas_ref_pic_df = rb_query.query_pc_pm(timestamp_fgc_ref, min(timestamp_pic_ref), signal_names=['I_MEAS'])[0]
# time scale is normalized to timestamp_fgc_ref
i_meas_ref_fgc_df = rb_query.query_pc_pm(timestamp_fgc_ref, timestamp_fgc_ref, signal_names=['I_MEAS'])[0]
# EE Voltage
source_timestamp_ee_odd_df = rb_query.find_source_timestamp_ee(timestamp_fgc, system='EE_ODD')
timestamp_ee_odd = source_timestamp_ee_odd_df.loc[0, 'timestamp']
source_ee_odd = source_timestamp_ee_odd_df.loc[0, 'source']
......@@ -158,18 +165,18 @@
timestamp_ee_even = source_timestamp_ee_even_df.loc[0, 'timestamp']
source_ee_even = source_timestamp_ee_even_df.loc[0, 'source']
u_dump_res_even_df = rb_query.query_ee_u_dump_res_pm(timestamp_ee_even, min(timestamp_pic), system='EE_EVEN', signal_names=['U_DUMP_RES'])[0]
# EE Temperature
t_res_odd_0_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_odd_df.loc[0, 'timestamp'], timestamp_fgc, signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_ODD')
t_res_odd_0_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_odd_df.loc[0, 'timestamp'], min(timestamp_pic), signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_ODD')
if len(source_timestamp_ee_odd_df) > 1:
t_res_odd_1_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_odd_df.loc[1, 'timestamp'], timestamp_fgc, signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_ODD')
t_res_odd_1_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_odd_df.loc[1, 'timestamp'], min(timestamp_pic), signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_ODD')
else:
t_res_odd_1_df = [pd.DataFrame(columns=['T_RES_BODY_1']), pd.DataFrame(columns=['T_RES_BODY_2']), pd.DataFrame(columns=['T_RES_BODY_3'])]
t_res_even_0_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_even_df.loc[0, 'timestamp'], timestamp_fgc, signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_EVEN')
t_res_even_0_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_even_df.loc[0, 'timestamp'], min(timestamp_pic), signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_EVEN')
if len(source_timestamp_ee_even_df) > 1:
t_res_even_1_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_even_df.loc[1, 'timestamp'], timestamp_fgc, signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_EVEN')
t_res_even_1_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_even_df.loc[1, 'timestamp'], min(timestamp_pic), signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_EVEN')
else:
t_res_even_1_df = [pd.DataFrame(columns=['T_RES_BODY_1']), pd.DataFrame(columns=['T_RES_BODY_2']), pd.DataFrame(columns=['T_RES_BODY_3'])]
# EE Voltage Reference
if t_start_ref:
......@@ -179,18 +186,18 @@
u_dump_res_odd_ref_df = rb_query.query_ee_u_dump_res_pm(source_timestamp_ee_odd_ref_df.loc[0, 'timestamp'], min(timestamp_pic_ref), system='EE_ODD', signal_names=['U_DUMP_RES'])[0]
u_dump_res_even_ref_df = rb_query.query_ee_u_dump_res_pm(source_timestamp_ee_even_ref_df.loc[0, 'timestamp'], min(timestamp_pic_ref), system='EE_EVEN', signal_names=['U_DUMP_RES'])[0]
# EE Temperature Reference
t_res_odd_0_ref_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_odd_ref_df.loc[0, 'timestamp'], timestamp_fgc_ref, signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_ODD')
t_res_odd_0_ref_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_odd_ref_df.loc[0, 'timestamp'], min(timestamp_pic_ref), signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_ODD')
if len(source_timestamp_ee_odd_ref_df) > 1:
t_res_odd_1_ref_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_odd_ref_df.loc[1, 'timestamp'], timestamp_fgc_ref, signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_ODD')
t_res_odd_1_ref_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_odd_ref_df.loc[1, 'timestamp'], min(timestamp_pic_ref), signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_ODD')
else:
t_res_odd_1_ref_df = [pd.DataFrame(columns=['T_RES_BODY_1']), pd.DataFrame(columns=['T_RES_BODY_2']), pd.DataFrame(columns=['T_RES_BODY_3'])]
t_res_even_0_ref_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_even_ref_df.loc[0, 'timestamp'], timestamp_fgc_ref, signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_EVEN')
t_res_even_0_ref_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_even_ref_df.loc[0, 'timestamp'], min(timestamp_pic_ref), signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_EVEN')
if len(source_timestamp_ee_even_ref_df) > 1:
t_res_even_1_ref_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_even_ref_df.loc[1, 'timestamp'], timestamp_fgc_ref, signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_EVEN')
t_res_even_1_ref_df = rb_query.query_ee_t_res_pm(source_timestamp_ee_even_ref_df.loc[1, 'timestamp'], min(timestamp_pic_ref), signal_names=['T_RES_BODY_1', 'T_RES_BODY_2', 'T_RES_BODY_3'], system='EE_EVEN')
else:
t_res_even_1_ref_df = [pd.DataFrame(columns=['T_RES_BODY_1']), pd.DataFrame(columns=['T_RES_BODY_2']), pd.DataFrame(columns=['T_RES_BODY_3'])]
# DFB
source_timestamp_leads_odd_df = rb_query.find_timestamp_leads(timestamp_fgc, 'LEADS_ODD')
......@@ -263,11 +270,11 @@
- t = 0 s corresponds to the respective (analyzed and reference) FGC timestamps.
%% Cell type:code id: tags:
``` python
rb_analysis.analyze_i_meas_pc(circuit_name, timestamp_fgc, timestamp_fgc_ref, min(timestamp_pic), i_meas_df, i_meas_ref_df)
analyze_i_meas_pc(circuit_name=circuit_name, timestamp_fgc=timestamp_fgc, timestamp_fgc_ref=timestamp_fgc_ref, timestamp_pic=min(timestamp_pic), i_meas_df=i_meas_fgc_df, i_meas_ref_df=i_meas_ref_fgc_df, duration_decay=(2, 100))
```
%% Cell type:markdown id: tags:
## 4.3. Analysis of the Power Converter Main Current Smoothness
......@@ -289,11 +296,11 @@
%% Cell type:code id: tags:
``` python
title = create_hwc_plot_title_with_circuit_name(circuit_name=circuit_name, hwc_test=hwc_test, t_start=t_start, t_end=t_end, signal='I_MEAS smoothness')
rb_analysis.plot_i_meas_smoothness(i_meas_df, title=title)
rb_analysis.plot_i_meas_smoothness(i_meas_pic_df, title=title)
```
%% Cell type:markdown id: tags:
## 4.4. Power Converter Voltage Analysis
......@@ -305,11 +312,11 @@
%% Cell type:code id: tags:
``` python
title = create_hwc_plot_title_with_circuit_name(circuit_name=circuit_name, hwc_test=hwc_test, t_start=t_start, t_end=t_end, signal='V_MEAS')
rb_analysis.assert_v_meas(timestamp_ee_even, min(timestamp_pic), t_after_ee=1, v_meas_df=v_meas_df, value_min=-2.0, value_max=-1.0, title=title, xmax=25)
rb_analysis.assert_v_meas(timestamp_ee_even, min(timestamp_pic), t_after_ee=1, v_meas_df=v_meas_pic_df, value_min=-2.0, value_max=-1.0, title=title, xmax=25)
```
%% Cell type:markdown id: tags:
# 5. Energy Extraction System
......@@ -345,18 +352,24 @@
- the green dashed line denotes the PIC timestamp
%% Cell type:code id: tags:
``` python
rb_analysis.analyze_char_time_u_dump_res_ee(circuit_name, timestamp_fgc, [u_dump_res_odd_df, u_dump_res_even_df], i_meas_df)
rb_analysis.analyze_char_time_u_dump_res_ee(circuit_name, timestamp_fgc, [u_dump_res_odd_df, u_dump_res_even_df], i_meas_pic_df)
```
%% Cell type:markdown id: tags:
Warning:
On the next plot the x-scale for I_REF and I_A is artificially syncronised to PIC, which is not correct.
Nevertheles the analysis of EE-delays w.r.t. PIC is correct!
%% Cell type:code id: tags:
``` python
rb_analysis.analyze_delay_time_u_dump_res_ee(circuit_name, min(timestamp_pic), min(timestamp_pic), [timestamp_ee_odd, timestamp_ee_even],
i_a_df, i_ref_df, [u_dump_res_odd_df, u_dump_res_even_df])
rb_analysis.analyze_delay_time_u_dump_res_ee(circuit_name, timestamp_fgc=min(timestamp_pic), timestamp_pic=min(timestamp_pic), timestamp_ees=[timestamp_ee_odd, timestamp_ee_even],
i_a_df=i_a_df, i_ref_df=i_ref_df, u_dump_res_dfs=[u_dump_res_odd_df, u_dump_res_even_df])
```
%% Cell type:code id: tags:
``` python
......@@ -425,11 +438,11 @@
%% Cell type:code id: tags:
``` python
timestamp = t_start if source_timestamp_leads_even_df.empty else source_timestamp_leads_even_df.loc[0, 'timestamp']
rb_analysis.analyze_leads_voltage(u_hts_even_dfs, circuit_name, timestamp, signal='U_HTS', value_min=-0.001, value_max=0.001)
rb_analysis.analyze_leads_voltage(u_hts_even_dfs, circuit_name, timestamp, signal='U_HTS', value_min=-0.003, value_max=0.003)
```
%% Cell type:code id: tags:
``` python
......
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