Scatterers#
- class Sphere#
Bases:
BaseScatterer- add_to_scene(self: PyMieSim.single.scatterer.Sphere, scene: object, **kwargs) None#
- property an#
III.88 of B&B:
\[a_n = \frac{ \mu_{sp} \Psi_n(\alpha) \Psi_n^\prime(\beta) - \mu M \Psi_n^\prime(\alpha) \Psi_n(\beta) }{ \mu_{sp} \xi_n(\alpha) \Psi_n^\prime(\beta) - \mu M \xi_n^\prime (\alpha) \Psi_n(\beta) }\]With \(M = \frac{k_{sp}}{k}\) (Eq:I.103)
- Returns:
A list of ‘an’ scattering coefficients used in the spherical wave expansion.
- Return type:
list
- Type:
Returns \(a_n\) coefficient as defined in Eq
- property bn#
III.89 of B&B:
\[b_n = \frac{ \mu M \Psi_n(\alpha) \Psi_n^\prime(\beta) - \mu_{sp} \Psi_n^\prime(\alpha) \Psi_n(\beta) }{ \mu M \xi_n(\alpha) \Psi_n^\prime(\beta) - \mu_{sp} \xi_n^\prime (\alpha) \Psi_n(\beta) }\]With \(M = \frac{k_{sp}}{k}\) (Eq:I.103)
- Returns:
A list of ‘bn’ scattering coefficients used in the spherical wave expansion.
- Return type:
list
- Type:
Returns \(b_n\) coefficient as defined in Eq
- property cn#
For future purpose only! Returns \(c_n\) coefficient as defined in Eq:III.90 of B&B:
\[c_n = \frac{ \mu_{sp} M \big[ \xi_n(\alpha) \Psi_n^\prime(\alpha) - \xi_n^\prime(\alpha) \Psi_n(\alpha) \big] }{ \mu_{sp} \xi_n(\alpha) \Psi_n^\prime(\beta) - \mu M \xi_n^\prime (\alpha) \Psi_n(\beta) }\]With \(M = \frac{k_{sp}}{k}\) (Eq:I.103)
- Returns:
A list of ‘cn’ scattering coefficients used in the spherical wave expansion.
- Return type:
list
- compute_an_bn(self: PyMieSim.single.scatterer.BaseScatterer, max_order: SupportsInt | SupportsIndex = 0) None#
Computes the coefficients an and bn for the scatterer. :param max_order: The maximum order of the coefficients to compute (default is 0, which means it will be computed based on the size parameter). :type max_order: int, optional
- compute_cn_dn(self: PyMieSim.single.scatterer.BaseScatterer, max_order: SupportsInt | SupportsIndex = 0) None#
Computes the coefficients cn and dn for the scatterer.
- Parameters:
max_order (int, optional) – The maximum order of the coefficients to compute (default is 0, which means it will be computed based on the size parameter).
- property diameter#
Diameter of the sphere.
- property dn#
For future purpose only! Returns \(d_n\) coefficient as defined in Eq:III.91 of B&B:
\[d_n = \frac{ \mu M^2 \big[ \xi_n(\alpha) \Psi_n^\prime(\alpha) - \xi_n^\prime(\alpha) \Psi_n(\alpha) \big] }{ \mu M \xi_n(\alpha) \Psi_n^\prime(\beta) - \mu_{sp} M \xi_n^\prime (\alpha) \Psi_n(\beta) }\]With \(M = \frac{k_{sp}}{k}\) (Eq:I.103)
- Returns:
A list of ‘dn’ scattering coefficients used in the spherical wave expansion.
- Return type:
list
- get_coefficient(self: PyMieSim.single.scatterer.BaseScatterer, type: str, order: SupportsInt | SupportsIndex) complex#
Returns a specific scattering coefficient for a given type and order.
- Parameters:
type (str) – The type of coefficient (‘an’, ‘bn’, ‘cn’, ‘dn’).
order (int) – The order of the scattering coefficient.
- Returns:
The value of the specified scattering coefficient.
- Return type:
float
- init(self: PyMieSim.single.scatterer.BaseScatterer, source: BaseSource, max_order: SupportsInt | SupportsIndex = 0) None#
Initializes the scatterer by computing size parameter, cross section, and scattering coefficients.
- Parameters:
source (BaseSource) – The source of the electromagnetic field, used to determine incident field properties for scatterer initialization.
max_order (int, optional) – The maximum order of the coefficients to compute (default is 0, which means it will be computed based on the size parameter).
- property material#
Material of the sphere.
- property medium#
Medium surrounding the sphere.
- print_properties(self: PyMieSim.single.scatterer.Sphere, arg0: SupportsInt | SupportsIndex) None#
Prints the properties of the sphere.
- property_names = ['size_parameter', 'cross_section', 'g', 'g_with_farfields', 'Qsca', 'Qext', 'Qabs', 'Qback', 'Qratio', 'Qforward', 'Qpr', 'Csca', 'Cext', 'Cabs', 'Cback', 'Cratio', 'Cforward', 'Cpr']#
- property radius#
Radius of the sphere.
- property volume#
Volume of the sphere.
- class InfiniteCylinder#
Bases:
BaseScatterer- property a1n#
Returns \(a_{1n}\) coefficient as defined in ref[5]:
\[a_{1n} = \frac{ m_t J_n(m_t x) J_n^\prime (m x) - m J_n^\prime (m_t x) J_n(m x) }{ m_t J_n(m_t x) H_n^\prime (m x) - m J_n^\prime (m_t x) H_n(m x) }\]With \(m\) being the refractive index of the medium and \(m_t\) being the refractive index of the scatterer.
- Returns:
A list of a1n scattering coefficients for the cylinder. These coefficients describe the scattering behavior of the cylinder in the first mode of the spherical wave expansion.
- Return type:
list
- property a2n#
Returns \(a_{2n}\) coefficient as defined in ref[5]:
\[a_{2n} = \frac{ m_t J_n(m_t x) J_n^\prime (m x) - m J_n^\prime (m_t x) J_n(m x) }{ m_t J_n(m_t x) H_n^\prime (m x) - m J_n^\prime (m_t x) H_n(m x) }\]With \(m\) being the refractive index of the medium and \(m_t\) being the refractive index of the scatterer.
- Returns:
A list of a2n scattering coefficients for the cylinder. These coefficients describe the scattering behavior of the cylinder in the second mode of the spherical wave expansion.
- Return type:
list
- add_to_scene(self: PyMieSim.single.scatterer.InfiniteCylinder, scene: object, **kwargs) None#
- property b1n#
Returns \(b_{1n}\) coefficient as defined in ref[5]:
\[b_{1n} = \frac{ m J_n(m_t x) J_n^\prime (m x) - m_t J_n^\prime (m_t x) J_n(m x) }{ m J_n(m_t x) H_n^\prime (m x) - m_t J_n^\prime (m_t x) H_n(m x) }\]With \(m\) being the refractive index of the medium and \(m_t\) being the refractive index of the scatterer.
- Returns:
A list of b1n scattering coefficients for the cylinder. These coefficients describe the scattering behavior of the cylinder in the first mode of the spherical wave expansion.
- Return type:
list
- property b2n#
Returns \(b_{2n}\) coefficient as defined in ref[5]:
\[b_{2n} = \frac{ m J_n(m_t x) J_n^\prime (m x) - m_t J_n^\prime (m_t x) J_n(m x) }{ m J_n(m_t x) H_n^\prime (m x) - m_t J_n^\prime (m_t x) H_n(m x) }\]With \(m\) being the refractive index of the medium and \(m_t\) being the refractive index of the scatterer.
- Returns:
A list of b2n scattering coefficients for the cylinder. These coefficients describe the scattering behavior of the cylinder in the second mode of the spherical wave expansion.
- Return type:
list
- compute_an_bn(self: PyMieSim.single.scatterer.BaseScatterer, max_order: SupportsInt | SupportsIndex = 0) None#
Computes the coefficients an and bn for the scatterer. :param max_order: The maximum order of the coefficients to compute (default is 0, which means it will be computed based on the size parameter). :type max_order: int, optional
- compute_cn_dn(self: PyMieSim.single.scatterer.BaseScatterer, max_order: SupportsInt | SupportsIndex = 0) None#
Computes the coefficients cn and dn for the scatterer.
- Parameters:
max_order (int, optional) – The maximum order of the coefficients to compute (default is 0, which means it will be computed based on the size parameter).
- property diameter#
Diameter of the cylinder.
- get_coefficient(self: PyMieSim.single.scatterer.BaseScatterer, type: str, order: SupportsInt | SupportsIndex) complex#
Returns a specific scattering coefficient for a given type and order.
- Parameters:
type (str) – The type of coefficient (‘an’, ‘bn’, ‘cn’, ‘dn’).
order (int) – The order of the scattering coefficient.
- Returns:
The value of the specified scattering coefficient.
- Return type:
float
- init(self: PyMieSim.single.scatterer.BaseScatterer, source: BaseSource, max_order: SupportsInt | SupportsIndex = 0) None#
Initializes the scatterer by computing size parameter, cross section, and scattering coefficients.
- Parameters:
source (BaseSource) – The source of the electromagnetic field, used to determine incident field properties for scatterer initialization.
max_order (int, optional) – The maximum order of the coefficients to compute (default is 0, which means it will be computed based on the size parameter).
- property material#
Material of the cylinder.
- property medium#
Medium of the cylinder.
- print_properties(self: PyMieSim.single.scatterer.InfiniteCylinder, arg0: SupportsInt | SupportsIndex) None#
Prints the properties of the cylinder.
- property_names = ['size_parameter', 'cross_section', 'g_with_farfields', 'Qsca', 'Qext', 'Qabs', 'Csca', 'Cext', 'Cabs']#
- property radius#
Radius of the cylinder.
- class CoreShell#
Bases:
BaseScatterer- add_to_scene(*args, **kwargs)#
Overloaded function.
- property an#
Returns the ‘an’ scattering coefficients.
\[a_n = \frac{ \Psi_n (y) \left[ \dot{\Psi}_n (\tilde{m}_{2} y) - A_n (x) \dot{\xi}_n (\tilde{m}_{2} y) \right] - \tilde{m}_{2} \dot{\Psi}_n (y) \left[ \Psi_n (\tilde{m}_{2} y) - A_n (x) \xi_n (\tilde{m}_{2} y) \right] }{ \xi_n (y) \left[ \dot{\Psi}_n (\tilde{m}_{2} y) - A_n (x) \dot{\xi}_n (\tilde{m}_{2} y) \right] - \tilde{m}_{2} \dot{\xi}_n (y) \left[ \Psi_n (\tilde{m}_{2} y) - A_n (x) \xi_n (\tilde{m}_{2} y) \right] }\]with:
\[\begin{split}A_n = \frac{ \tilde{m}_{2} \Psi_n (\tilde{m}_{2} x) \dot{\Psi}_n (\tilde{m}_{1} x) - \tilde{m}_{1} \dot{\Psi}_n (\tilde{m}_{2} x) \Psi_n (\tilde{m}_{1} x) }{ \tilde{m}_{2} \xi_n (\tilde{m}_{2} x) \dot{\Psi}_n (\tilde{m}_{1} x) - \tilde{m}_{1} \dot{\xi}_n (\tilde{m}_{2} x) \Psi_n (\tilde{m}_{1} x) } \\ B_n = \frac{ \tilde{m}_{2} \psi_n (\tilde{m}_{1} x) \dot{\psi}_n (\tilde{m}_{2} x) - \tilde{m}_{1} \psi_n (\tilde{m}_{2} x) \dot{\psi}_n (\tilde{m}_{1} x) }{ \tilde{m}_{2} \psi_n (\tilde{m}_{1} x) \dot{\xi}_n (\tilde{m}_{2} x) - \tilde{m}_{1} \xi_n (\tilde{m}_{2} x) \dot{\psi}_n (\tilde{m}_{1} x) }\end{split}\]- Returns:
A list of ‘an’ scattering coefficients used in the spherical wave expansion.
- Return type:
list
- property bn#
Returns the ‘bn’ scattering coefficients.
\[b_n = \frac{ \tilde{m}_{2} \Psi_n (y) \left[ \dot{\Psi}_n (\tilde{m}_{2} y) - B_n (x) \dot{\xi}_n (\tilde{m}_{2} y) \right] - \dot{\Psi}_n (y) \left[ \Psi_n (\tilde{m}_{2} y) - B_n (x) \xi_n (\tilde{m}_{2} y) \right] }{ \tilde{m}_{2} \xi_n (y) \left[ \dot{\Psi}_n (\tilde{m}_{2} y) - A_n (x) \dot{\xi}_n (\tilde{m}_{2} y) \right] - \dot{\xi}_n (y) \left[ \Psi_n (\tilde{m}_{2} y) - B_n (x) \xi_n (\tilde{m}_{2} y) \right] }\]with:
\[\begin{split}A_n = \frac{ \tilde{m}_{2} \Psi_n (\tilde{m}_{2} x) \dot{\Psi}_n (\tilde{m}_{1} x) - \tilde{m}_{1} \dot{\Psi}_n (\tilde{m}_{2} x) \Psi_n (\tilde{m}_{1} x) }{ \tilde{m}_{2} \xi_n (\tilde{m}_{2} x) \dot{\Psi}_n (\tilde{m}_{1} x) - \tilde{m}_{1} \dot{\xi}_n (\tilde{m}_{2} x) \Psi_n (\tilde{m}_{1} x) } \\ B_n = \frac{ \tilde{m}_{2} \psi_n (\tilde{m}_{1} x) \dot{\psi}_n (\tilde{m}_{2} x) - \tilde{m}_{1} \psi_n (\tilde{m}_{2} x) \dot{\psi}_n (\tilde{m}_{1} x) }{ \tilde{m}_{2} \psi_n (\tilde{m}_{1} x) \dot{\xi}_n (\tilde{m}_{2} x) - \tilde{m}_{1} \xi_n (\tilde{m}_{2} x) \dot{\psi}_n (\tilde{m}_{1} x) }\end{split}\]- Returns:
A list of ‘bn’ scattering coefficients used in the spherical wave expansion.
- Return type:
list
- property cn#
Returns the ‘cn’ scattering coefficients.
- Returns:
A list of ‘cn’ scattering coefficients used in the spherical wave expansion.
- Return type:
list
- compute_an_bn(self: PyMieSim.single.scatterer.BaseScatterer, max_order: SupportsInt | SupportsIndex = 0) None#
Computes the coefficients an and bn for the scatterer. :param max_order: The maximum order of the coefficients to compute (default is 0, which means it will be computed based on the size parameter). :type max_order: int, optional
- compute_cn_dn(self: PyMieSim.single.scatterer.BaseScatterer, max_order: SupportsInt | SupportsIndex = 0) None#
Computes the coefficients cn and dn for the scatterer.
- Parameters:
max_order (int, optional) – The maximum order of the coefficients to compute (default is 0, which means it will be computed based on the size parameter).
- property core_diameter#
Diameter of the core shell.
- property core_material#
Material of the core shell.
- property dn#
Returns the ‘dn’ scattering coefficients.
- Returns:
A list of ‘dn’ scattering coefficients used in the spherical wave expansion.
- Return type:
list
- get_coefficient(self: PyMieSim.single.scatterer.BaseScatterer, type: str, order: SupportsInt | SupportsIndex) complex#
Returns a specific scattering coefficient for a given type and order.
- Parameters:
type (str) – The type of coefficient (‘an’, ‘bn’, ‘cn’, ‘dn’).
order (int) – The order of the scattering coefficient.
- Returns:
The value of the specified scattering coefficient.
- Return type:
float
- init(self: PyMieSim.single.scatterer.BaseScatterer, source: BaseSource, max_order: SupportsInt | SupportsIndex = 0) None#
Initializes the scatterer by computing size parameter, cross section, and scattering coefficients.
- Parameters:
source (BaseSource) – The source of the electromagnetic field, used to determine incident field properties for scatterer initialization.
max_order (int, optional) – The maximum order of the coefficients to compute (default is 0, which means it will be computed based on the size parameter).
- print_properties(self: PyMieSim.single.scatterer.CoreShell, arg0: SupportsInt | SupportsIndex) None#
Prints the properties of the core-shell scatterer.
- property_names = ['size_parameter', 'cross_section', 'g', 'g_with_farfields', 'Qsca', 'Qext', 'Qabs', 'Qback', 'Qratio', 'Qforward', 'Qpr', 'Csca', 'Cext', 'Cabs', 'Cback', 'Cratio', 'Cforward', 'Cpr']#
- property radius#
Overall radius of the core-shell scatterer.
- property shell_material#
Material of the shell.
- property shell_thickness#
Thickness of the shell.
- property volume#
Volume of the core-shell scatterer.