Skip to content

Commit

Permalink
Update Stub Files
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l authored and github-actions[bot] committed Jan 16, 2025
1 parent 7f8d15f commit 2e620d1
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 46 deletions.
90 changes: 60 additions & 30 deletions src/python/impactx/impactx_pybind/elements/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ class Aperture(mixin.Named, mixin.Thin, mixin.Alignment):
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
self,
xmax: float,
ymax: float,
aperture_x: float,
aperture_y: float,
repeat_x: float = 0,
repeat_y: float = 0,
shape: str = "rectangular",
Expand Down Expand Up @@ -84,6 +84,20 @@ class Aperture(mixin.Named, mixin.Thin, mixin.Alignment):
@action.setter
def action(self, arg1: str) -> None: ...
@property
def aperture_x(self) -> float:
"""
maximum horizontal coordinate
"""
@aperture_x.setter
def aperture_x(self, arg1: float) -> None: ...
@property
def aperture_y(self) -> float:
"""
maximum vertical coordinate
"""
@aperture_y.setter
def aperture_y(self, arg1: float) -> None: ...
@property
def repeat_x(self) -> float:
"""
horizontal period for repeated aperture masking
Expand All @@ -104,20 +118,6 @@ class Aperture(mixin.Named, mixin.Thin, mixin.Alignment):
"""
@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(mixin.Thin):
@staticmethod
Expand Down Expand Up @@ -224,7 +224,7 @@ class Buncher(mixin.Named, mixin.Thin, mixin.Alignment):
@k.setter
def k(self, arg1: float) -> None: ...

class CFbend(mixin.Named, mixin.Thick, mixin.Alignment):
class CFbend(mixin.Named, mixin.Thick, mixin.Alignment, mixin.PipeAperture):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
Expand All @@ -235,6 +235,8 @@ class CFbend(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
nslice: int = 1,
name: str | None = None,
) -> None:
Expand Down Expand Up @@ -277,6 +279,8 @@ class ChrAcc(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
nslice: int = 1,
name: str | None = None,
) -> None:
Expand Down Expand Up @@ -308,7 +312,7 @@ class ChrAcc(mixin.Named, mixin.Thick, mixin.Alignment):
@ez.setter
def ez(self, arg1: float) -> None: ...

class ChrDrift(mixin.Named, mixin.Thick, mixin.Alignment):
class ChrDrift(mixin.Named, mixin.Thick, mixin.Alignment, mixin.PipeAperture):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
Expand All @@ -317,6 +321,8 @@ class ChrDrift(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
nslice: int = 1,
name: str | None = None,
) -> None:
Expand All @@ -334,7 +340,7 @@ class ChrDrift(mixin.Named, mixin.Thick, mixin.Alignment):
Push first the reference particle, then all other particles.
"""

class ChrPlasmaLens(mixin.Named, mixin.Thick, mixin.Alignment):
class ChrPlasmaLens(mixin.Named, mixin.Thick, mixin.Alignment, mixin.PipeAperture):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
Expand All @@ -345,6 +351,8 @@ class ChrPlasmaLens(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
nslice: int = 1,
name: str | None = None,
) -> None:
Expand Down Expand Up @@ -376,7 +384,7 @@ class ChrPlasmaLens(mixin.Named, mixin.Thick, mixin.Alignment):
@unit.setter
def unit(self, arg1: int) -> None: ...

class ChrQuad(mixin.Named, mixin.Thick, mixin.Alignment):
class ChrQuad(mixin.Named, mixin.Thick, mixin.Alignment, mixin.PipeAperture):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
Expand All @@ -387,6 +395,8 @@ class ChrQuad(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
nslice: int = 1,
name: str | None = None,
) -> None:
Expand Down Expand Up @@ -418,7 +428,7 @@ class ChrQuad(mixin.Named, mixin.Thick, mixin.Alignment):
@unit.setter
def unit(self, arg1: int) -> None: ...

class ConstF(mixin.Named, mixin.Thick, mixin.Alignment):
class ConstF(mixin.Named, mixin.Thick, mixin.Alignment, mixin.PipeAperture):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
Expand All @@ -430,6 +440,8 @@ class ConstF(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
nslice: int = 1,
name: str | None = None,
) -> None:
Expand Down Expand Up @@ -524,7 +536,7 @@ class DipEdge(mixin.Named, mixin.Thin, mixin.Alignment):
@rc.setter
def rc(self, arg1: float) -> None: ...

class Drift(mixin.Named, mixin.Thick, mixin.Alignment):
class Drift(mixin.Named, mixin.Thick, mixin.Alignment, mixin.PipeAperture):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
Expand All @@ -533,6 +545,8 @@ class Drift(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
nslice: int = 1,
name: str | None = None,
) -> None:
Expand Down Expand Up @@ -568,7 +582,7 @@ class Empty(mixin.Thin):
Push first the reference particle, then all other particles.
"""

