Commit aec887a2 authored by Michal Maciejewski's avatar Michal Maciejewski
Browse files

Added voltage-dependent QH discharge criteria

parent 7bbfd0ae
Pipeline #2262228 passed with stage
in 15 seconds
......@@ -86,11 +86,11 @@
author = fgc_pm_search.get_author()
is_automatic = fgc_pm_search.is_automatic_mode()
query = R60_80_120ACircuitQuery(circuit_type, circuit_name, max_executions=1)
# PC
i_meas_df, i_a_df, i_ref_df = query.query_pc_pm(timestamp_fgc, timestamp_fgc, signal_names=['I_MEAS', 'I_A', 'I_REF'])
i_meas_df, i_a_df, i_ref_df, i_earth_df = query.query_pc_pm(timestamp_fgc, timestamp_fgc, signal_names=['I_MEAS', 'I_A', 'I_REF', 'I_EARTH'])
results_table = query.create_report_analysis_template(timestamp_fgc, init_file_path='../__init__.py', author=author)
analysis = R60_80_120ACircuitAnalysis(circuit_type, results_table)
timestamp_dct = {'FGC': timestamp_fgc}
......@@ -149,10 +149,24 @@
analysis.calculate_current_slope(i_meas_df, col_name=['Ramp rate', 'Plateau duration'])
```
%% Cell type:markdown id: tags:
## 4.2. Earth Current
*GRAPHS*:
- t = 0 s corresponds to the FGC timestamp
%% Cell type:code id: tags:
``` python
analysis.plot_i_earth_pc(circuit_name, timestamp_fgc, i_earth_df)
analysis.calculate_max_i_earth_pc(i_earth_df, col_name='I_Earth_max')
```
%% Cell type:markdown id: tags:
# 5. Quench Protection System
%% Cell type:code id: tags:
``` python
......
......@@ -87,11 +87,11 @@
author = fgc_pm_search.get_author()
is_automatic = fgc_pm_search.is_automatic_mode()
query = R60_80_120ACircuitQuery(circuit_type, circuit_name, max_executions=1)
# PC
i_meas_df, i_a_df, i_ref_df = query.query_pc_pm(timestamp_fgc, timestamp_fgc, signal_names=['I_MEAS', 'I_A', 'I_REF'])
i_meas_df, i_a_df, i_ref_df, i_earth_df = query.query_pc_pm(timestamp_fgc, timestamp_fgc, signal_names=['I_MEAS', 'I_A', 'I_REF', 'I_EARTH'])
results_table = query.create_report_analysis_template(timestamp_fgc, init_file_path='../__init__.py', author=author)
analysis = R60_80_120ACircuitAnalysis(circuit_type, results_table)
timestamp_dct = {'FGC': timestamp_fgc}
......@@ -150,10 +150,24 @@
analysis.calculate_current_slope(i_meas_df, col_name=['Ramp rate', 'Plateau duration'])
```
%% Cell type:markdown id: tags:
## 4.2. Earth Current
*GRAPHS*:
- t = 0 s corresponds to the FGC timestamp
%% Cell type:code id: tags:
``` python
analysis.plot_i_earth_pc(circuit_name, timestamp_fgc, i_earth_df)
analysis.calculate_max_i_earth_pc(i_earth_df, col_name='I_Earth_max')
```
%% Cell type:markdown id: tags:
# 5. Quench Protection System
%% Cell type:code id: tags:
``` python
......
This diff is collapsed.
__version__ = "1.5.12"
__version__ = "1.5.13"
figures/monitoring-vs-hwc.png

388 KB | W: | H:

figures/monitoring-vs-hwc.png

232 KB | W: | H:

