Skip to content

Commit

Permalink
Merge pull request #271 from gafusion/jmcclena_bugfix
Browse files Browse the repository at this point in the history
minor bugfixes for omfit
  • Loading branch information
jmcclena authored Sep 9, 2023
2 parents 4784b88 + 6a8e233 commit e719614
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 34 deletions.
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

0 comments on commit e719614

Please sign in to comment.