class ExactDrift(mixin.Named, mixin.Thick, mixin.Alignment):
class ExactDrift(mixin.Named, mixin.Thick, mixin.Alignment, mixin.PipeAperture):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
Expand All @@ -577,6 +591,8 @@ class ExactDrift(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
nslice: int = 1,
name: str | None = None,
) -> None:
Expand All @@ -594,7 +610,7 @@ class ExactDrift(mixin.Named, mixin.Thick, mixin.Alignment):
Push first the reference particle, then all other particles.
"""

class ExactSbend(mixin.Named, mixin.Thick, mixin.Alignment):
class ExactSbend(mixin.Named, mixin.Thick, mixin.Alignment, mixin.PipeAperture):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
Expand All @@ -605,6 +621,8 @@ class ExactSbend(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
nslice: int = 1,
name: str | None = None,
) -> None:
Expand Down Expand Up @@ -1094,7 +1112,7 @@ class Programmable(mixin.Named):
@threadsafe.setter
def threadsafe(self, arg1: bool) -> None: ...

class Quad(mixin.Named, mixin.Thick, mixin.Alignment):
class Quad(mixin.Named, mixin.Thick, mixin.Alignment, mixin.PipeAperture):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
Expand All @@ -1104,6 +1122,8 @@ class Quad(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
nslice: int = 1,
name: str | None = None,
) -> None:
Expand All @@ -1128,7 +1148,7 @@ class Quad(mixin.Named, mixin.Thick, mixin.Alignment):
@k.setter
def k(self, arg1: float) -> None: ...

class RFCavity(mixin.Named, mixin.Thick, mixin.Alignment):
class RFCavity(mixin.Named, mixin.Thick, mixin.Alignment, mixin.PipeAperture):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
Expand All @@ -1142,6 +1162,8 @@ class RFCavity(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
mapsteps: int = 1,
nslice: int = 1,
name: str | None = None,
Expand Down Expand Up @@ -1188,7 +1210,7 @@ class RFCavity(mixin.Named, mixin.Thick, mixin.Alignment):
@phase.setter
def phase(self, arg1: float) -> None: ...

class Sbend(mixin.Named, mixin.Thick, mixin.Alignment):
class Sbend(mixin.Named, mixin.Thick, mixin.Alignment, mixin.PipeAperture):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
Expand All @@ -1198,6 +1220,8 @@ class Sbend(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
nslice: int = 1,
name: str | None = None,
) -> None:
Expand Down Expand Up @@ -1270,7 +1294,7 @@ class ShortRF(mixin.Named, mixin.Thin, mixin.Alignment):
@phase.setter
def phase(self, arg1: float) -> None: ...

class SoftQuadrupole(mixin.Named, mixin.Thick, mixin.Alignment):
class SoftQuadrupole(mixin.Named, mixin.Thick, mixin.Alignment, mixin.PipeAperture):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
Expand All @@ -1282,6 +1306,8 @@ class SoftQuadrupole(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
mapsteps: int = 1,
nslice: int = 1,
name: str | None = None,
Expand Down Expand Up @@ -1314,7 +1340,7 @@ class SoftQuadrupole(mixin.Named, mixin.Thick, mixin.Alignment):
@mapsteps.setter
def mapsteps(self, arg1: int) -> None: ...

class SoftSolenoid(mixin.Named, mixin.Thick, mixin.Alignment):
class SoftSolenoid(mixin.Named, mixin.Thick, mixin.Alignment, mixin.PipeAperture):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
Expand All @@ -1327,6 +1353,8 @@ class SoftSolenoid(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
mapsteps: int = 1,
nslice: int = 1,
name: str | None = None,
Expand Down Expand Up @@ -1366,7 +1394,7 @@ class SoftSolenoid(mixin.Named, mixin.Thick, mixin.Alignment):
@unit.setter
def unit(self, arg1: float) -> None: ...

class Sol(mixin.Named, mixin.Thick, mixin.Alignment):
class Sol(mixin.Named, mixin.Thick, mixin.Alignment, mixin.PipeAperture):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
Expand All @@ -1376,6 +1404,8 @@ class Sol(mixin.Named, mixin.Thick, mixin.Alignment):
dx: float = 0,
dy: float = 0,
rotation: float = 0,
aperture_x: float = 0,
aperture_y: float = 0,
nslice: int = 1,
name: str | None = None,
) -> None:
Expand Down
30 changes: 14 additions & 16 deletions src/python/impactx/impactx_pybind/elements/mixin.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,11 @@ from __future__ import annotations

import amrex.space3d.amrex_3d_pybind

__all__ = ["Alignment", "LinearTransport", "Named", "Thick", "Thin"]
__all__ = ["Alignment", "LinearTransport", "Named", "PipeAperture", "Thick", "Thin"]

class Alignment:
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(self) -> None:
"""
Mixin class for lattice elements with horizontal/vertical alignment errors.
"""
@property
def dx(self) -> float:
"""
Expand All @@ -41,10 +37,6 @@ class LinearTransport:
Map6x6 = amrex.space3d.amrex_3d_pybind.SmallMatrix_6x6_F_SI1_double
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(self) -> None:
"""
Mixin class for linear transport approximation via matrices.
"""

class Named:
@staticmethod
Expand All @@ -59,14 +51,24 @@ class Named:
@name.setter
def name(self, arg1: str) -> None: ...

class Thick:
class PipeAperture:
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(self, ds: float, nslice: float = 1) -> None:
@property
def aperture_x(self) -> float:
"""
Mixin class for lattice elements with finite length.
horizontal aperture in m
"""
@property
def aperture_y(self) -> float:
"""
vertical aperture in m
"""

class Thick:
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
@property
def ds(self) -> float:
"""
segment length in m
Expand All @@ -84,10 +86,6 @@ class Thick:
class Thin:
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(self) -> None:
"""
Mixin class for lattice elements with zero length.
"""
@property
def ds(self) -> float:
"""
Expand Down

0 comments on commit 2e620d1

Please sign in to comment.