AN_RB_PLI3.a5.ipynb 21.7 KB
Newer Older
1
2
3
4
5
6
7
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<h1><center>Analysis of a PLI3.a5 HWC in an RB Circuit</center></h1>\n",
8
    "<img src=\"https://gitlab.cern.ch/LHCData/lhc-sm-hwc/raw/master/figures/rb/RB.png\" width=75%>\n",
9
10
11
    "\n",
    "PLI3.A2 is a simple current cycle at I_INTERM_2 during TIME_INTERM_2, while PLI3.A5 is a current cycle with 2 current levels (I_SM, I_INTERM_2) during TIME_INTERM_2 each. PLI3.A5 can be performed with calorimetric measurement (original purpose). In case of calorimetric measurement, the cryogenic cooling must be stable and maintained constant during the whole cycle. The aim of this test is to check the performance of the current leads and also the splices resistance, and, in case of calorimetric measurements, to detect abnormal heating in the magnets environment.\n",
    "\n",
12
    "<img src=\"https://gitlab.cern.ch/LHCData/lhc-sm-hwc/raw/master/figures/rb/PLI3_current.png\" width=50%>\n",
13
14
15
16
17
    "\n",
    "The required analysis and signatures are listed below.\n",
    "\n",
    "|Responsible|Type of analysis|Criterion|\n",
    "|-----------|----------------|---------|\n",
18
19
20
    "|-|Automatic analysis on earth current and error current|I_EARTH_PLI2_S1 < I_EARTH_MAX and I_ERR_PLI2_S1 < I_ERR_MAX|\n",
    "|MP3|Splice signals|From board A and board B separately R_bus_max <3 nOhm. Individual R_splice_max<0.5nOhm R_mag<50 nOhm|\n",
    "|MP3|Current lead|46 < TT891A < 54K; Abs(U_RES)< 40mV; and no drift Abs(U_HTS) < 0.5mV|\n",
21
22
23
24
25
26
27
28
29
    "\n",
    "source: Powering Procedure and Acceptance Criteria for the 13 kA Dipole Circuits, MP3 Procedure, <a href=\"https://edms.cern.ch/document/874713/5.1\">https://edms.cern.ch/document/874713/5.1</a>"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Analysis Assumptions\n",
30
31
32
    "- We consider standard analysis scenarios, i.e., all signals can be queried. If a signal is missing, an analysis can raise a warning and continue or an error and abort the analysis.\n",
    "- In case a signal is not needed for the analysis, a particular analysis is skipped. In other words, all signals have to be available in order to perform an analysis.\n",
    "- It is recommended to execute each cell one after another. However, since the signals are queried prior to analysis, any order of execution is allowed. In case an analysis cell is aborted, the following ones may not be executed (e.g. I\\_MEAS not present). \n",
33
34
    "\n",
    "# Plot Convention\n",
35
36
    "- Scales are labeled with signal name followed by a comma and a unit in square brackets, e.g., I_MEAS, [A].\n",
    "- If a reference signal is present, it is represented with a dashed line.\n",
37
    "- 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",
38
39
40
    "- 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",
41
    "- Each plot has an individual time-synchronization mentioned explicitly in the description.\n",
42
    "- If an axis has a single signal, then the color of the label matches the signal's color. Otherwise, the label color is black."
43
44
45
46
47
48
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
49
    "# 0. Initialise Working Environment"
