Scattering potentials¶
This module builds complex functors (cplx_functor_obj) for the scattering
potential as a function of qx, qy, and qz, from a material and a
shape or geometry. An optional radiation source and optional size-distribution
widths (where applicable) are passed through to the C++ implementation. Use
pos to replicate the same potential at multiple positions.
Functions¶
potential()—shape_objplusmaterial_obj(general case).shape()—geometry_objplusmaterial_obj(backward-compatible).box(),sphere(),cylinder(),pyramid()— shortcuts for common shapes.
- escape.scattering.potential.potential(qx, qy, qz, shp, mat, src=None, pos=None, name: str = 'Potential', notes: str = '') cplx_functor_obj¶
Create a scattering potential from a shape object.
Parameters:¶
- qxvariable_obj
The x-component of the wave vector.
- qyvariable_obj
The y-component of the wave vector.
- qzvariable_obj
The z-component of the wave vector.
- shpshape_obj
The shape object defining geometry and form-factor.
- matmaterial_obj
The material.
- srcsource_obj, optional
The radiation source (default None -> empty source).
- poslist, optional
Positions as list of (x, y, z) tuples (default None -> [(0,0,0)]).
- namestr, optional
The name of the potential (default is “Potential”).
- notesstr, optional
User notes.
Returns:¶
- cplx_functor_obj
The scattering potential as a complex functor.
- escape.scattering.potential.box(qx, qy, qz, mat, wx, wy, wz, swx=0.0, swy=0.0, swz=0.0, src=None, pos=None, name: str = 'Box', notes: str = '') cplx_functor_obj¶
Create a box scattering potential.
Parameters:¶
- qxvariable_obj
The x-component of the wave vector.
- qyvariable_obj
The y-component of the wave vector.
- qzvariable_obj
The z-component of the wave vector.
- matmaterial_obj
The material.
- wxParameterLike
Width in x.
- wyParameterLike
Width in y.
- wzParameterLike
Width in z.
- swxParameterLike, optional
Scattering width in x (default 0.0).
- swyParameterLike, optional
Scattering width in y (default 0.0).
- swzParameterLike, optional
Scattering width in z (default 0.0).
- srcsource_obj, optional
The radiation source (default None -> empty source).
- poslist, optional
Positions as list of (x, y, z) tuples (default None -> [(0,0,0)]).
- namestr, optional
The name of the potential (default is “Box”).
- notesstr, optional
User notes.
Returns:¶
- cplx_functor_obj
The scattering potential as a complex functor.
- escape.scattering.potential.sphere(qx, qy, qz, mat, radius, sw=0.0, src=None, pos=None, name: str = 'Sphere', notes: str = '') cplx_functor_obj¶
Create a sphere scattering potential.
Parameters:¶
- qxvariable_obj
The x-component of the wave vector.
- qyvariable_obj
The y-component of the wave vector.
- qzvariable_obj
The z-component of the wave vector.
- matmaterial_obj
The material.
- radiusParameterLike
Radius of the sphere.
- swParameterLike, optional
Scattering width (default 0.0).
- srcsource_obj, optional
The radiation source (default None -> empty source).
- poslist, optional
Positions as list of (x, y, z) tuples (default None -> [(0,0,0)]).
- namestr, optional
The name of the potential (default is “Sphere”).
- notesstr, optional
User notes.
Returns:¶
- cplx_functor_obj
The scattering potential as a complex functor.
- escape.scattering.potential.cylinder(qx, qy, qz, mat, radius, height, swp=0.0, swz=0.0, src=None, pos=None, name: str = 'Cylinder', notes: str = '') cplx_functor_obj¶
Create a cylinder scattering potential.
Parameters:¶
- qxvariable_obj
The x-component of the wave vector.
- qyvariable_obj
The y-component of the wave vector.
- qzvariable_obj
The z-component of the wave vector.
- matmaterial_obj
The material.
- radiusParameterLike
Radius of the cylinder.
- heightParameterLike
Height of the cylinder.
- swpParameterLike, optional
Scattering width in-plane (default 0.0).
- swzParameterLike, optional
Scattering width along z (default 0.0).
- srcsource_obj, optional
The radiation source (default None -> empty source).
- poslist, optional
Positions as list of (x, y, z) tuples (default None -> [(0,0,0)]).
- namestr, optional
The name of the potential (default is “Cylinder”).
- notesstr, optional
User notes.
Returns:¶
- cplx_functor_obj
The scattering potential as a complex functor.
- escape.scattering.potential.pyramid(qx, qy, qz, mat, wx_bot, wx_top, wy_bot, wy_top, center_bot=None, center_top=None, swx=0.0, swy=0.0, swz=0.0, src=None, pos=None, name: str = 'Pyramid', notes: str = '') cplx_functor_obj¶
Create a pyramid scattering potential.
Parameters:¶
- qxvariable_obj
The x-component of the wave vector.
- qyvariable_obj
The y-component of the wave vector.
- qzvariable_obj
The z-component of the wave vector.
- matmaterial_obj
The material.
- wx_botParameterLike
Width at bottom in x.
- wx_topParameterLike
Width at top in x.
- wy_botParameterLike
Width at bottom in y.
- wy_topParameterLike
Width at top in y.
- center_botlist, optional
Bottom center as [x, y, z] (default None -> [0,0,0]).
- center_toplist, optional
Top center as [x, y, z] (default None -> [0,0,0]).
- swxParameterLike, optional
Scattering width in x (default 0.0).
- swyParameterLike, optional
Scattering width in y (default 0.0).
- swzParameterLike, optional
Scattering width in z (default 0.0).
- srcsource_obj, optional
The radiation source (default None -> empty source).
- poslist, optional
Positions as list of (x, y, z) tuples (default None -> [(0,0,0)]).
- namestr, optional
The name of the potential (default is “Pyramid”).
- notesstr, optional
User notes.
Returns:¶
- cplx_functor_obj
The scattering potential as a complex functor.
- escape.scattering.potential.shape(qx, qy, qz, mat, geom, swx=0.0, swy=0.0, swz=0.0, pos=None, name: str = 'Potential', notes: str = '') cplx_functor_obj¶
Create a scattering potential from a geometry object (backward-compatible).
Parameters:¶
- qxvariable_obj
The x-component of the wave vector.
- qyvariable_obj
The y-component of the wave vector.
- qzvariable_obj
The z-component of the wave vector.
- matmaterial_obj
The material.
- geomgeometry_obj
The geometry object.
- swxParameterLike, optional
Scattering width in x (default 0.0).
- swyParameterLike, optional
Scattering width in y (default 0.0).
- swzParameterLike, optional
Scattering width in z (default 0.0).
- poslist, optional
Positions as list of (x, y, z) tuples (default None -> [(0,0,0)]).
- namestr, optional
The name of the potential (default is “Potential”).
- notesstr, optional
User notes.
Returns:¶
- cplx_functor_obj
The scattering potential as a complex functor.