From dfb594286f011a87bd41929afd4fdd40aeff624b Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 12 Nov 2024 14:52:42 +0100 Subject: [PATCH] import fix because file had name of fn --- src/simsopt/util/__init__.py | 3 ++- src/simsopt/util/current_along_z.py | 29 ----------------------------- 2 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 src/simsopt/util/current_along_z.py diff --git a/src/simsopt/util/__init__.py b/src/simsopt/util/__init__.py index c04e6a16e..f653606f2 100644 --- a/src/simsopt/util/__init__.py +++ b/src/simsopt/util/__init__.py @@ -1,11 +1,11 @@ import os +from .helper_coils import * from .mpi import * from .logger import * from .famus_helpers import * from .polarization_project import * from .permanent_magnet_helper_functions import * -from .current_along_z import * """Boolean indicating if we are in the GitHub actions CI""" in_github_actions = "CI" in os.environ and os.environ['CI'].lower() in ['1', 'true'] @@ -16,5 +16,6 @@ + famus_helpers.__all__ + polarization_project.__all__ + permanent_magnet_helper_functions.__all__ + + helper_coils.__all__ + ['in_github_actions'] ) diff --git a/src/simsopt/util/current_along_z.py b/src/simsopt/util/current_along_z.py deleted file mode 100644 index 65335081a..000000000 --- a/src/simsopt/util/current_along_z.py +++ /dev/null @@ -1,29 +0,0 @@ -""" -This file contains a helper function that returns a simsopt.field.Coil object that represents a current along the z-axis. - -Useful for adding a toroidal field, for example to perturb a stellarator equilibrium. -""" - -from simsopt.geo import CurveAlongZ -from simsopt.field import Coil, Current - -__all__ = ['current_along_z'] - - -def current_along_z(current, quadpoints=100, x0=0., y0=0., zscale=10, coil_dofs_fixed=True): - """ - Returns a Coil object that represents a current along the z-axis. - Add this to your a coilset before calling simsopt.BiotSavart to - add a toroidal field. - - The dofs of the coil are only the current value, unles you set coil_dofs_fixed=False. - - Args: - current: the current in Amperes - quadpoints: number of grid points/resolution along the curve; - x0: (default 0) the x-coordinate . - y0: (default 0) the y-coordinate. - zscale: (default 10) points are closer together at z=0, and spread apart using a zscale*tan(pi*(gamma-.5)) scaling. - coil_dofs_fixed: (default True) unless you are doing strange things, you don't want to move the coil from the axis. - """ - return Coil(Current(current), CurveAlongZ(quadpoints, x0, y0, zscale, coil_dofs_fixed=coil_dofs_fixed))