50
51
52
53
   ]
  },
  {
   "cell_type": "code",
54
   "execution_count": null,
55
   "metadata": {
56
    "editable": false,
57
58
    "scrolled": false
   },
59
   "outputs": [],
60
   "source": [
Michal Maciejewski's avatar
Michal Maciejewski committed
61
62
    "import io\n",
    "import re\n",
63
    "import sys\n",
64
    "import time\n",
65
    "import pandas as pd\n",
66
67
    "import numpy as np\n",
    "from IPython.display import display, Javascript\n",
68
69
70
71
72
73
    "\n",
    "# lhc-sm-api\n",
    "from lhcsmapi.Time import Time\n",
    "from lhcsmapi.Timer import Timer\n",
    "\n",
    "# GUI\n",
74
    "from lhcsmapi.gui.hwc.HwcSearchModuleMediator import HwcSearchModuleMediator\n",
75
76
77
78
79
    "\n",
    "# Query\n",
    "from lhcsmapi.analysis.RbCircuitQuery import RbCircuitQuery\n",
    "\n",
    "# Analysis\n",
80
    "from lhcsmapi.analysis.report_template import apply_report_template\n",
81
    "from lhcsmapi.pyedsl.AssertionBuilder import AssertionBuilder\n",
82
83
    "from lhcsmapi.analysis.RbCircuitAnalysis import RbCircuitAnalysis\n",
    "from lhcsmapi.analysis.busbar.BusbarResistanceAnalysis import convert_to_col\n",
84
    "\n",
Michal Maciejewski's avatar
Michal Maciejewski committed
85
86
    "analysis_start_time = datetime.now().strftime(\"%Y.%m.%d_%H%M%S\")\n",
    "\n",
87
    "import lhcsmapi\n",
88
89
    "print('Analysis executed with lhcsmapi version: {}'.format(lhcsmapi.__version__))\n",
    "\n",
Michal Maciejewski's avatar
Michal Maciejewski committed
90
91
92
    "with io.open(\"../__init__.py\", \"rt\", encoding=\"utf8\") as f:\n",
    "    version = re.search(r'__version__ = \"(.*?)\"', f.read()).group(1)\n",
    "    print('Analysis executed with lhc-sm-hwc notebooks version: {}'.format(version))"
93
94
95
96
97
98
99
100
101
102
103
104
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 1. Select PLI3.a5 HWC Test\n",
    "- Choose a circuit name in order to display HWC test with, campaign name as well as start and end time"
   ]
  },
  {
   "cell_type": "code",
105
   "execution_count": null,
106
   "metadata": {
107
    "editable": false,
108
109
    "scrolled": true
   },
110
   "outputs": [],
111
112
113
   "source": [
    "circuit_type = 'RB'\n",
    "hwc_test = 'PLI3.a5'\n",
114
    "hwcb = HwcSearchModuleMediator(circuit_type=circuit_type, hwc_test=hwc_test, hwc_summary_path='/eos/project/l/lhcsm/hwc/HWC_Summary.csv')"
115
116
117
118
119
120
121
122
123
124
125
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 2. Query All Signals Prior to Analysis"
   ]
  },
  {
   "cell_type": "code",
126
   "execution_count": null,
127
   "metadata": {
128
    "editable": false,
129
130
131
132
    "tags": [
     "skip_output"
    ]
   },
133
   "outputs": [],
134
135
136
137
   "source": [
    "circuit_name = hwcb.get_circuit_name()\n",
    "t_start = hwcb.get_start_time()\n",
    "t_end = hwcb.get_end_time()\n",
138
    "is_automatic = hwcb.is_automatic_mode()\n",
139
    "rb_query = RbCircuitQuery(circuit_type, circuit_name, max_executions=12)\n",
140
    "rb_analysis = RbCircuitAnalysis(circuit_type, pd.DataFrame(), is_automatic=is_automatic)\n",
141
142
    "\n",
    "with Timer():\n",
143
144
145
    "    # PC\n",
    "    i_meas_nxcals_df = rb_query.query_signal_nxcals(t_start, t_end, system='PC', signal_names='I_MEAS', spark=spark)[0]\n",
    "    i_meas_raw_nxcals_df = rb_query.query_raw_signal_nxcals(t_start, t_end, system='PC', signal_names='I_MEAS', spark=spark)[0]\n",
146
147
    "    plateau_start, plateau_end = rb_query.calculate_current_plateau_start_end(Time.to_unix_timestamp(t_start), Time.to_unix_timestamp(t_end), \n",
    "                                                                              i_meas_threshold=500, min_duration_in_sec=1, spark=spark)\n",
148
149
    "\n",
    "    # BUSBAR\n",
150
151
152
    "    u_res_feature_df, i_meas_feature_df = rb_query.get_busbar_resistances(Time.to_unix_timestamp(t_start), Time.to_unix_timestamp(t_end), plateau_start, plateau_end, \n",
    "                                                                          signal_name='U_RES', spark=spark)\n",
    "    res_busbar_row_df = rb_analysis.calculate_resistance(i_meas_feature_df, u_res_feature_df, 'U_RES', Time.to_unix_timestamp(t_start), circuit_name)\n",
153
    "    res_busbar_df = convert_to_col(res_busbar_row_df, signal_name='U_RES')\n",
154
    "    \n",
155
    "    # MAGNET\n",
156
157
158
    "    u_mag_feature_df, i_meas_feature_df = rb_query.get_busbar_resistances(Time.to_unix_timestamp(t_start), Time.to_unix_timestamp(t_end), plateau_start, plateau_end, \n",
    "                                                                          signal_name='U_MAG', spark=spark)\n",
    "    res_magnet_row_df = rb_analysis.calculate_resistance(i_meas_feature_df, u_mag_feature_df, 'U_MAG', Time.to_unix_timestamp(t_start), circuit_name)\n",
159
    "    res_magnet_df = convert_to_col(res_magnet_row_df, signal_name='U_MAG')\n",
160
    "    \n",
161
162
163
    "    # LEADS\n",
    "    u_res_nxcals_dfs = rb_query.query_signal_nxcals(t_start, t_end, system=['LEADS_EVEN', 'LEADS_ODD'], signal_names='U_RES', spark=spark)\n",
    "    u_hts_nxcals_dfs = rb_query.query_signal_nxcals(t_start, t_end, system=['LEADS_EVEN', 'LEADS_ODD'], signal_names='U_HTS', spark=spark)\n",
164
    "\n",
165
166
167
    "    tt891a_nxcals_dfs = rb_query.query_dfb_signal_nxcals(t_start, t_end, system=['LEADS_EVEN_WINCCOA', 'LEADS_ODD_WINCCOA'], signal_names='TT891A', spark=spark)\n",
    "    tt893_nxcals_dfs = rb_query.query_dfb_signal_nxcals(t_start, t_end, system=['LEADS_EVEN_WINCCOA', 'LEADS_ODD_WINCCOA'], signal_names='TT893', spark=spark)\n",
    "    cv891_nxcals_dfs = rb_query.query_dfb_signal_nxcals(t_start, t_end, system=['LEADS_EVEN_WINCCOA', 'LEADS_ODD_WINCCOA'], signal_names='CV891', spark=spark)\n"
168
169
170
171
172
173
174
175
176
177
178
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 3. Power Converter\n",
    "## 3.1. Plot of the Power Converter Main Current\n",
    "\n",
    "*QUERY*:\n",
    "\n",
179
180
181
    "|Variable Name\t|Variable Type\t|Variable Unit\t|Database|Comment\n",
    "|---------------|---------------|---------------|--------|------|\n",
    "|i_meas_df | DataFrame | A |NXCALS| Main power converter current, I_MEAS|\n",
182
183
    "\n",
    "*ANALYSIS*:\n",
184
    "\n",
185
186
    "- Calculation of the duration of current plateaus\n",
    "\n",
187
188
    "*GRAPHS*:\n",
    "\n",
189
190
    "- t = 0 s corresponds to the start of the test\n",
    "- Orange box(es) represent period(s) of time with constant current used for calculation of busbar resistance and DFB thresholds"
191
192
193
194
   ]
  },
  {
   "cell_type": "code",
195
   "execution_count": null,
196
   "metadata": {
197
198
    "deletable": false,
    "editable": false,
199
200
    "scrolled": false
   },
201
   "outputs": [],
202
203
   "source": [
    "ax = i_meas_nxcals_df.plot(figsize=(30, 10), grid=True)\n",
204
205
206
    "for ps, pe in zip(plateau_start, plateau_end):\n",
    "    ax.axvspan(xmin=(ps-Time.to_unix_timestamp(i_meas_raw_nxcals_df.index[0]))/1e9, \n",
    "               xmax=(pe-Time.to_unix_timestamp(i_meas_raw_nxcals_df.index[0]))/1e9, facecolor='xkcd:goldenrod')\n",
207
208
209
210
211
212
213
214
215
216
217
218
219
220
    "ax.set_xlabel(\"time, [s]\", fontsize=15)\n",
    "ax.set_ylabel(\"I_MEAS, [A]\", fontsize=15)\n",
    "ax.tick_params(labelsize=15)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 4. Busbar\n",
    "## 4.1. Busbar Resistance\n",
    "\n",
    "*QUERY*:\n",
    "\n",
221
222
223
224
    "|Variable Name\t|Variable Type\t|Variable Unit\t|Database|Comment\n",
    "|---------------|---------------|---------------|--------|------|\n",
    "|i_meas_feature_df | DataFrame | A |NXCALS| Mean, std, and count values of the main power converter current labeled (1,2,...) at the current plateaus, I_MEAS|\n",
    "|u_res_feature_df | DataFrame | V |NXCALS| Mean, std, and count values of the busbar voltage labeled (1,2,...) at the current plateaus, U_RES|\n",
225
226
    "\n",
    "*ANALYSIS*:\n",
227
    "\n",
228
229
    "- Calculation of the busbar resistance as the slope of a linear fit of U,I curve obtained from the corresponding mean alues of the voltage and current\n",
    "\n",
230
231
232
233
234
235
    "*CRITERIA*:\n",
    "\n",
    "- Check if the busbar resistance is below 3 nOhm\n",
    "\n",
    "*GRAPHS*:\n",
    "\n",
236
    "- The busbar resistance, R\n",
237
    "- The green box denotes the validity region of the busbar resostance (0, 3] nOhm"
238
239
240
241
   ]
  },
  {
   "cell_type": "code",
242
   "execution_count": null,
243
244
245
   "metadata": {
    "editable": false
   },
246
   "outputs": [],
247
   "source": [
248
    "res_busbar_outliers_df = rb_analysis.analyze_busbar_magnet_resistance(res_busbar_df, signal_name='R_RES', max_value=3e-9)"
249
250
251
252
   ]
  },
  {
   "cell_type": "code",
253
   "execution_count": null,
254
255
256
257
258
   "metadata": {
    "editable": false
   },
   "outputs": [],
   "source": [
259
    "RbCircuitQuery.query_and_plot_outlier_voltage(res_busbar_outliers_df, t_start, t_end, i_meas_raw_nxcals_df.index[0], plateau_start, plateau_end, spark=spark)"
260
261
   ]
  },
