Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

minor bugfixes for omfit #271

Merged
merged 3 commits into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions omas/machine_mappings/nstxu.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
"PYTHON": "magnetics_hardware(ods, {pulse})"
},
"magnetics.flux_loop.:.flux.data": {
"COCOSIO": 11,
"PYTHON": "magnetics_floops_data(ods, {pulse})"
},
"magnetics.flux_loop.:.flux.data_error_upper": {
Expand Down
62 changes: 30 additions & 32 deletions omas/machine_mappings/nstxu.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,22 +183,21 @@ def magnetics_floops_data(ods, pulse):

ods1 = ODS()
unwrap(magnetics_hardware)(ods1, pulse)
with omas_environment(ods, cocosio=1):
fetch_assign(
ods,
ods1,
pulse,
channels='magnetics.flux_loop',
identifier='magnetics.flux_loop.{channel}.identifier',
time='magnetics.flux_loop.{channel}.flux.time',
data='magnetics.flux_loop.{channel}.flux.data',
validity='magnetics.flux_loop.{channel}.flux.validity',
mds_server='nstxu',
mds_tree='OPERATIONS',
tdi_expression='\\{signal}',
time_norm=1.0,
data_norm=1.0,
)
fetch_assign(
ods,
ods1,
pulse,
channels='magnetics.flux_loop',
identifier='magnetics.flux_loop.{channel}.identifier',
time='magnetics.flux_loop.{channel}.flux.time',
data='magnetics.flux_loop.{channel}.flux.data',
validity='magnetics.flux_loop.{channel}.flux.validity',
mds_server='nstxu',
mds_tree='OPERATIONS',
tdi_expression='\\{signal}',
time_norm=1.0,
data_norm=1.0,
)

# handle uncertainties
signals = get_support_file(OMFITnstxMHD, nstx_filenames('signals', pulse))
Expand Down Expand Up @@ -226,22 +225,21 @@ def magnetics_probes_data(ods, pulse):

ods1 = ODS()
unwrap(magnetics_hardware)(ods1, pulse)
with omas_environment(ods, cocosio=1):
fetch_assign(
ods,
ods1,
pulse,
channels='magnetics.b_field_pol_probe',
identifier='magnetics.b_field_pol_probe.{channel}.identifier',
time='magnetics.b_field_pol_probe.{channel}.field.time',
data='magnetics.b_field_pol_probe.{channel}.field.data',
validity='magnetics.b_field_pol_probe.{channel}.field.validity',
mds_server='nstxu',
mds_tree='OPERATIONS',
tdi_expression='\\{signal}',
time_norm=1.0,
data_norm=1.0,
)
fetch_assign(
ods,
ods1,
pulse,
channels='magnetics.b_field_pol_probe',
identifier='magnetics.b_field_pol_probe.{channel}.identifier',
time='magnetics.b_field_pol_probe.{channel}.field.time',
data='magnetics.b_field_pol_probe.{channel}.field.data',
validity='magnetics.b_field_pol_probe.{channel}.field.validity',
mds_server='nstxu',
mds_tree='OPERATIONS',
tdi_expression='\\{signal}',
time_norm=1.0,
data_norm=1.0,
)

# handle uncertainties
signals = get_support_file(OMFITnstxMHD, nstx_filenames('signals', pulse))
Expand Down
4 changes: 2 additions & 2 deletions omas/omas_cocos.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
_cocos_signals['camera_x_rays.filter_window.centre.phi']='?' #[ADD?]# 2.000000 # phi [rad]

# CHARGE_EXCHANGE
_cocos_signals['charge_exchange.channel.:.ion.:.velocity_pol.data']='?' #[ADD?]# 2.666667 # velocity _pol [m.s^-1]
_cocos_signals['charge_exchange.channel.:.ion.:.velocity_tor.data']='?' #[ADD?]# 2.666667 # velocity _tor [m.s^-1]
_cocos_signals['charge_exchange.channel.:.ion.:.velocity_pol.data']='POL' # 2.666667 # velocity _pol [m.s^-1]
_cocos_signals['charge_exchange.channel.:.ion.:.velocity_tor.data']='TOR' # 2.666667 # velocity _tor [m.s^-1]
_cocos_signals['charge_exchange.channel.:.momentum_tor.data']='?' #[ADD?]# 2.500000 # momentum _tor [kg.m^-1.s^-1]
_cocos_signals['charge_exchange.aperture.centre.phi']='TOR' # 2.000000 # phi [rad]
_cocos_signals['charge_exchange.channel.:.position.phi.data']='TOR' # 1.800000 # phi [rad]
Expand Down
Loading