Commit 6503d1c6 authored by thbuffet's avatar thbuffet
Browse files

adapt notebook for QHD PM list

parent 02dfa58f
Pipeline #3153541 passed with stage
in 32 seconds
......@@ -77,35 +77,33 @@
elif circuit_type == 'IPD':
circuits = SignalMetadata.get_circuit_names(circuit_type='IPD2')
circuits.extend(SignalMetadata.get_circuit_names(circuit_type='IPD2_B1B2'))
elif circuit_type == 'IT':
circuits = SignalMetadata.get_circuit_names(circuit_type='IT')
#
#print(circuits)
for circuit_name in circuits:
#print(circuit_name)
if circuit_type == 'RB': circuit_query = RbCircuitQuery(circuit_type, circuit_name)
elif circuit_type == 'RQ': circuit_query = RqCircuitQuery(circuit_type, circuit_name)
elif circuit_type == 'IPQ': circuit_query = IpqCircuitQuery(circuit_type, circuit_name)
elif circuit_type == 'IPD': circuit_query = IpdCircuitQuery(circuit_type, circuit_name)
elif circuit_type == 'IT': circuit_query = ItCircuitQuery(circuit_type, circuit_name)
source_timestamp_qds_df_i = QueryBuilder().with_pm() \
.with_duration(t_start=start_time, t_end=stop_time) \
.with_circuit_type(circuit_query.circuit_type) \
.with_metadata(circuit_name=circuit_name, system='QH', source='*') \
.event_query() \
.filter_source(circuit_name, 'QH') \
.sort_values(by='timestamp').df
#
if source_timestamp_qds_df_i.empty == False:
print(source_timestamp_qds_df_i)
source_timestamp_qds_df_i['circuit_type'] = source_timestamp_qds_df_i.apply(lambda row: circuit_type, axis=1)
source_timestamp_qds_df = pd.concat([source_timestamp_qds_df, source_timestamp_qds_df_i], ignore_index=True)
#
if source_timestamp_qds_df.empty == False:
source_timestamp_qds_df['datetime'] = source_timestamp_qds_df.apply(lambda row: Time.to_string(row['timestamp']), axis=1)
#
```
%% Cell type:markdown id: tags:
# 3. The list of QHD PM Timestamps, if any
......@@ -118,10 +116,13 @@
warnings.warn('WARNINIG: To be checked that QH discharges has been accepted by QHDA-notebooks!', stacklevel=2)
else:
print('There were no QH discharges on selected time range!')
```
%%%% Output: display_data
%% Cell type:markdown id: tags:
# 4. Save html-report
%% Cell type:code id: tags:
......
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