Open jcwright77 opened 4 years ago
see https://drive.google.com/file/d/1JcFNsz5Ao0NO7ABCphu8QQle1WVMqdar/view?usp=sharing for a colaboratory notebook demonstrating the error and fix. Error is generated first time through, then monkey patch fixes error
@jcwright77 Almost everything in that function was created just to set the "vessel" locations to have the same shape as the flux surface and I would be happy if we got rid of it entirely since it's very finicky. I'm not quite sure what the R, Z pairs representing the vessel are for in an eqdsk, but it's my assumption that they're for vessel currents. We could get rid of this in favor of a user supplied vessel shape and a default behavior of finding the bounding box of the last closed flux surface. If WHAM has a 2D vacuum vessel profile spec'd out already we could implement that instead of relying on this shoddy code I wrote a while ago. Thoughts from @Jon-Pizzo would be appreciated too.
I don't believe there is a 2D vacuum vessel specified in the eqdsk file, however I do have the coordinates for it as it was used in genray input files. I can email you a text file containing the R,Z pairs.
in the wham jupyter example, running write_eqdsk(R,Z,psi,plas_currents,"wham_eqdsk.txt","/content/WHAM_Mirror Equilib") produces this error:
ValueError Traceback (most recent call last)