odatse.domain.meshgrid module
- class odatse.domain.meshgrid.MeshGrid(info: Info = None, *, param: Dict[str, Any] = None, mesh: bool = True, rng: RandomState = None)[source]
Bases:
DomainBaseMeshGrid class for handling grid data for quantum beam diffraction experiments.
Initialize the MeshGrid object.
- Parameters:
info (Info, optional) – Information object containing algorithm parameters.
param (dict, optional) – Dictionary containing parameters for setting up the grid.
mesh (bool, optional) – Whether to use mesh grid or points.
rng (np.random.RandomState, optional) – Random number generator.
- __init__(info: Info = None, *, param: Dict[str, Any] = None, mesh: bool = True, rng: RandomState = None)[source]
Initialize the MeshGrid object.
- Parameters:
info (Info, optional) – Information object containing algorithm parameters.
param (dict, optional) – Dictionary containing parameters for setting up the grid.
mesh (bool, optional) – Whether to use mesh grid or points.
rng (np.random.RandomState, optional) – Random number generator.
- _setup(info_param, rng: RandomState, mesh: bool = True)[source]
Setup the grid based on provided parameters.
- Parameters:
info_param – Dictionary containing parameters for setting up the grid.
rng (np.random.RandomState, optional) – Random number generator.
mesh (bool, optional) – Whether to use mesh grid or points.
- _setup_from_file(info_param)[source]
Setup the grid from a file.
- Parameters:
info_param – Dictionary containing parameters for setting up the grid.
- _setup_grid(info_param)[source]
Setup the grid based on min, max, and num lists.
- Parameters:
info_param – Dictionary containing parameters for setting up the grid.
- classmethod from_dict(param)[source]
Create a MeshGrid object from a dictionary of parameters.
- Parameters:
param – Dictionary containing parameters for setting up the grid.
- Returns:
a MeshGrid object.
- Return type: