PlasmaControl / DESC

Stellarator Equilibrium and Optimization Suite
MIT License
78 stars 16 forks source link

`ds` compute quantity for `Curve` is not correct when `NFP` is not equal to `1` #1093

Open dpanici opened 6 days ago

dpanici commented 6 days ago

ds is supposed to be the spacing between the points in s for a given grid, however grid.spacing for zeta is always 2pi/num_zeta, so when NFP is not equal to 1, ds is not equal to the spacing between the grid points in s. This only matters for FourierRZCurve, but we should probably make a sub parameterization for ds(and maybe also length) for FourierRZCurve that accounts for NFP

f0uriest commented 6 days ago

I thought this was consistent with what we do for grid with multiple periods? Is the length incorrect when NFP>1?

dpanici commented 6 days ago

It works fine, I @unalmis brought up the point though that ds is not actually the spacing between s points so if it were to be used somewhere without the understanding that it is 2pi/N, it could cause errors or confusion

dpanici commented 5 days ago

Remove as a compute quantitiy as it just is an alias for grid.spacing[:,2]