Skip to content

Commit

Permalink
Fix missing codeparameter import
Browse files Browse the repository at this point in the history
  • Loading branch information
AreWeDreaming committed Nov 12, 2024
1 parent e01fc8c commit 2fb89f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions omas/machine_mappings/d3d.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@
"ec_launchers.beam.:.time": {
"PYTHON": "ec_launcher_active_hardware(ods, {pulse})"
},
"ec_launchers.code.parameters.toray.bhalf": {
"PYTHON": "ec_launcher_active_hardware(ods, {pulse})"
},
"ece": {
"PYTHON": "electron_cyclotron_emission_hardware(ods, {pulse}, {fast_ece!r})"
},
Expand Down
3 changes: 2 additions & 1 deletion omas/machine_mappings/d3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,7 @@ def coils_non_axisymmetric_current_data(ods, pulse):
# ================================
@machine_mapping_function(__regression_arguments__, pulse=170325)
def ec_launcher_active_hardware(ods, pulse):
from omas.omas_core import CodeParameters
setup = '.ECH.'
# We need three queries in order to retrieve only the fields we need
# First the amount of systems in use
Expand Down Expand Up @@ -545,7 +546,7 @@ def ec_launcher_active_hardware(ods, pulse):
system_index = system_no - 1
if gyrotrons[f'STAT_{system_no}'] == 0:
continue
b_half.append(query["DISPERSION" + f'_{system_no}'])
b_half.append(systems["DISPERSION" + f'_{system_no}'])
beam = ods['ec_launchers.beam'][system_index]
time = np.atleast_1d(gyrotrons[f'TIME_AZIANG_{system_no}']) / 1.0e3
if len(time) == 1:
Expand Down

0 comments on commit 2fb89f7

Please sign in to comment.