slitflow.img.convert module

class Obs2Depth(info_path=None)[source]

Bases: Image

Merge images from different observations into the top level depth.

Caution

This class only works when used in a Pipeline object. Running the process method or creating a Data object does not work appropriately.

Observation names for merging should be listed into obs_name argument of add() in Pipeline class.

Parameters:
  • reqs (list of Image) – Images for merge.

  • param["col_name"] (str, optional) – New column name for observation numbers. Defaults to “obs_no”.

  • param["col_description"] (str, optional) – New column description. Defaults to “Observation number”.

  • param["obs_name"] (str) – New observation name.

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

Returns:

Merged Image

Return type:

Image

set_index()[source]

Add observation number to the top level of index columns.

set_info(param={})[source]

Copy info from reqs[0] and add columns and params.

static process(reqs, param)[source]

Merge images from different observations into the top level depth.

Parameters:

reqs (list of numpy.ndarray) – Images from different observations.

Returns:

Merged image

Return type:

numpy.ndarray

class Obs2DepthRGB(info_path=None)[source]

Bases: RGB

Merge RGB images from different observations into the top level depth.

Caution

This class only works when used in a Pipeline object. Running the process method or creating a Data object does not work appropriately.

Observation names for merging should be listed into obs_name argument of add() in Pipeline class.

Parameters:
  • reqs (list of RGB) – RGB Images for merge.

  • param["col_name"] (str, optional) – New column name for observation numbers. Defaults to “obs_no”.

  • param["col_description"] (str, optional) – New column description. Defaults to “Observation number”.

  • param["obs_name"] (str) – New observation name.

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

Returns:

Merged RGB image

Return type:

slitflow.img.image.RGB

set_index()[source]

Add observation number to the top-level of index columns.

set_info(param={})[source]

Copy info from reqs[0] and add columns and params.

static process(reqs, param)[source]

Merge RGB images from different observations to the top level depth.

Parameters:

reqs (list of numpy.ndarray) – RGB images from different observations.

Returns:

Merged RGB image

Return type:

numpy.ndarray