Open tbody-cfs opened 1 month ago
In the separatrix_operational_space.ipynb
notebook, you can see what is causing this issue. Where there are multiple points fulfilling the mask condition with the same value, the code is returning the first value it finds.
from cfspopcon.shaping_and_selection import find_coords_of_minimum
dataset["SepOS_LH_transition"].T.plot(vmin=0.9, vmax=1.1)
dataset["SepOS_LH_transition"].T.plot.contour(levels=[1.0])
point = dataset.isel(find_coords_of_minimum(dataset["separatrix_electron_temp"], mask=dataset["SepOS_LH_transition"] > 1.0))
plt.scatter(point.separatrix_electron_density, point.separatrix_electron_temp, color="r")
plt.ylim(50, 70)
Increasing the resolution is a simple solution, i.e. 10x increase in both dimensions
Exact minimum point is a bit off — what is going on here?