simsopt
simsopt copied to clipboard
surface copying classmethod
Added a classmethod to surfacerzfourier.py that copies an existing surface but allows the user to request a different nphi
, ntheta
and grid_range
.
Usecase: your existing equilibrium has half period, but you want to plot the full surface, so you use this method to generate a brother with higher resolution and full range.
Currently only implemented surfaceRZFourier, if this is deemed useful, will generate for the other classes as well.
[is a bit of duplication when this is added to each inherited class, but cleaner than adding a classmethod to the Surface class, as different arrays need to be populated in each inherited class's constructor, which does not follow a neat pattern]
If useful, give me some time to add classmethod to other classes, otherwise please cancel request. If I'm duplicating functionality, my apoligies, Thanks!