This module provides functions for calculating the form-factors of various geometric shapes. The shapes include a box, pyramid, sphere, and a general 3D shape defined by geometry parameters.

Functions:

  • ffbox: Computes the scattering functor for a box shape.

  • ffpyramid: Computes the scattering functor for a pyramid shape.

  • ffsphere: Computes the scattering functor for a spherical shape.

  • ffshape: Computes the scattering functor for a general 3D shape defined by geometry.

Each function takes parameters that define the shape’s dimensions, and the incident wave vector components. The returned complex functors can be used in further calculations related to scattering phenomena.

escape.scattering.ff.ffbox(qx: variable_obj, qy: variable_obj, qz: variable_obj, wx: ParameterLike, wy: ParameterLike, wz: ParameterLike, swx: ParameterLike, swy: ParameterLike, swz: ParameterLike, name: str = 'FF Box', notes: str = '') cplx_functor_obj

Calculate the scattering functor for a box shape.

Parameters:

qxvariable_obj

The variable object representing the x-component of the wave vector.

qyvariable_obj

The variable object representing the y-component of the wave vector.

qzvariable_obj

The variable object representing the z-component of the wave vector.

wxParameterLike

The width of the box in the x-direction.

wyParameterLike

The width of the box in the y-direction.

wzParameterLike

The width of the box in the z-direction.

swxParameterLike

The scattering width in the x-direction.

swyParameterLike

The scattering width in the y-direction.

swzParameterLike

The scattering width in the z-direction.

namestr, optional

The name of the functor (default is “FF Box”).

notesstr, optional

User notes for the object.

Returns:

cplx_functor_obj

The computed scattering functor as a complex functor object, representing the form-factor of the box.

escape.scattering.ff.ffpyramid(qx: variable_obj, qy: variable_obj, qz: variable_obj, wx_bot: ParameterLike, wx_top: ParameterLike, wy_bot: ParameterLike, wy_top: ParameterLike, center_bot: list = None, center_top: list = None, swx: ParameterLike = 0.0, swy: ParameterLike = 0.0, swz: ParameterLike = 0.0, name: str = 'FF Pyramid', notes: str = '') cplx_functor_obj

Calculate the scattering functor for a pyramid shape.

Parameters:

qxvariable_obj

The variable object representing the x-component of the wave vector.

qyvariable_obj

The variable object representing the y-component of the wave vector.

qzvariable_obj

The variable object representing the z-component of the wave vector.

wx_botParameterLike

The width of the pyramid at the bottom.

wx_topParameterLike

The width of the pyramid at the top.

wy_botParameterLike

The height of the pyramid at the bottom.

wy_topParameterLike

The height of the pyramid at the top.

center_botlist, optional

The coordinates of the center at the bottom of the pyramid.

center_toplist, optional

The coordinates of the center at the top of the pyramid.

swxParameterLike, optional

The scattering width in the x-direction (default is 0.0).

swyParameterLike, optional

The scattering width in the y-direction (default is 0.0).

swzParameterLike, optional

The scattering width in the z-direction (default is 0.0).

namestr, optional

The name of the functor (default is “FF Pyramid”).

notesstr, optional

User notes for the object.

Returns:

cplx_functor_obj

The computed scattering functor as a complex functor object, representing the form-factor of the pyramid.

escape.scattering.ff.ffshape(qx: variable_obj, qy: variable_obj, qz: variable_obj, geom: geometry_obj, swx: ParameterLike = 0.0, swy: ParameterLike = 0.0, swz: ParameterLike = 0.0, name: str = 'FF Shape3D', notes: str = '') cplx_functor_obj

Calculate the scattering functor for a general 3D shape defined by geometry parameters.

Parameters:

qxvariable_obj

The variable object representing the x-component of the wave vector.

qyvariable_obj

The variable object representing the y-component of the wave vector.

qzvariable_obj

The variable object representing the z-component of the wave vector.

geomgeometry_obj

The geometry object defining the shape.

swxParameterLike, optional

The scattering width in the x-direction (default is 0.0).

swyParameterLike, optional

The scattering width in the y-direction (default is 0.0).

swzParameterLike, optional

The scattering width in the z-direction (default is 0.0).

namestr, optional

The name of the functor (default is “FF Shape3D”).

notesstr, optional

User notes for the object.

Returns:

cplx_functor_obj

The computed scattering functor as a complex functor object, representing the form-factor of the general shape.

escape.scattering.ff.ffsphere(qx: variable_obj, qy: variable_obj, qz: variable_obj, radius: ParameterLike, sw: ParameterLike, name: str = 'FF Sphere', notes: str = '') cplx_functor_obj

Calculate the scattering functor for a spherical shape.

Parameters:

qxvariable_obj

The variable object representing the x-component of the wave vector.

qyvariable_obj

The variable object representing the y-component of the wave vector.

qzvariable_obj

The variable object representing the z-component of the wave vector.

radiusParameterLike

The radius of the sphere.

swParameterLike

The scattering width.

namestr, optional

The name of the functor (default is “FF Sphere”).

notesstr, optional

User notes for the object.

Returns:

cplx_functor_obj

The computed scattering functor as a complex functor object, representing the form-factor of the sphere.