Closed lstagner closed 3 years ago
I think you are correct @lstagner
@bclyons12 can you weight in?
You are correct. sigma_rpz=-1
is clockwise phi. That function is just supposed to identify a given COCOS and I don't think it's actively used anywhere in omas or OMFIT. All the transform functions should be properly implemented, so this is an easy fix.
@lstagner I've spent way more time than I'm proud of doing COCOS stuff. Please keep me apprised of what you're working on. Is this in Julia? Is there a repository I can be invited to?
I have invited you and Orso to the JuliaFusion Organization where I've have been keeping fusion related julia code. The COCOS work is currently in the Equilibrium.jl package but I am planning to move it into its own repository.
I'm implementing my own COCOS and I'm using your code as a basis. I think there might be a bug
https://github.com/gafusion/omas/blob/7e21883065119cad530138dc4d1c94b29d1572e8/omas/omas_physics.py#L1986-L1991
If phi is clockwise shouldn't
sigma_rpz
be negative not positive. See Table 1 (below) in the COCOS paperWhen I implemented this in my COCOS my tests were failing on the GEQDSK with known native cocos.