diff --git a/.github/update_stub.sh b/.github/update_stub.sh index 049ef0586..fef276baf 100755 --- a/.github/update_stub.sh +++ b/.github/update_stub.sh @@ -15,3 +15,7 @@ set -eu -o pipefail this_dir=$(cd $(dirname $0) && pwd) pybind11-stubgen --exit-code -o ${this_dir}/../src/python/ impactx + +# fix weird missing import issues after update to pybind11 v3.0 +sed -i 's/impactx.impactx_pybind.elements/elements/g' src/python/impactx/impactx_pybind/__init__.pyi +sed -i 's/impactx.impactx_pybind.distribution/distribution/g' src/python/impactx/impactx_pybind/__init__.pyi diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 61d381f80..b937eb774 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -70,7 +70,6 @@ repos: hooks: # Run the linter - id: ruff-check - types_or: [ python ] args: [--fix, --exit-non-zero-on-fix] # Run the formatter - id: ruff-format diff --git a/src/python/impactx/MADXParser.pyi b/src/python/impactx/MADXParser.pyi index 8b8e5a48a..e20c25c96 100644 --- a/src/python/impactx/MADXParser.pyi +++ b/src/python/impactx/MADXParser.pyi @@ -1,4 +1,5 @@ from __future__ import annotations + import os as os import re as re import warnings as warnings diff --git a/src/python/impactx/__init__.pyi b/src/python/impactx/__init__.pyi index cb21e3d5c..38bb297b7 100644 --- a/src/python/impactx/__init__.pyi +++ b/src/python/impactx/__init__.pyi @@ -13,6 +13,9 @@ impactx_pybind """ from __future__ import annotations + +import os as os + from amrex import space3d as amr from amrex.space3d.amrex_3d_pybind import SmallMatrix_6x6_F_SI1_double as Map6x6 from impactx.distribution_input_helpers import twiss @@ -20,28 +23,32 @@ from impactx.extensions.ImpactXParticleContainer import ( register_ImpactXParticleContainer_extension, ) from impactx.extensions.KnownElementsList import register_KnownElementsList_extension -from impactx.impactx_pybind import Config -from impactx.impactx_pybind import CoordSystem -from impactx.impactx_pybind import Envelope -from impactx.impactx_pybind import ImpactX -from impactx.impactx_pybind import ImpactXParConstIter -from impactx.impactx_pybind import ImpactXParIter -from impactx.impactx_pybind import ImpactXParticleContainer -from impactx.impactx_pybind import RefPart -from impactx.impactx_pybind import coordinate_transformation -from impactx.impactx_pybind import create_envelope -from impactx.impactx_pybind import distribution -from impactx.impactx_pybind import elements -from impactx.impactx_pybind import push -from impactx.impactx_pybind import wakeconvolution +from impactx.impactx_pybind import ( + Config, + CoordSystem, + Envelope, + ImpactX, + ImpactXParConstIter, + ImpactXParIter, + ImpactXParticleContainer, + RefPart, + coordinate_transformation, + create_envelope, + distribution, + elements, + push, + wakeconvolution, +) from impactx.madx_to_impactx import read_beam -import os as os -from . import MADXParser -from . import distribution_input_helpers -from . import extensions -from . import impactx_pybind -from . import madx_to_impactx -from . import plot + +from . import ( + MADXParser, + distribution_input_helpers, + extensions, + impactx_pybind, + madx_to_impactx, + plot, +) __all__: list[str] = [ "Config", diff --git a/src/python/impactx/distribution_input_helpers.py b/src/python/impactx/distribution_input_helpers.py index 2b0ab4b42..954eb0db8 100644 --- a/src/python/impactx/distribution_input_helpers.py +++ b/src/python/impactx/distribution_input_helpers.py @@ -6,19 +6,19 @@ # # -*- coding: utf-8 -*- -import numpy as np +import numpy def twiss( - beta_x: np.float64, - beta_y: np.float64, - beta_t: np.float64, - emitt_x: np.float64, - emitt_y: np.float64, - emitt_t: np.float64, - alpha_x: np.float64 = 0.0, - alpha_y: np.float64 = 0.0, - alpha_t: np.float64 = 0.0, + beta_x: numpy.float64, + beta_y: numpy.float64, + beta_t: numpy.float64, + emitt_x: numpy.float64, + emitt_y: numpy.float64, + emitt_t: numpy.float64, + alpha_x: numpy.float64 = 0.0, + alpha_y: numpy.float64 = 0.0, + alpha_t: numpy.float64 = 0.0, ): """ Helper function to convert Courant-Snyder / Twiss input into phase space ellipse input. @@ -34,6 +34,8 @@ def twiss( :param alpha_t: Alpha function value in the t dimension, default is 0.0. :return: A dictionary containing calculated phase space input: 'lambdaX', 'lambdaY', 'lambdaT', 'lambdaPx', 'lambdaPy', 'lambdaPt', 'muxpx', 'muypy', 'mutpt'. """ + import numpy as np + if beta_x <= 0.0 or beta_y <= 0.0 or beta_t <= 0.0: raise ValueError( "Input Error: The beta function values need to be non-zero positive values in all dimensions." diff --git a/src/python/impactx/distribution_input_helpers.pyi b/src/python/impactx/distribution_input_helpers.pyi index fbf537f10..db1051235 100644 --- a/src/python/impactx/distribution_input_helpers.pyi +++ b/src/python/impactx/distribution_input_helpers.pyi @@ -1,8 +1,8 @@ from __future__ import annotations -import numpy as np -import numpy -__all__: list[str] = ["np", "twiss"] +import numpy as numpy + +__all__: list[str] = ["numpy", "twiss"] def twiss( beta_x: numpy.float64, diff --git a/src/python/impactx/extensions/KnownElementsList.pyi b/src/python/impactx/extensions/KnownElementsList.pyi index 670a0ee36..412f0d6d4 100644 --- a/src/python/impactx/extensions/KnownElementsList.pyi +++ b/src/python/impactx/extensions/KnownElementsList.pyi @@ -8,9 +8,11 @@ License: BSD-3-Clause-LBNL """ from __future__ import annotations -from impactx.impactx_pybind import elements + import os as os +from impactx.impactx_pybind import elements + __all__: list[str] = [ "elements", "from_pals", diff --git a/src/python/impactx/extensions/__init__.pyi b/src/python/impactx/extensions/__init__.pyi index 3197b71db..8c3325f97 100644 --- a/src/python/impactx/extensions/__init__.pyi +++ b/src/python/impactx/extensions/__init__.pyi @@ -1,5 +1,5 @@ from __future__ import annotations -from . import ImpactXParticleContainer -from . import KnownElementsList + +from . import ImpactXParticleContainer, KnownElementsList __all__: list[str] = ["ImpactXParticleContainer", "KnownElementsList"] diff --git a/src/python/impactx/impactx_pybind/__init__.pyi b/src/python/impactx/impactx_pybind/__init__.pyi index 6a5ac616a..706aa4b55 100644 --- a/src/python/impactx/impactx_pybind/__init__.pyi +++ b/src/python/impactx/impactx_pybind/__init__.pyi @@ -13,14 +13,15 @@ impactx_pybind """ from __future__ import annotations -from amrex import space3d as amr -import amrex.space3d.amrex_3d_pybind -from amrex.space3d.amrex_3d_pybind import SmallMatrix_6x6_F_SI1_double as Map6x6 + import collections.abc import typing -from . import distribution -from . import elements -from . import wakeconvolution + +import amrex.space3d.amrex_3d_pybind +from amrex import space3d as amr +from amrex.space3d.amrex_3d_pybind import SmallMatrix_6x6_F_SI1_double as Map6x6 + +from . import distribution, elements, wakeconvolution __all__: list[str] = [ "Config", @@ -108,15 +109,15 @@ class ImpactX: def add_particles( self, bunch_charge: typing.SupportsFloat, - distr: impactx.impactx_pybind.distribution.Empty - | impactx.impactx_pybind.distribution.Gaussian - | impactx.impactx_pybind.distribution.Kurth4D - | impactx.impactx_pybind.distribution.Kurth6D - | impactx.impactx_pybind.distribution.KVdist - | impactx.impactx_pybind.distribution.Thermal - | impactx.impactx_pybind.distribution.Triangle - | impactx.impactx_pybind.distribution.Semigaussian - | impactx.impactx_pybind.distribution.Waterbag, + distr: distribution.Empty + | distribution.Gaussian + | distribution.Kurth4D + | distribution.Kurth6D + | distribution.KVdist + | distribution.Thermal + | distribution.Triangle + | distribution.Semigaussian + | distribution.Waterbag, npart: typing.SupportsInt, ) -> None: """ @@ -145,15 +146,15 @@ class ImpactX: def init_envelope( self, ref: RefPart, - distr: impactx.impactx_pybind.distribution.Empty - | impactx.impactx_pybind.distribution.Gaussian - | impactx.impactx_pybind.distribution.Kurth4D - | impactx.impactx_pybind.distribution.Kurth6D - | impactx.impactx_pybind.distribution.KVdist - | impactx.impactx_pybind.distribution.Thermal - | impactx.impactx_pybind.distribution.Triangle - | impactx.impactx_pybind.distribution.Semigaussian - | impactx.impactx_pybind.distribution.Waterbag, + distr: distribution.Empty + | distribution.Gaussian + | distribution.Kurth4D + | distribution.Kurth6D + | distribution.KVdist + | distribution.Thermal + | distribution.Triangle + | distribution.Semigaussian + | distribution.Waterbag, intensity: typing.SupportsFloat | None = None, ) -> None: """ @@ -798,55 +799,55 @@ def coordinate_transformation( """ def create_envelope( - arg0: impactx.impactx_pybind.distribution.Empty - | impactx.impactx_pybind.distribution.Gaussian - | impactx.impactx_pybind.distribution.Kurth4D - | impactx.impactx_pybind.distribution.Kurth6D - | impactx.impactx_pybind.distribution.KVdist - | impactx.impactx_pybind.distribution.Thermal - | impactx.impactx_pybind.distribution.Triangle - | impactx.impactx_pybind.distribution.Semigaussian - | impactx.impactx_pybind.distribution.Waterbag, + arg0: distribution.Empty + | distribution.Gaussian + | distribution.Kurth4D + | distribution.Kurth6D + | distribution.KVdist + | distribution.Thermal + | distribution.Triangle + | distribution.Semigaussian + | distribution.Waterbag, arg1: typing.SupportsFloat | None, ) -> Envelope: ... def push( pc: ImpactXParticleContainer, - element: impactx.impactx_pybind.elements.Empty - | impactx.impactx_pybind.elements.Aperture - | impactx.impactx_pybind.elements.Buncher - | impactx.impactx_pybind.elements.CFbend - | impactx.impactx_pybind.elements.ChrAcc - | impactx.impactx_pybind.elements.ChrDrift - | impactx.impactx_pybind.elements.ChrPlasmaLens - | impactx.impactx_pybind.elements.ChrQuad - | impactx.impactx_pybind.elements.ConstF - | impactx.impactx_pybind.elements.BeamMonitor - | impactx.impactx_pybind.elements.DipEdge - | impactx.impactx_pybind.elements.Drift - | impactx.impactx_pybind.elements.ExactCFbend - | impactx.impactx_pybind.elements.ExactDrift - | impactx.impactx_pybind.elements.ExactMultipole - | impactx.impactx_pybind.elements.ExactQuad - | impactx.impactx_pybind.elements.ExactSbend - | impactx.impactx_pybind.elements.Kicker - | impactx.impactx_pybind.elements.LinearMap - | impactx.impactx_pybind.elements.Marker - | impactx.impactx_pybind.elements.Multipole - | impactx.impactx_pybind.elements.NonlinearLens - | impactx.impactx_pybind.elements.PlaneXYRot - | impactx.impactx_pybind.elements.Programmable - | impactx.impactx_pybind.elements.PRot - | impactx.impactx_pybind.elements.Quad - | impactx.impactx_pybind.elements.QuadEdge - | impactx.impactx_pybind.elements.RFCavity - | impactx.impactx_pybind.elements.Sbend - | impactx.impactx_pybind.elements.ShortRF - | impactx.impactx_pybind.elements.SoftSolenoid - | impactx.impactx_pybind.elements.SoftQuadrupole - | impactx.impactx_pybind.elements.Sol - | impactx.impactx_pybind.elements.Source - | impactx.impactx_pybind.elements.TaperedPL - | impactx.impactx_pybind.elements.ThinDipole, + element: elements.Empty + | elements.Aperture + | elements.Buncher + | elements.CFbend + | elements.ChrAcc + | elements.ChrDrift + | elements.ChrPlasmaLens + | elements.ChrQuad + | elements.ConstF + | elements.BeamMonitor + | elements.DipEdge + | elements.Drift + | elements.ExactCFbend + | elements.ExactDrift + | elements.ExactMultipole + | elements.ExactQuad + | elements.ExactSbend + | elements.Kicker + | elements.LinearMap + | elements.Marker + | elements.Multipole + | elements.NonlinearLens + | elements.PlaneXYRot + | elements.Programmable + | elements.PRot + | elements.Quad + | elements.QuadEdge + | elements.RFCavity + | elements.Sbend + | elements.ShortRF + | elements.SoftSolenoid + | elements.SoftQuadrupole + | elements.Sol + | elements.Source + | elements.TaperedPL + | elements.ThinDipole, step: typing.SupportsInt = 0, period: typing.SupportsInt = 0, ) -> None: diff --git a/src/python/impactx/impactx_pybind/distribution.pyi b/src/python/impactx/impactx_pybind/distribution.pyi index b3c162735..978148d7e 100644 --- a/src/python/impactx/impactx_pybind/distribution.pyi +++ b/src/python/impactx/impactx_pybind/distribution.pyi @@ -3,6 +3,7 @@ Particle beam distributions in ImpactX """ from __future__ import annotations + import typing __all__: list[str] = [ diff --git a/src/python/impactx/impactx_pybind/elements.pyi b/src/python/impactx/impactx_pybind/elements.pyi deleted file mode 100644 index a3431ddc3..000000000 --- a/src/python/impactx/impactx_pybind/elements.pyi +++ /dev/null @@ -1,1456 +0,0 @@ -""" -Accelerator lattice elements in ImpactX -""" - -from __future__ import annotations - -import typing - -import impactx.impactx_pybind - -__all__ = [ - "Alignment", - "Aperture", - "BeamMonitor", - "Buncher", - "CFbend", - "ChrAcc", - "ChrDrift", - "ChrPlasmaLens", - "ChrQuad", - "ConstF", - "DipEdge", - "Drift", - "Empty", - "ExactDrift", - "ExactSbend", - "Kicker", - "KnownElementsList", - "Marker", - "Multipole", - "Named", - "NonlinearLens", - "PRot", - "PlaneXYRot", - "Programmable", - "Quad", - "RFCavity", - "Sbend", - "ShortRF", - "SoftQuadrupole", - "SoftSolenoid", - "Sol", - "TaperedPL", - "Thick", - "Thin", - "ThinDipole", -] - -class Alignment: - def __init__(self) -> None: - """ - Mixin class for lattice elements with horizontal/vertical alignment errors. - """ - @property - def dx(self) -> float: - """ - horizontal translation error in m - """ - @dx.setter - def dx(self, arg1: float) -> None: ... - @property - def dy(self) -> float: - """ - vertical translation error in m - """ - @dy.setter - def dy(self, arg1: float) -> None: ... - @property - def rotation(self) -> float: - """ - rotation error in the transverse plane in degree - """ - @rotation.setter - def rotation(self, arg1: float) -> None: ... - -class Aperture(Named, Thin, Alignment): - def __init__( - self, - xmax: float, - ymax: float, - repeat_x: float = 0, - repeat_y: float = 0, - shape: str = "rectangular", - action: str = "transmit", - dx: float = 0, - dy: float = 0, - rotation: float = 0, - name: str | None = None, - ) -> None: - """ - A short collimator element applying a transverse aperture boundary. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def action(self) -> str: - """ - action type (transmit, absorb) - """ - @action.setter - def action(self, arg1: str) -> None: ... - @property - def repeat_x(self) -> float: - """ - horizontal period for repeated aperture masking - """ - @repeat_x.setter - def repeat_x(self, arg1: float) -> None: ... - @property - def repeat_y(self) -> float: - """ - vertical period for repeated aperture masking - """ - @repeat_y.setter - def repeat_y(self, arg1: float) -> None: ... - @property - def shape(self) -> str: - """ - aperture type (rectangular, elliptical) - """ - @shape.setter - def shape(self, arg1: str) -> None: ... - @property - def xmax(self) -> float: - """ - maximum horizontal coordinate - """ - @xmax.setter - def xmax(self, arg1: float) -> None: ... - @property - def ymax(self) -> float: - """ - maximum vertical coordinate - """ - @ymax.setter - def ymax(self, arg1: float) -> None: ... - -class BeamMonitor(Thin): - def __init__( - self, - name: str, - backend: str = "default", - encoding: str = "g", - period_sample_intervals: int = 1, - ) -> None: - """ - This element writes the particle beam out to openPMD data. - """ - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def alpha(self) -> float: - """ - Twiss alpha of the bare linear lattice at the location of output for the nonlinear IOTA invariants H and I. - Horizontal and vertical values must be equal. - """ - @alpha.setter - def alpha(self, arg1: float) -> None: ... - @property - def beta(self) -> float: - """ - Twiss beta (in meters) of the bare linear lattice at the location of output for the nonlinear IOTA invariants H and I. - Horizontal and vertical values must be equal. - """ - @beta.setter - def beta(self, arg1: float) -> None: ... - @property - def cn(self) -> float: - """ - Scale factor (in meters^(1/2)) of the IOTA nonlinear magnetic insert element used for computing H and I. - """ - @cn.setter - def cn(self, arg1: float) -> None: ... - @property - def name(self) -> str: - """ - name of the series - """ - @property - def nonlinear_lens_invariants(self) -> bool: - """ - Compute and output the invariants H and I within the nonlinear magnetic insert element - """ - @nonlinear_lens_invariants.setter - def nonlinear_lens_invariants(self, arg1: bool) -> None: ... - @property - def tn(self) -> float: - """ - Dimensionless strength of the IOTA nonlinear magnetic insert element used for computing H and I. - """ - @tn.setter - def tn(self, arg1: float) -> None: ... - -class Buncher(Named, Thin, Alignment): - def __init__( - self, - V: float, - k: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - name: str | None = None, - ) -> None: - """ - A short linear RF cavity element at zero-crossing for bunching. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def V(self) -> float: - """ - Normalized RF voltage drop V = Emax*L/(c*Brho) - """ - @V.setter - def V(self, arg1: float) -> None: ... - @property - def k(self) -> float: - """ - Wavenumber of RF in 1/m - """ - @k.setter - def k(self, arg1: float) -> None: ... - -class CFbend(Named, Thick, Alignment): - def __init__( - self, - ds: float, - rc: float, - k: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - An ideal combined function bend (sector bend with quadrupole component). - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def k(self) -> float: - """ - Quadrupole strength in m^(-2) (MADX convention) = (gradient in T/m) / (rigidity in T-m) k > 0 horizontal focusing k < 0 horizontal defocusing - """ - @k.setter - def k(self, arg1: float) -> None: ... - @property - def rc(self) -> float: - """ - Radius of curvature in m - """ - @rc.setter - def rc(self, arg1: float) -> None: ... - -class ChrAcc(Named, Thick, Alignment): - def __init__( - self, - ds: float, - ez: float, - bz: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - A region of Uniform Acceleration, with chromatic effects included. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def bz(self) -> float: - """ - magnetic field strength in 1/m - """ - @bz.setter - def bz(self, arg1: float) -> None: ... - @property - def ez(self) -> float: - """ - electric field strength in 1/m - """ - @ez.setter - def ez(self, arg1: float) -> None: ... - -class ChrDrift(Named, Thick, Alignment): - def __init__( - self, - ds: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - A Drift with chromatic effects included. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - -class ChrPlasmaLens(Named, Thick, Alignment): - def __init__( - self, - ds: float, - k: float, - unit: int = 0, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - An active Plasma Lens with chromatic effects included. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def k(self) -> float: - """ - focusing strength in 1/m^2 (or T/m) - """ - @k.setter - def k(self, arg1: float) -> None: ... - @property - def unit(self) -> int: - """ - unit specification for focusing strength - """ - @unit.setter - def unit(self, arg1: int) -> None: ... - -class ChrQuad(Named, Thick, Alignment): - def __init__( - self, - ds: float, - k: float, - unit: int = 0, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - A Quadrupole magnet with chromatic effects included. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def k(self) -> float: - """ - quadrupole strength in 1/m^2 (or T/m) - """ - @k.setter - def k(self, arg1: float) -> None: ... - @property - def unit(self) -> int: - """ - unit specification for quad strength - """ - @unit.setter - def unit(self, arg1: int) -> None: ... - -class ConstF(Named, Thick, Alignment): - def __init__( - self, - ds: float, - kx: float, - ky: float, - kt: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - A linear Constant Focusing element. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def kt(self) -> float: - """ - focusing t strength in 1/m - """ - @kt.setter - def kt(self, arg1: float) -> None: ... - @property - def kx(self) -> float: - """ - focusing x strength in 1/m - """ - @kx.setter - def kx(self, arg1: float) -> None: ... - @property - def ky(self) -> float: - """ - focusing y strength in 1/m - """ - @ky.setter - def ky(self, arg1: float) -> None: ... - -class DipEdge(Named, Thin, Alignment): - def __init__( - self, - psi: float, - rc: float, - g: float, - K2: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - name: str | None = None, - ) -> None: - """ - Edge focusing associated with bend entry or exit. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def K2(self) -> float: - """ - Fringe field integral (unitless) - """ - @K2.setter - def K2(self, arg1: float) -> None: ... - @property - def g(self) -> float: - """ - Gap parameter in m - """ - @g.setter - def g(self, arg1: float) -> None: ... - @property - def psi(self) -> float: - """ - Pole face angle in rad - """ - @psi.setter - def psi(self, arg1: float) -> None: ... - @property - def rc(self) -> float: - """ - Radius of curvature in m - """ - @rc.setter - def rc(self, arg1: float) -> None: ... - -class Drift(Named, Thick, Alignment): - def __init__( - self, - ds: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - A drift. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - -class Empty(Thin): - def __init__(self) -> None: - """ - This element does nothing. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - -class ExactDrift(Named, Thick, Alignment): - def __init__( - self, - ds: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - A Drift using the exact nonlinear map. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - -class ExactSbend(Named, Thick, Alignment): - def __init__( - self, - ds: float, - phi: float, - B: float = 0.0, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - An ideal sector bend using the exact nonlinear map. When B = 0, the reference bending radius is defined by r0 = length / (angle in rad), corresponding to a magnetic field of B = rigidity / r0; otherwise the reference bending radius is defined by r0 = rigidity / B. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def B(self) -> float: - """ - Magnetic field in Tesla; when B = 0 (default), the reference bending radius is defined by r0 = length / (angle in rad), corresponding to a magnetic field of B = rigidity / r0; otherwise the reference bending radius is defined by r0 = rigidity / B - """ - @B.setter - def B(self, arg1: float) -> None: ... - @property - def phi(self) -> float: - """ - Bend angle in degrees - """ - @phi.setter - def phi(self, arg1: float) -> None: ... - -class Kicker(Named, Thin, Alignment): - def __init__( - self, - xkick: float, - ykick: float, - unit: str = "dimensionless", - dx: float = 0, - dy: float = 0, - rotation: float = 0, - name: str | None = None, - ) -> None: - """ - A thin transverse kicker element. Kicks are for unit "dimensionless" or in "T-m". - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def xkick(self) -> float: - """ - horizontal kick strength (dimensionless OR T-m) - """ - @xkick.setter - def xkick(self, arg1: float) -> None: ... - @property - def ykick(self) -> float: - """ - vertical kick strength (dimensionless OR T-m) - """ - @ykick.setter - def ykick(self, arg1: float) -> None: ... - -class KnownElementsList: - @typing.overload - def __init__(self) -> None: ... - @typing.overload - def __init__( - self, - arg0: Empty - | Aperture - | Buncher - | CFbend - | ChrAcc - | ChrDrift - | ChrPlasmaLens - | ChrQuad - | ConstF - | BeamMonitor - | DipEdge - | Drift - | ExactDrift - | ExactSbend - | Kicker - | Marker - | Multipole - | NonlinearLens - | PlaneXYRot - | Programmable - | PRot - | Quad - | RFCavity - | Sbend - | ShortRF - | SoftSolenoid - | SoftQuadrupole - | Sol - | TaperedPL - | ThinDipole, - ) -> None: ... - @typing.overload - def __init__(self, arg0: list) -> None: ... - def __iter__( - self, - ) -> typing.Iterator[ - Empty - | Aperture - | Buncher - | CFbend - | ChrAcc - | ChrDrift - | ChrPlasmaLens - | ChrQuad - | ConstF - | BeamMonitor - | DipEdge - | Drift - | ExactDrift - | ExactSbend - | Kicker - | Marker - | Multipole - | NonlinearLens - | PlaneXYRot - | Programmable - | PRot - | Quad - | RFCavity - | Sbend - | ShortRF - | SoftSolenoid - | SoftQuadrupole - | Sol - | TaperedPL - | ThinDipole - ]: ... - def __len__(self) -> int: - """ - The length of the list. - """ - def append( - self, - arg0: Empty - | Aperture - | Buncher - | CFbend - | ChrAcc - | ChrDrift - | ChrPlasmaLens - | ChrQuad - | ConstF - | BeamMonitor - | DipEdge - | Drift - | ExactDrift - | ExactSbend - | Kicker - | Marker - | Multipole - | NonlinearLens - | PlaneXYRot - | Programmable - | PRot - | Quad - | RFCavity - | Sbend - | ShortRF - | SoftSolenoid - | SoftQuadrupole - | Sol - | TaperedPL - | ThinDipole, - ) -> None: - """ - Add a single element to the list. - """ - def clear(self) -> None: - """ - Clear the list to become empty. - """ - @typing.overload - def extend(self, arg0: KnownElementsList) -> KnownElementsList: - """ - Add a list of elements to the list. - """ - @typing.overload - def extend(self, arg0: list) -> KnownElementsList: - """ - Add a list of elements to the list. - """ - def load_file(self, madx_file, nslice=1): ... - def pop_back(self) -> None: - """ - Return and remove the last element of the list. - """ - -class Marker(Named, Thin): - def __init__(self, arg0: str) -> None: - """ - This named element does nothing. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - -class Multipole(Named, Thin, Alignment): - def __init__( - self, - multipole: int, - K_normal: float, - K_skew: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - name: str | None = None, - ) -> None: - """ - A general thin multipole element. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def K_normal(self) -> float: - """ - Integrated normal multipole coefficient (1/meter^m) - """ - @K_normal.setter - def K_normal(self, arg1: float) -> None: ... - @property - def K_skew(self) -> float: - """ - Integrated skew multipole coefficient (1/meter^m) - """ - @K_skew.setter - def K_skew(self, arg1: float) -> None: ... - @property - def multipole(self) -> int: - """ - index m (m=1 dipole, m=2 quadrupole, m=3 sextupole etc.) - """ - @multipole.setter - def multipole(self, arg1: float) -> None: ... - -class Named: - @property - def has_name(self) -> bool: ... - @property - def name(self) -> str: - """ - segment length in m - """ - @name.setter - def name(self, arg1: str) -> None: ... - -class NonlinearLens(Named, Thin, Alignment): - def __init__( - self, - knll: float, - cnll: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - name: str | None = None, - ) -> None: - """ - Single short segment of the nonlinear magnetic insert element. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def cnll(self) -> float: - """ - distance of singularities from the origin (m) - """ - @cnll.setter - def cnll(self, arg1: float) -> None: ... - @property - def knll(self) -> float: - """ - integrated strength of the nonlinear lens (m) - """ - @knll.setter - def knll(self, arg1: float) -> None: ... - -class PRot(Named, Thin): - def __init__(self, phi_in: float, phi_out: float, name: str | None = None) -> None: - """ - An exact pole-face rotation in the x-z plane. Both angles are in degrees. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def phi_in(self) -> float: - """ - angle of the reference particle with respect to the longitudinal (z) axis in the original frame in degrees - """ - @phi_in.setter - def phi_in(self, arg1: float) -> None: ... - @property - def phi_out(self) -> float: - """ - angle of the reference particle with respect to the longitudinal (z) axis in the rotated frame in degrees - """ - @phi_out.setter - def phi_out(self, arg1: float) -> None: ... - -class PlaneXYRot(Named, Thin, Alignment): - def __init__( - self, - angle: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - name: str | None = None, - ) -> None: - """ - A rotation in the x-y plane. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def angle(self) -> float: - """ - Rotation angle (rad). - """ - @angle.setter - def angle(self, arg1: float) -> None: ... - -class Programmable(Named): - ds: float - nslice: int - def __init__( - self, ds: float = 0.0, nslice: int = 1, name: str | None = None - ) -> None: - """ - A programmable beam optics element. - """ - def __repr__(self) -> str: ... - @property - def beam_particles( - self, - ) -> typing.Callable[ - [impactx.impactx_pybind.ImpactXParIter, impactx.impactx_pybind.RefPart], None - ]: - """ - hook for beam particles (pti, RefPart) - """ - @beam_particles.setter - def beam_particles( - self, - arg1: typing.Callable[ - [impactx.impactx_pybind.ImpactXParIter, impactx.impactx_pybind.RefPart], - None, - ], - ) -> None: ... - @property - def push( - self, - ) -> typing.Callable[ - [impactx.impactx_pybind.ImpactXParticleContainer, int, int], None - ]: - """ - hook for push of whole container (pc, step, period) - """ - @push.setter - def push( - self, - arg1: typing.Callable[ - [impactx.impactx_pybind.ImpactXParticleContainer, int, int], None - ], - ) -> None: ... - @property - def ref_particle(self) -> typing.Callable[[impactx.impactx_pybind.RefPart], None]: - """ - hook for reference particle (RefPart) - """ - @ref_particle.setter - def ref_particle( - self, arg1: typing.Callable[[impactx.impactx_pybind.RefPart], None] - ) -> None: ... - @property - def threadsafe(self) -> bool: - """ - allow threading via OpenMP for the particle iterator loop, default=False (note: if OMP backend is active) - """ - @threadsafe.setter - def threadsafe(self, arg1: bool) -> None: ... - -class Quad(Named, Thick, Alignment): - def __init__( - self, - ds: float, - k: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - A Quadrupole magnet. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def k(self) -> float: - """ - Quadrupole strength in m^(-2) (MADX convention) = (gradient in T/m) / (rigidity in T-m) k > 0 horizontal focusing k < 0 horizontal defocusing - """ - @k.setter - def k(self, arg1: float) -> None: ... - -class RFCavity(Named, Thick, Alignment): - def __init__( - self, - ds: float, - escale: float, - freq: float, - phase: float, - cos_coefficients: list[float], - sin_coefficients: list[float], - dx: float = 0, - dy: float = 0, - rotation: float = 0, - mapsteps: int = 1, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - An RF cavity. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def escale(self) -> float: - """ - scaling factor for on-axis RF electric field in 1/m = (peak on-axis electric field Ez in MV/m) / (particle rest energy in MeV) - """ - @escale.setter - def escale(self, arg1: float) -> None: ... - @property - def freq(self) -> float: - """ - RF frequency in Hz - """ - @freq.setter - def freq(self, arg1: float) -> None: ... - @property - def mapsteps(self) -> int: - """ - number of integration steps per slice used for map and reference particle push in applied fields - """ - @mapsteps.setter - def mapsteps(self, arg1: int) -> None: ... - @property - def phase(self) -> float: - """ - RF driven phase in degrees - """ - @phase.setter - def phase(self, arg1: float) -> None: ... - -class Sbend(Named, Thick, Alignment): - def __init__( - self, - ds: float, - rc: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - An ideal sector bend. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def rc(self) -> float: - """ - Radius of curvature in m - """ - @rc.setter - def rc(self, arg1: float) -> None: ... - -class ShortRF(Named, Thin, Alignment): - def __init__( - self, - V: float, - freq: float, - phase: float = -90.0, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - name: str | None = None, - ) -> None: - """ - A short RF cavity element. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def V(self) -> float: - """ - Normalized RF voltage V = maximum energy gain/(m*c^2) - """ - @V.setter - def V(self, arg1: float) -> None: ... - @property - def freq(self) -> float: - """ - RF frequency in Hz - """ - @freq.setter - def freq(self, arg1: float) -> None: ... - @property - def phase(self) -> float: - """ - RF synchronous phase in degrees (phase = 0 corresponds to maximum energy gain, phase = -90 corresponds go zero energy gain for bunching) - """ - @phase.setter - def phase(self, arg1: float) -> None: ... - -class SoftQuadrupole(Named, Thick, Alignment): - def __init__( - self, - ds: float, - gscale: float, - cos_coefficients: list[float], - sin_coefficients: list[float], - dx: float = 0, - dy: float = 0, - rotation: float = 0, - mapsteps: int = 1, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - A soft-edge quadrupole. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def gscale(self) -> float: - """ - Scaling factor for on-axis field gradient in inverse meters - """ - @gscale.setter - def gscale(self, arg1: float) -> None: ... - @property - def mapsteps(self) -> int: - """ - number of integration steps per slice used for map and reference particle push in applied fields - """ - @mapsteps.setter - def mapsteps(self, arg1: int) -> None: ... - -class SoftSolenoid(Named, Thick, Alignment): - def __init__( - self, - ds: float, - bscale: float, - cos_coefficients: list[float], - sin_coefficients: list[float], - unit: float = 0, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - mapsteps: int = 1, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - A soft-edge solenoid. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def bscale(self) -> float: - """ - Scaling factor for on-axis magnetic field Bz in inverse meters (if unit = 0) or magnetic field Bz in T (SI units, if unit = 1) - """ - @bscale.setter - def bscale(self, arg1: float) -> None: ... - @property - def mapsteps(self) -> int: - """ - number of integration steps per slice used for map and reference particle push in applied fields - """ - @mapsteps.setter - def mapsteps(self, arg1: int) -> None: ... - @property - def unit(self) -> int: - """ - specification of units for scaling of the on-axis longitudinal magnetic field - """ - @unit.setter - def unit(self, arg1: float) -> None: ... - -class Sol(Named, Thick, Alignment): - def __init__( - self, - ds: float, - ks: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - nslice: int = 1, - name: str | None = None, - ) -> None: - """ - An ideal hard-edge Solenoid magnet. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def ks(self) -> float: - """ - Solenoid strength in m^(-1) (MADX convention) in (magnetic field Bz in T) / (rigidity in T-m) - """ - @ks.setter - def ks(self, arg1: float) -> None: ... - -class TaperedPL(Named, Thin, Alignment): - def __init__( - self, - k: float, - taper: float, - unit: int = 0, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - name: str | None = None, - ) -> None: - """ - A thin nonlinear plasma lens with transverse (horizontal) taper - - .. math:: - - B_x = g \\left( y + \\frac{xy}{D_x} \\right), \\quad \\quad B_y = -g \\left(x + \\frac{x^2 + y^2}{2 D_x} \\right) - - where :math:`g` is the (linear) field gradient in T/m and :math:`D_x` is the targeted horizontal dispersion in m. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def k(self) -> float: - """ - integrated focusing strength in m^(-1) (if unit = 0) or integrated focusing strength in T (if unit = 1) - """ - @k.setter - def k(self, arg1: float) -> None: ... - @property - def taper(self) -> float: - """ - horizontal taper parameter in m^(-1) = 1 / (target horizontal dispersion in m) - """ - @taper.setter - def taper(self, arg1: float) -> None: ... - @property - def unit(self) -> int: - """ - specification of units for plasma lens focusing strength - """ - @unit.setter - def unit(self, arg1: int) -> None: ... - -class Thick: - def __init__(self, ds: float, nslice: float = 1) -> None: - """ - Mixin class for lattice elements with finite length. - """ - @property - def ds(self) -> float: - """ - segment length in m - """ - @ds.setter - def ds(self, arg1: float) -> None: ... - @property - def nslice(self) -> int: - """ - number of slices used for the application of space charge - """ - @nslice.setter - def nslice(self, arg1: int) -> None: ... - -class Thin: - def __init__(self) -> None: - """ - Mixin class for lattice elements with zero length. - """ - @property - def ds(self) -> float: - """ - segment length in m - """ - @property - def nslice(self) -> int: - """ - number of slices used for the application of space charge - """ - -class ThinDipole(Named, Thin, Alignment): - def __init__( - self, - theta: float, - rc: float, - dx: float = 0, - dy: float = 0, - rotation: float = 0, - name: str | None = None, - ) -> None: - """ - A thin kick model of a dipole bend. - """ - def __repr__(self) -> str: ... - def push( - self, - pc: impactx.impactx_pybind.ImpactXParticleContainer, - step: int = 0, - period: int = 0, - ) -> None: - """ - Push first the reference particle, then all other particles. - """ - @property - def rc(self) -> float: - """ - Effective curvature radius (meters) - """ - @rc.setter - def rc(self, arg1: float) -> None: ... - @property - def theta(self) -> float: - """ - Bend angle (degrees) - """ - @theta.setter - def theta(self, arg1: float) -> None: ... diff --git a/src/python/impactx/impactx_pybind/elements/__init__.pyi b/src/python/impactx/impactx_pybind/elements/__init__.pyi index a7b5d7b7e..530253ca5 100644 --- a/src/python/impactx/impactx_pybind/elements/__init__.pyi +++ b/src/python/impactx/impactx_pybind/elements/__init__.pyi @@ -3,12 +3,14 @@ Accelerator lattice elements in ImpactX """ from __future__ import annotations -import amrex.space3d.amrex_3d_pybind + import collections.abc -import impactx.impactx_pybind import typing -from . import mixin -from . import transformation + +import amrex.space3d.amrex_3d_pybind +import impactx.impactx_pybind + +from . import mixin, transformation __all__: list[str] = [ "Aperture", diff --git a/src/python/impactx/impactx_pybind/elements/mixin.pyi b/src/python/impactx/impactx_pybind/elements/mixin.pyi index 3b7678ffb..f1aba2e14 100644 --- a/src/python/impactx/impactx_pybind/elements/mixin.pyi +++ b/src/python/impactx/impactx_pybind/elements/mixin.pyi @@ -3,6 +3,7 @@ Mixin classes for accelerator lattice elements in ImpactX """ from __future__ import annotations + import typing __all__: list[str] = ["Alignment", "Named", "PipeAperture", "Thick", "Thin"] diff --git a/src/python/impactx/impactx_pybind/elements/transformation.pyi b/src/python/impactx/impactx_pybind/elements/transformation.pyi index 93a4e7cfa..68905f1d1 100644 --- a/src/python/impactx/impactx_pybind/elements/transformation.pyi +++ b/src/python/impactx/impactx_pybind/elements/transformation.pyi @@ -3,9 +3,11 @@ Transform and modify lattices """ from __future__ import annotations -import impactx.impactx_pybind.elements + import typing +import impactx.impactx_pybind.elements + __all__: list[str] = ["insert_element_every_ds"] def insert_element_every_ds( diff --git a/src/python/impactx/impactx_pybind/wakeconvolution.pyi b/src/python/impactx/impactx_pybind/wakeconvolution.pyi index 390416ec9..3d93ab5be 100644 --- a/src/python/impactx/impactx_pybind/wakeconvolution.pyi +++ b/src/python/impactx/impactx_pybind/wakeconvolution.pyi @@ -1,7 +1,9 @@ from __future__ import annotations + +import typing + import amrex.space3d.amrex_3d_pybind import impactx.impactx_pybind -import typing __all__: list[str] = [ "alpha", diff --git a/src/python/impactx/madx_to_impactx.pyi b/src/python/impactx/madx_to_impactx.pyi index 394420d2f..313ec943c 100644 --- a/src/python/impactx/madx_to_impactx.pyi +++ b/src/python/impactx/madx_to_impactx.pyi @@ -1,11 +1,12 @@ from __future__ import annotations -from impactx.MADXParser import MADXParser -import impactx.impactx_pybind -from impactx.impactx_pybind import RefPart -from impactx.impactx_pybind import elements + import typing import warnings as warnings +import impactx.impactx_pybind +from impactx.impactx_pybind import RefPart, elements +from impactx.MADXParser import MADXParser + __all__: list[str] = [ "MADXParser", "RefPart", diff --git a/src/python/impactx/plot/__init__.pyi b/src/python/impactx/plot/__init__.pyi index 7a4490064..46978d293 100644 --- a/src/python/impactx/plot/__init__.pyi +++ b/src/python/impactx/plot/__init__.pyi @@ -1,4 +1,5 @@ from __future__ import annotations + from . import Survey __all__: list[str] = ["Survey"]