@@ -85,12 +85,9 @@ def get_units(str):
8585 if found :
8686 if rank > 1 :
8787 xdata = c .get ('dim_of(_s,1)' ).data ()
88- # xunits = get_units('dim_of(_s,1)')
8988 ydata = c .get ('dim_of(_s)' ).data ()
90- # yunits = get_units('dim_of(_s)')
9189 else :
9290 xdata = c .get ('dim_of(_s)' ).data ()
93- # xunits = get_units('dim_of(_s)')
9491
9592 # MDSplus seems to return 2-D arrays transposed. Change them back.
9693 if np .ndim (data ) == 2 :
@@ -114,16 +111,13 @@ def fetch_jet_data(signal_path, shot_num, c):
114111 data = c .get ('_sig=jet("{}/",{})' .format (signal_path , shot_num )).data ()
115112 if np .ndim (data ) == 2 :
116113 data = np .transpose (data )
117- time = c .get (
118- '_sig=dim_of(jet("{}/",{}),1)' .format (
119- signal_path , shot_num )).data ()
120- ydata = c .get (
121- '_sig=dim_of(jet("{}/",{}),0)' .format (
122- signal_path , shot_num )).data ()
114+ time = c .get ('_sig=dim_of(jet("{}/",{}),1)' .format (
115+ signal_path , shot_num )).data ()
116+ ydata = c .get ('_sig=dim_of(jet("{}/",{}),0)' .format (
117+ signal_path , shot_num )).data ()
123118 else :
124- time = c .get (
125- '_sig=dim_of(jet("{}/",{}))' .format (
126- signal_path , shot_num )).data ()
119+ time = c .get ('_sig=dim_of(jet("{}/",{}))' .format (
120+ signal_path , shot_num )).data ()
127121 found = True
128122 except Exception as e :
129123 g .print_unique (e )
@@ -345,6 +339,11 @@ def fetch_nstx_data(signal_path, shot_num, c):
345339 # 'tmamp1':tmamp1, 'tmamp2':tmamp2, 'tmfreq1':tmfreq1, 'tmfreq2':tmfreq2,
346340 # 'pechin':pechin,
347341 # 'rho_profile_spatial':rho_profile_spatial, 'etemp':etemp,
342+ # -----
343+ # TODO(KGF): replace this hacky workaround
344+ # IMPORTANT: must comment-out the following line when preprocessing for
345+ # training on JET CW and testing on JET ILW (FRNN 0D).
346+ # Otherwise 1K+ CW shots are excluded due to missing profile data
348347 'etemp_profile' : etemp_profile , 'edens_profile' : edens_profile ,
349348 # 'itemp_profile':itemp_profile, 'zdens_profile':zdens_profile,
350349 # 'trot_profile':trot_profile, 'pthm_profile':pthm_profile,
0 commit comments