odatse.domain.meshgrid module

class odatse.domain.meshgrid.MeshGrid(info: Info = None, *, param: Dict[str, Any] = None)[source]

Bases: DomainBase

MeshGrid 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.

__init__(info: Info = None, *, param: Dict[str, Any] = 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.

_setup(info_param)[source]

Setup the grid based on provided parameters.

Parameters:

info_param – Dictionary containing parameters for setting up the grid.

_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.

do_split()[source]

Split the grid data among MPI processes.

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:

MeshGrid

classmethod from_file(mesh_path)[source]

Create a MeshGrid object from a file.

Parameters:

mesh_path – Path to the file containing the grid data.

Returns:

a MeshGrid object.

Return type:

MeshGrid

store_file(store_path, *, header='')[source]

Store the grid data to a file.

Parameters:
  • store_path – Path to the file where the grid data will be stored.

  • header – Header to be included in the file.