desc.coils.CoilSet.save_in_makegrid_format
- CoilSet.save_in_makegrid_format(coilsFilename, NFP=None, grid=None)Source
Save CoilSet as a MAKEGRID-formatted coil txtfile.
By default, each coil is assigned to the same Coilgroup in MAKEGRID with the name “Modular”. For more details see the MAKEGRID documentation https://princetonuniversity.github.io/STELLOPT/MAKEGRID.html
Note: if a nested CoilSet, will flatten it first before saving
- Parameters:
filename (str or path-like) – path save CoilSet as a file in MAKEGRID txt format
NFP (int, default None) – If > 1, assumes that the CoilSet is the coils for a coilset with a nominal discrete toroidal symmetry of NFP, and will put that NFP in the periods line of the coils file generated. defaults to 1
grid (Grid, ndarray, int,) – Grid of sample points along each coil to save. if None, will default to the coil compute functions’s default grid