Skip to content

Commit

Permalink
Fix EFIT source tree in prad peaking computation (#200)
Browse files Browse the repository at this point in the history
* Change r0 & z0 tree_name to '_efit_tree' to make them consistent with aminor

* fixup! Change r0 & z0 tree_name to '_efit_tree' to make them consistent with aminor
  • Loading branch information
yumouwei authored Jul 2, 2024
1 parent 952b91b commit 97c6031
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1159,18 +1159,17 @@ def _get_peaking_factors(params: ShotDataRequestParams):
@staticmethod
@parameter_cached_method(
columns=["prad_peaking"],
used_trees=["cmod", "spectroscopy"],
used_trees=["_efit_tree", "spectroscopy"],
tokamak=Tokamak.CMOD,
)
def _get_prad_peaking(params: ShotDataRequestParams):
prad_peaking = np.full(len(params.shot_props.times), np.nan)
try:
# TODO: why use CMOD here?
r0 = 0.01 * params.mds_conn.get_data(
r"\efit_aeqdsk:rmagx", tree_name="cmod"
r"\efit_aeqdsk:rmagx", tree_name="_efit_tree"
)
z0 = 0.01 * params.mds_conn.get_data(
r"\efit_aeqdsk:zmagx", tree_name="cmod"
r"\efit_aeqdsk:zmagx", tree_name="_efit_tree"
)
aminor, efit_time = params.mds_conn.get_data_with_dims(
r"\efit_aeqdsk:aminor", tree_name="_efit_tree"
Expand Down

0 comments on commit 97c6031

Please sign in to comment.