From afb72d639a31f906b059380ab117a64d6aee7437 Mon Sep 17 00:00:00 2001 From: Torrin Date: Fri, 20 Mar 2026 17:33:22 -0700 Subject: [PATCH] Fix the gas_injection mappings for EAST These mappings have been out of date for a few years and cause the tests to fail when run on Omega. It turns out test_mongo actually checks these, but it's not clear why this wasn't encountered sooner. It's likely a result of some recent build clean-up that it is now being seen. --- omas/machine_mappings/east.json | 12 +++++++++--- omas/machine_mappings/east.py | 10 ++++++++-- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/omas/machine_mappings/east.json b/omas/machine_mappings/east.json index e43294565..016cdf0cd 100644 --- a/omas/machine_mappings/east.json +++ b/omas/machine_mappings/east.json @@ -31,10 +31,16 @@ "gas_injection.pipe.:.second_point.z": { "PYTHON": "setup_gas_injection_hardware_description_east(ods, {pulse})" }, - "gas_injection.pipe.:.valve.:": { + "gas_injection.pipe.:.valve_indices": { "PYTHON": "setup_gas_injection_hardware_description_east(ods, {pulse})" }, - "gas_injection.pipe.:.valve.:.identifier": { + "gas_injection.valve.:": { + "PYTHON": "setup_gas_injection_hardware_description_east(ods, {pulse})" + }, + "gas_injection.valve.:.identifier": { + "PYTHON": "setup_gas_injection_hardware_description_east(ods, {pulse})" + }, + "gas_injection.valve.:.pipe_indices": { "PYTHON": "setup_gas_injection_hardware_description_east(ods, {pulse})" }, "langmuir_probes.embedded.:": { @@ -86,4 +92,4 @@ "pf_active.coil.:.name": { "PYTHON": "setup_pf_active_hardware_description_east(ods)" } -} \ No newline at end of file +} diff --git a/omas/machine_mappings/east.py b/omas/machine_mappings/east.py index 471a31e3f..9f520c4e1 100644 --- a/omas/machine_mappings/east.py +++ b/omas/machine_mappings/east.py @@ -189,31 +189,37 @@ def port_angle(port): # OUPEV2 # I think it's between probes 8 & 9. I am guessing. This gives R, Z # I think it's in port O + valve = ods['gas_injection']['valve'][i] + valve['identifier'] = 'OUPEV2' + valve['pipe_indices'] = [i] pipe = ods['gas_injection']['pipe'][i] phi = port_angle('o') pipe['name'] = 'OUPEV2_{:03d}'.format(int(round(phi * 180 / np.pi))) pipe['exit_position']['r'] = 1.73 # m pipe['exit_position']['z'] = 1.057 # m pipe['exit_position']['phi'] = phi - pipe['valve'][0]['identifier'] = 'OUPEV2' pipe['second_point']['phi'] = phi pipe['second_point']['r'] = 1.729 pipe['second_point']['z'] = 1.05675 + pipe['valve_indices'] = [i] i += 1 # ODPEV2 # It's in the lower divertor. I'll have to eyeball from a drawing. Also, I am guessing which tip it is. # I think it's in port O + valve = ods['gas_injection']['valve'][i] + valve['identifier'] = 'ODPEV2' + valve['pipe_indices'] = [i] pipe = ods['gas_injection']['pipe'][i] phi = port_angle('o') pipe['name'] = 'ODPEV2_{:03d}'.format(int(round(phi * 180 / np.pi))) pipe['exit_position']['r'] = 1.811 # m pipe['exit_position']['z'] = -0.972 # m pipe['exit_position']['phi'] = phi - pipe['valve'][0]['identifier'] = 'ODPEV2' pipe['second_point']['phi'] = phi pipe['second_point']['r'] = 1.806 pipe['second_point']['z'] = -0.9715 + pipe['valve_indices'] = [i] i += 1