262
263
264
265
266
267
268
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 4.2. Magnet Resistance\n",
    "*QUERY*:\n",
    "\n",
269
270
    "|Variable Name\t|Variable Type\t|Variable Unit\t|Database|Comment\n",
    "|---------------|---------------|---------------|--------|------|\n",
271
    "|res_magnet_df | DataFrame | Ohm |NXCALS| Magnet resistance, R_MAG|\n",
272
273
    "\n",
    "*ANALYSIS*:\n",
274
    "\n",
275
    "- Calculation of the magnet resistance as the slope of a linear fit of U,I curve obtained from the corresponding mean alues of the voltage and current\n",
276
277
    "\n",
    "*CRITERIA*\n",
278
    "\n",
279
280
281
282
283
    "- Check if the resistance is below 50 nOhm\n",
    "\n",
    "*GRAPHS*:\n",
    "\n",
    "- The magnet resistance, R\n",
284
    "- The green box denotes the validity region of the magnet resistance (0, 50] nOhm\n"
285
286
287
288
   ]
  },
  {
   "cell_type": "code",
289
   "execution_count": null,
290
291
292
   "metadata": {
    "editable": false
   },
293
   "outputs": [],
294
   "source": [
295
    "res_magnet_outliers_df = rb_analysis.analyze_busbar_magnet_resistance(res_magnet_df, signal_name='R_MAG', max_value=50e-9)"
296
297
298
299
   ]
  },
  {
   "cell_type": "code",
300
   "execution_count": null,
301
302
303
304
305
   "metadata": {
    "editable": false
   },
   "outputs": [],
   "source": [
306
    "RbCircuitQuery.query_and_plot_outlier_voltage(res_magnet_outliers_df, t_start, t_end, i_meas_raw_nxcals_df.index[0], plateau_start, plateau_end, spark=spark)"
307
308
   ]
  },
