Commit b3ae5767 authored by thbuffet's avatar thbuffet
Browse files

fix notebook for the references

parent a4990ea7
Pipeline #2570664 passed with stage
in 14 seconds
......@@ -54,11 +54,11 @@
from lhcsmapi.reference.Reference import Reference
def query_qh_parallel(input_param):
source, timestamp, is_ref = input_param
if is_ref:
timestamp = Reference.get_quench_heater_reference_discharge('RB', source)
timestamp = Reference.get_quench_heater_reference_discharge('RB', source, timestamp)
u_hds_dfs = QueryBuilder().with_pm() \
.with_timestamp(timestamp) \
.with_circuit_type('RB') \
.with_metadata(circuit_name=qh_pm_search.get_circuit_name(), system='QH', signal=['U_HDS', 'I_HDS'], source=source,
......@@ -139,11 +139,11 @@
# Get matching voltage and current
u_hds_dfs = list(filter(lambda col: 'U_HDS' in col.columns.values[0], qh_source_timestamp_dfs_dct[(source, timestamp)]))
i_hds_dfs = list(filter(lambda col: 'I_HDS' in col.columns.values[0], qh_source_timestamp_dfs_dct[(source, timestamp)]))
# Get matching reference voltage and current
timestamp_ref = Reference.get_quench_heater_reference_discharge('RB', source)
timestamp_ref = Reference.get_quench_heater_reference_discharge('RB', source, timestamp)
u_hds_ref_dfs = list(filter(lambda col: 'U_HDS' in col.columns.values[0], qh_source_timestamp_ref_dfs_dct[(source, timestamp_ref)]))
i_hds_ref_dfs = list(filter(lambda col: 'I_HDS' in col.columns.values[0], qh_source_timestamp_ref_dfs_dct[(source, timestamp_ref)]))
try:
nominal_voltage = qh_pm_search.get_discharge_level()
......
......@@ -53,11 +53,11 @@
from lhcsmapi.pyedsl.QueryBuilder import QueryBuilder
from lhcsmapi.reference.Reference import Reference
def query_qh_parallel(input_param):
source, timestamp, is_ref = input_param
if is_ref:
timestamp = Reference.get_quench_heater_reference_discharge('RQ', source)
timestamp = Reference.get_quench_heater_reference_discharge('RQ', source, timestamp)
u_hds_dfs = QueryBuilder().with_pm() \
.with_timestamp(timestamp) \
.with_circuit_type('RQ') \
.with_metadata(circuit_name=qh_pm_search.get_circuit_name(), system='QH', signal=['U_HDS', 'I_HDS'], source=source,
......
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