slitflow.loc.random module

class UniformRect(info_path=None)[source]

Bases: Table

Uniform distribution inside rectangle region.

Parameters:
  • reqs[0] (Index) – Index Table class.

  • param["pitch"] (float) – Length per pixel.

  • param["n_point"] (int) – Number of points in one frame.

  • param["lims"] (list of list of float) – List of [lower, upper] limit for each dimension in length_unit.

  • param["split_depth"] (int) – File split depth number.

  • param["length_unit"] (str) – Unit string for column names such as “um”, “nm”.

  • param["dimension"] (int) – Position dimension 1=x, 2=xy, 3=xyz.

  • param["seed"] (int, optional) – Random seed.

Returns:

Expanded Table including point number and coordinates

Return type:

Table

set_info(param)[source]

Convert input information to Info object.

This method creates columns and parameters information. The columns information is used to handle data structure. The parameter dictionaries are set as param of process(). This method is called before run(). Implemented in subclass.

Parameters:

param (dict, optional) – Parameters for columns or params.

static process(reqs, param)[source]

Uniform distribution inside rectangle region.

Parameters:
  • reqs[0] (pandas.DataFrame) – Index DataFrame.

  • param["n_point"] (int) – Number of points in one frame.

  • param["lims"] (list of list of float) – List of [lower, upper] limit for each dimension.

  • param["calc_cols"] (list of str) – Column name of each coordinate.

Returns:

Expanded table including point no and coordinates

Return type:

pandas.DataFrame