309
310
311
312
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
313
314
    "# 5. DFB\n",
    "## 5.1. DFB Voltage - U_RES\n",
315
316
317
318
319
    "\n",
    "U_RES - Voltage of the resistive part of the current lead (QPS threshold at 100 mV, 100 ms)  \n",
    "\n",
    "*QUERY*:\n",
    "\n",
320
321
    "|Variable Name\t|Variable Type\t|Variable Unit\t|Database|Comment\n",
    "|---------------|---------------|---------------|--------|------|\n",
322
    "|u_res_nxcals_dfs\t|list of DataFrames\t|V\t|NXCALS|Voltage of the resistive part of even and odd leads, U_RES|\n",
323
    "\n",
324
325
    "*CRITERIA*:\n",
    "- Check if, at constant current, U_RES is constant (no drift < 2mV/h)\n",
326
    "\n",
327
    "*GRAPHS*:\n",
328
    "- t = 0 s corresponds to the start time of the test\n"
329
330
331
332
   ]
  },
  {
   "cell_type": "code",
333
   "execution_count": null,
334
335
336
337
   "metadata": {
    "deletable": false,
    "editable": false
   },
338
   "outputs": [],
339
   "source": [
340
    "RbCircuitAnalysis.assert_u_res_min_max_slope(u_res_nxcals_dfs, plateau_start, plateau_end, Time.to_unix_timestamp(t_start), slope_range=(-2, 2))"
341
342
343
344
345
346
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
347
    "## 5.2. DFB Voltage - U_HTS\n",
348
349
350
351
352
    "\n",
    "U_HTS - Voltage of the HTS part of the current lead (QPS threshold at 1 mV, 100 ms)  \n",
    "\n",
    "*QUERY*:\n",
    "\n",
353
354
    "|Variable Name\t|Variable Type\t|Variable Unit\t|Database|Comment\n",
    "|---------------|---------------|---------------|--------|------|\n",
355
    "|u_hts_nxcals_dfs\t|list of DataFrames\t|V\t|NXCALS|Voltage of the HTS part of even and odd leads, U_HTS|\n",
356
    "\n",
357
    "*CRITERIA*:  \n",
358
    "- Check if the voltage is below 50% of the threshold -> Abs(U_HTS) < 0.5 mV\n",
359
    "\n",
360
    "*GRAPHS*:\n",
361
    "- t = 0 s corresponds to the start time of the test"
362
363
364
365
   ]
  },
  {
   "cell_type": "code",
366
   "execution_count": null,
367
   "metadata": {
368
369
    "deletable": false,
    "editable": false,
370
371
    "scrolled": false
   },
372
   "outputs": [],
373
   "source": [
374
    "RbCircuitAnalysis.assert_u_hts_min_max_slope(u_hts_nxcals_dfs, plateau_start, plateau_end, Time.to_unix_timestamp(t_start), slope_range=(-0.5, 0.5))"
375
376
377
378
379
380
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
381
    "## 5.3. DFB Temperature - TT893.TEMPERATURECALC\n",
382
383
384
385
386
387
388
389
    "\n",
    "TT893.TEMPERATURECALC - Temperature at the top of the current lead (supposed to be at the room temperature) \n",
    "\n",
    "*QUERY*:\n",
    "- NXCALS for temperature at the top of the current lead (even and odd), TT893.TEMPERATURECALC\n",
    "\n",
    "*INPUT*:  \n",
    "\n",
390
391
    "|Variable Name\t|Variable Type\t|Variable Unit\t|Database|Comment\n",
    "|---------------|---------------|---------------|--------|------|\n",
392
    "|tt893_nxcals_dfs\t|list of DataFrames\t|K\t|NXCALS|Temperature at the top of the current lead, TT893.TEMPERATURECALC|\n",
393
    "\n",
394
395
396
397
398
    "*CRITERIA*:\n",
    "\n",
    "- Check if the temperature is over the dew point, but not overheated -> 280 K < TT893 < 320 K, even without current\n",
    "\n",
    "*GRAPHS*:\n",
399
400
401
    "\n",
    "- Temperature at the top of the current lead on the right axis, TT893.TEMPERATURECALC\n",
    "- Green box denotes the temperature validity region [280, 320] K of the temperature at the top of the current lead\n",
402
    "- t = 0 s corresponds to the start time of the test"
403
404
405
406
   ]
  },
  {
   "cell_type": "code",
407
   "execution_count": null,
408
   "metadata": {
409
410
    "deletable": false,
    "editable": false,
411
412
    "scrolled": false
   },
413
   "outputs": [],
414
   "source": [
415
    "RbCircuitAnalysis.assert_tt893_min_max_value(tt893_nxcals_dfs, value_range=(280, 320))"
416
417
418
419
420
421
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
422
    "## 5.4. DFB Temperature - TT891A.TEMPERATURECALC\n",
423
424
425
426
427
    "\n",
    "TT891A.TEMPERATURECALC - Temperature between the HTS and resistive part of the current leads (supposed to be regulated around 50 K)\n",
    "\n",
    "*QUERY*:\n",
    "\n",
428
429
    "|Variable Name\t|Variable Type\t|Variable Unit\t|Database|Comment\n",
    "|---------------|---------------|---------------|--------|------|\n",
430
    "|tt891a_nxcals_dfs\t|list of DataFrames\t|K\t|NXCALS|Temperature between the HTS and resistive part of the current lead, TT891A.TEMPERATURECALC|\n",
431
    "\n",
432
433
434
435
436
    "*CRITERIA*:\n",
    "\n",
    "- Check if the temperature is regulated around 50 K -> 46 K < TT891A < 54 K, even without current\n",
    "\n",
    "*GRAPHS*:\n",
437
438
439
440
    "\n",
    "For odd and even leads\n",
    "- Main power converter current, I_MEAS\n",
    "- Temperature between the HTS and resistive part of the current lead on the right axis, TT891A.TEMPERATURECALC\n",
441
    "- t = 0 s corresponds to the start time of the test\n"
442
443
444
445
   ]
  },
  {
   "cell_type": "code",
446
   "execution_count": null,
447
   "metadata": {
448
449
    "deletable": false,
    "editable": false,
450
451
    "scrolled": false
   },
452
   "outputs": [],
453
   "source": [
454
    "RbCircuitAnalysis.assert_tt891a_min_max_value(tt891a_nxcals_dfs, value_range=(46, 54))"
455
456
457
458
459
460
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
461
    "## 5.5. DFB Valve Regulation - CV891.POSST\n",
462
463
464
    "\n",
    "CV891.POSST - Valve for regulation of TT891A\n",
    "\n",
465
    "*QUERY*: \n",
466
    "\n",
467
468
469
    "|Variable Name\t|Variable Type\t|Variable Unit\t|Database|Comment\n",
    "|---------------|---------------|---------------|--------|------|\n",
    "|cv891_nxcals_dfs\t|list of DataFrames\t|%\t|NXCALS|Valve for regulation of TT891A, CV891.POSST|\n",
470
    "\n",
471
472
473
474
475
476
    "*CRITERIA*:\n",
    "\n",
    "- Check if the valve is opened (>2%), but not fully (<50%)\n",
    "- Check if the valve variation (defined as difference between the maximum and minimum value) does not exceed 8% at constant current (the ramp of the current is excluded this criterion)\n",
    "\n",
    "*GRAPHS*:\n",
477
478
479
480
    "\n",
    "- Main power converter current, I_MEAS\n",
    "- Valve for regulation of TT891A, CV891.POSST\n",
    "- t = 0 s corresponds to the start time of the test\n",
481
    "- Green box denotes the valve opening validity region [2, 50] % of the TT891A temperature regulation"
482
483
484
485
   ]
  },
  {
   "cell_type": "code",
486
   "execution_count": null,
487
   "metadata": {
488
489
    "deletable": false,
    "editable": false,
490
491
    "scrolled": false
   },
492
   "outputs": [],
493
   "source": [
494
    "RbCircuitAnalysis.assert_cv891_min_max_value(cv891_nxcals_dfs, value_range=(2, 50))"
495
496
497
498
   ]
  },
  {
   "cell_type": "code",
499
   "execution_count": null,
500
501
502
503
   "metadata": {
    "deletable": false,
    "editable": false
   },
504
   "outputs": [],
505
   "source": [
506
    "RbCircuitAnalysis.assert_cv891_min_max_variation(cv891_nxcals_dfs, 8, plateau_start, plateau_end, Time.to_unix_timestamp(t_start))"
507
508
509
510
511
512
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
513
    "# 6. Final Report"
514
515
516
517
   ]
  },
  {
   "cell_type": "code",
518
   "execution_count": null,
519
520
521
   "metadata": {
    "editable": false
   },
522
   "outputs": [],
523
524
   "source": [
    "campaign = hwcb.get_campaign()\n",
525
    "apply_report_template()\n",
Michal Maciejewski's avatar
Michal Maciejewski committed
526
    "file_name_html = '{}_{}-{}-{}_report.html'.format(circuit_name, hwc_test, Time.to_datetime(t_start).strftime(\"%Y.%m.%d_%H%M%S\"), analysis_start_time)\n",
527
    "full_path = '/eos/project/l/lhcsm/hwc/RB/{}/{}/{}/{}'.format(circuit_name, hwc_test, campaign, file_name_html)\n",
528
    "!mkdir -p /eos/project/l/lhcsm/hwc/RB/$circuit_name/$hwc_test/$campaign\n",
529
530
531
532
    "print('Compact notebook report saved to (Windows): ' + '\\\\\\\\cernbox-smb' + full_path.replace('/', '\\\\'))\n",
    "display(Javascript('IPython.notebook.save_notebook();'))\n",
    "time.sleep(5)\n",
    "!{sys.executable} -m jupyter nbconvert --to html $'AN_RB_PLI3.a5.ipynb' --output /eos/project/l/lhcsm/hwc/RB/$circuit_name/$hwc_test/$campaign/$file_name_html --TemplateExporter.exclude_input=True --TagRemovePreprocessor.remove_all_outputs_tags='[\"skip_output\"]'"
533
   ]
Michal Maciejewski's avatar
Michal Maciejewski committed
534
535
536
537
538
539
540
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.5"
  },
  "sparkconnect": {
   "bundled_options": [
    "SparkMetrics",
    "NXCALS"
   ],
Michal Maciejewski's avatar
Michal Maciejewski committed
566
   "list_of_options": []
567
568
569
570
571
572
573
574
575
576
577
578
579
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": false,
   "sideBar": false,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
580
581
582
583
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
Michal Maciejewski's avatar
Michal Maciejewski committed
584
}