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 14, 2025
1 parent c00f6d2 commit 71df0dd
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/python/impactx/impactx_pybind/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -708,6 +708,7 @@ def push(
| elements.ExactDrift
| elements.ExactSbend
| elements.Kicker
| elements.LinearMap
| elements.Marker
| elements.Multipole
| elements.NonlinearLens
Expand Down
52 changes: 52 additions & 0 deletions src/python/impactx/impactx_pybind/elements/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ from __future__ import annotations

import typing

import amrex.space3d.amrex_3d_pybind
import impactx.impactx_pybind

from . import mixin
Expand All @@ -27,6 +28,7 @@ __all__ = [
"ExactSbend",
"Kicker",
"KnownElementsList",
"LinearMap",
"Marker",
"Multipole",
"NonlinearLens",
Expand Down Expand Up @@ -698,6 +700,7 @@ class KnownElementsList:
| ExactDrift
| ExactSbend
| Kicker
| LinearMap
| Marker
| Multipole
| NonlinearLens
Expand Down Expand Up @@ -734,6 +737,7 @@ class KnownElementsList:
| ExactDrift
| ExactSbend
| Kicker
| LinearMap
| Marker
| Multipole
| NonlinearLens
Expand Down Expand Up @@ -771,6 +775,7 @@ class KnownElementsList:
| ExactDrift
| ExactSbend
| Kicker
| LinearMap
| Marker
| Multipole
| NonlinearLens
Expand Down Expand Up @@ -810,6 +815,53 @@ class KnownElementsList:
Return and remove the last element of the list.
"""

class LinearMap(mixin.Named, mixin.Alignment, mixin.LinearTransport):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
def __init__(
self,
R: amrex.space3d.amrex_3d_pybind.SmallMatrix_6x6_F_SI1_double,
ds: float = 0,
dx: float = 0,
dy: float = 0,
rotation: float = 0,
name: str | None = None,
) -> None:
"""
(A user-provided linear map, represented as a 6x6 transport matrix.)
"""
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 R(self) -> amrex.space3d.amrex_3d_pybind.SmallMatrix_6x6_F_SI1_double:
"""
linear map as a 6x6 transport matrix
"""
@R.setter
def R(
self, arg1: amrex.space3d.amrex_3d_pybind.SmallMatrix_6x6_F_SI1_double
) -> None: ...
@property
def ds(self) -> float:
"""
segment length in m
"""
@ds.setter
def ds(self, arg1: float) -> None: ...
@property
def nslice(self) -> int:
"""
one, because we do not support slicing of this element
"""

class Marker(mixin.Named, mixin.Thin):
@staticmethod
def _pybind11_conduit_v1_(*args, **kwargs): ...
Expand Down
13 changes: 12 additions & 1 deletion src/python/impactx/impactx_pybind/elements/mixin.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Mixin classes for accelerator lattice elements in ImpactX

from __future__ import annotations

__all__ = ["Alignment", "Named", "Thick", "Thin"]
import amrex.space3d.amrex_3d_pybind

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

class Alignment:
@staticmethod
Expand Down Expand Up @@ -35,6 +37,15 @@ class Alignment:
@rotation.setter
def rotation(self, arg1: float) -> None: ...

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
def _pybind11_conduit_v1_(*args, **kwargs): ...
Expand Down

0 comments on commit 71df0dd

Please sign in to comment.