febid.monte_carlo.etrajectory.Electron#
- class Electron(x, y, parent)[source]#
Bases:
object
A class representing a single electron with its properties and methods to define its scattering vector.
Methods
Check if the given (z,y,x) position is inside the simulation chamber.
get_direction
get_next_point
Corrects indices according to the direction if coordinates are on the cell wall
Attributes
Current coordinates (z, y, x)
Previous coordinates (z, y, x)
direction
Gets indices of a cell in an array according to its position in the space
- check_boundaries(z=0, y=0, x=0)[source]#
Check if the given (z,y,x) position is inside the simulation chamber. If bounds are crossed, return corrected position
- Parameters:
z –
y –
x –
- Returns:
- property coordinates#
Current coordinates (z, y, x)
- Returns:
tuple
- property coordinates_prev#
Previous coordinates (z, y, x)
- Returns:
tuple
- index_corr()[source]#
Corrects indices according to the direction if coordinates are on the cell wall
- Returns:
- property indices#
Gets indices of a cell in an array according to its position in the space
- Returns:
i(z), j(y), k(x)