figures/monitoring-vs-hwc.png
figures/monitoring-vs-hwc.png
figures/monitoring-vs-hwc.png
figures/monitoring-vs-hwc.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -326,12 +326,12 @@
%% Cell type:code id: tags:
``` python
analysis_start_time = Time.get_analysis_start_time()
file_name_html = '{}_{}-{}-{}_{}.html'.format(circuit_name, hwc_test, Time.to_datetime(t_start).strftime("%Y-%m-%d-%Hh%M"), analysis_start_time, signature)
hwc_test = hwc_test.split(' ')[0]
file_name_html = '{}_{}-{}-{}_{}.html'.format(circuit_name, hwc_test, Time.to_datetime(t_start).strftime("%Y-%m-%d-%Hh%M"), analysis_start_time, signature)
full_path = '/eos/project/m/mp3/IPD/{}/{}/{}'.format(circuit_name, hwc_test, file_name_html)
!mkdir -p /eos/project/m/mp3/IPD/$circuit_name/$hwc_test
print('Compact notebook report saved to (Windows): ' + '\\\\cernbox-smb' + full_path.replace('/', '\\'))
display(Javascript('IPython.notebook.save_notebook();'))
Time.sleep(5)
......
......@@ -76,11 +76,11 @@
``` python
index = 0
for u_hds_dfs, u_hds_ref_dfs in zip(u_hds_dfss, u_hds_ref_dfss):
print(index, qh_pm_search.source_timestamp_df.loc[index, 'timestamp'])
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)
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())
index += 1
```
%% Cell type:markdown id: tags:
......
......@@ -77,11 +77,11 @@
``` python
index = 0
for u_hds_dfs, u_hds_ref_dfs in zip(u_hds_dfss, u_hds_ref_dfss):
print(index, qh_pm_search.source_timestamp_df.loc[index, 'timestamp'])
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)
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())
index += 1
```
%% Cell type:markdown id: tags:
......@@ -103,5 +103,11 @@
print('Compact notebook report saved to (Windows): ' + '\\\\cernbox-smb' + full_path.replace('/', '\\'))
display(Javascript('IPython.notebook.save_notebook();'))
Time.sleep(5)
!{sys.executable} -m jupyter nbconvert --to html $'HWC_IPQ_QHDA.ipynb' --output /eos/project/m/mp3/IPQ/$prefix_circuit_name/$circuit_name/QHDA/$file_name_html --TemplateExporter.exclude_input=True --TagRemovePreprocessor.remove_all_outputs_tags='["skip_output"]' --TagRemovePreprocessor.remove_cell_tags='["skip_cell"]'
```
%% Cell type:code id: tags:
``` python
```
......
......@@ -77,11 +77,11 @@
``` python
index = 0
for u_hds_dfs, u_hds_ref_dfs in zip(u_hds_dfss, u_hds_ref_dfss):
print(index, qh_pm_search.source_timestamp_df.loc[index, 'timestamp'])
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)
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())
index += 1
```
%% Cell type:markdown id: tags:
......
......@@ -135,11 +135,11 @@
# Get matching reference voltage and current
u_hds_ref_dfs = list(filter(lambda col: 'U_HDS' in col.columns.values[0], qh_ref_dfs[index]))
i_hds_ref_dfs = list(filter(lambda col: 'I_HDS' in col.columns.values[0], qh_ref_dfs[index]))
is_qh_correct = analyze_single_qh(timestamp, source, u_hds_dfs, i_hds_dfs, u_hds_ref_dfs, i_hds_ref_dfs, plot_qh_discharge=plot_qh_discharge_hwc, mean_start_value=50, current_offset=0.085)
is_qh_correct = analyze_single_qh(timestamp, source, u_hds_dfs, i_hds_dfs, u_hds_ref_dfs, i_hds_ref_dfs, plot_qh_discharge=plot_qh_discharge_hwc, mean_start_value=50, current_offset=0.085, nominal_voltage=qh_pm_search.get_discharge_level())
print('QH assessment is:', 'Pass' if is_qh_correct else 'Fail')
# Show next
check_show_next(index, index_max, is_automatic=qh_pm_search.is_automatic_mode())
......
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