PSFCPlasmaTools / eqtools

Python tools for magnetic equilibria in tokamak plasmas
GNU General Public License v3.0
31 stars 11 forks source link

AUGDDData issue #4

Closed nicolavianello closed 7 years ago

nicolavianello commented 7 years ago

Hi I don't know if anyone is still developing the AUGDData part. There are problems actually in the coordinate conversion (is not able to make a rz2psinorm for points which are well inside the vessel). I guess this has something to do with the proper coordinate system convention used since you are always assuming the coordinate system is like in EFIT but as you can see from this paper (http://www.sciencedirect.com/science/article/pii/S0010465512002962) there are a lot of possible conventions and I guess the one used in AUG is different with respect to EFIT. I will try to investigate since I need the tools.

icfaust commented 7 years ago

I'll give it a look tomorrow. Interfacing with CLISTE output data has been problematic in some ways. Could you give me an example shot number/ time you are having issues with?

nicolavianello commented 7 years ago

Sure you can try for example 33864 @ 2.5s. If you make as Eq = eqtools.AUGDDDdata(33864) rho = Eq.rz2psinorm(1.78,0,2.5,sqrt=True) you get rho = 1.047 whereas the point is clearly inside the separatrix

icfaust commented 7 years ago

Its just a minus sign issue somewhere. When I feed in a number of different radii, it matches at the proper point only that it is the negative of the real value. I am guessing it is similar to your previous issue about the EFIT coordinate system for psi and its comparison to LIQUE. I'll be giving it a look today and tomorrow morning.

nicolavianello commented 7 years ago

Could be. Also considering their q is always negative for example. As I pointed out in the publication of Olivier Sauter there are a lots of different conventions in the different equilibria code. As a major enhancement it would be nice to incorporate these COCOS convention so that in principle the class will be resilient to this type of issues

icfaust commented 7 years ago

I have updated the distro on the sxaug workstations. It was merely an out of date version on these machines containing a bug that has since been fixed. I have cross-validated the mapping with libkk to double check and they are the same.

nicolavianello commented 7 years ago

Actually I did not used the one on sxaug but clone from github. Am I missing something? Where the code resides on sxaug? I generally use their linux cluster actually

icfaust commented 7 years ago

I just corrected the distro on the linux cluster. Give it a test. I have a pet version of python2.7 that I had to install myself. It works on most of the solaris machines, though unfortunately I ran into an installation bug with pdf outputs of matplotlib, so I will be doing a reinstall of that after operation today.

icfaust commented 7 years ago

Also, if you aren't careful, the default python library path might take precedence to other software you might be trying to use, which was likely defaulting to the native install of eqtools hidden in another directory. Make sure to check its location with eqtools.file , but it is now a clone of the current github version. At this time, please be careful with derived magnetic field measurements, I need to get rid of a factor of 2 pi somewhere in the AUG version.

icfaust commented 7 years ago

Not sure why that went to bold... eqtools. file

nicolavianello commented 7 years ago

Worked fine. I didn't noticed it was in the ads-diags already. Can you point me which was the bug? I want to be sure I've the last version (since I'm cloning from my fork and I need to check it is correctly in sync). Furthermore I will try to add the Rmid evaluation so that also rz2rmid will work fine