Closed henrikjaerleblad closed 1 year ago
I should add that the current implementation of the fix can convert from any COCOS to odd COCOS. I am currently investigating why. Nevertheless, ASCOT needs COCOS 3, so the current fix can still be used to convert any eqdsk file with any COCOS to the COCOS required by ASCOT
I found it! It was just a matter of putting the phiclockwise keyword argument in cocos.py/assign() to True instead of False.
In short, the current fix thus works to convert from any COCOS to any COCOS :)
(I verified via the cocos.py/assign() function)
The conversion between different COCOS is not working in the current ascot5 version. This is important when loading eqdsk files with a COCOS that ASCOT cannot use, i.e. any COCOS other than 3.
I implemented a fix by adding a fix in a5py/templates/importdata.py (line 228) and a new COCOS class and functions in a5py/physlib/cocos.py
The fix is based on the equations that describe how to transform between any COCOS in O. Sauter et al, CPC, 2013. I will create a new branch locally and submit a pull request to fix this issue, in line with the developer docs found in https://ascot4fusion.github.io/ascot5/developing.html.
Please let me know if you have any comments!