-
Notifications
You must be signed in to change notification settings - Fork 0
Interpolate has nans ! #149
Copy link
Copy link
Open
Description
# Load diag geometry
coll, config = tfs.diag.xray.sxrva.load_diag()
# Add plasma
coll = tfs.plasma.load_background_from_quartz(returnas=coll)
# get points in plasma
dout = coll.plot_diagnostic_geometrical_coverage_slice(key_diag="SXRVA", margin_par=0.85, margin_perp=[0.01, 0.05], res=0.001, indch=0, indref=0, config=config, key_cam='MID_U')
# only use some points
ind = int(dout['ptsx'].shape[1]/2)
# Interpolate rhopn from eq to check that's not the problem
rhopn = coll.interpolate(x0=np.hypot(dout['ptsx'], dout['ptsy']), x1=dout['ptsz'], keys='eq_2drhopn', grid=False, details=False, store=False, domain={'eq_t': 5})['eq_2drhopn']['data'][0, :, ind]
# interpolate cprof_1dTe on same points => nan
Te = coll.interpolate(x0=np.hypot(dout['ptsx'], dout['ptsy']), x1=dout['ptsz'], keys='cprof_1dTe', grid=False, details=False, store=False, domain={'eq_t': 5})['cprof_1dTe']['data'][0, :, ind]
Outputs on rhopn
In [32]: rhopn
Out[32]:
array([0.34480081, 0.34580138, 0.34687646, 0.34795335, 0.34902809,
0.35010067, 0.35117111, 0.35223939, 0.35330552, 0.35436949,
0.35543132, 0.35650259, 0.35758073, 0.35865704, 0.35973152,
0.36080416, 0.36187496, 0.36294392, 0.36401105, 0.36507635,
0.3661398 , 0.36720142])
Outputs on Te
In [35]: Te
Out[35]:
array([nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan, nan,
nan, nan, nan, nan, nan, nan, nan, nan, nan])
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels