slitflow.tbl.proc module
This process module includes classes that change table structure such as rows and columns.
- class MaskFromParam(info_path=None)[source]
Bases:
TableCreate a mask column based on explicit param values.
- Parameters:
reqs[0] (Table) – The image to select from.
param["index"] (list of tuple) – A list of tuples that contains the indices to select. The tuple should be (index of depth=1, index of depth=2, …). If index is None, all indices of the depth are selected.
param["mask_col"] (str, optional) – The name of the mask column. Defaults to “mask”.
param["split_depth"] (int) – The file split depth number.
- Returns:
A table containing the mask column.
- Return type:
- static process(reqs, param)[source]
Create a mask column based on explicit param values.
If the element of the tuple is one, a comma must be added.
- Parameters:
reqs[0] (Table) – The image to select from.
param["index"] (list of tuple) – A list of tuples that contains the indices to select. The tuple should be (index of depth=1, index of depth=2, …). If index is None, all indices of the depth are selected.
param["mask_col"] (str, optional) – The name of the mask column. Defaults to “mask”.
- Returns:
A table containing the mask column.
- Return type:
- class SelectParam(info_path=None)[source]
Bases:
MaskFromParamSelect rows using explicit param values.
This class creates a mask column based on explicit param values using
slitflow.tbl.filter.MaskFromParamand selects rows using the mask column.- Parameters:
reqs[0] (Table) – Table for selection.
param["index"] (list of tuple) – List of tuples of index numbers to select. Each tuple should be (index of depth=1, index of depth=2, …). If index is None, all indices of the depth is selected.
param["mask_col"] (str, optional) – Column name of the mask column. Defaults to “mask”.
param["split_depth"] (int) – File split depth number.
- Returns:
Selected Table.
- Return type:
- static process(reqs, param)[source]
Select rows using explicit param values.
- Parameters:
reqs[0] (pandas.DataFrame) – Table for selection.
param["index"] (list of tuple) – List of tuple of index numbers to select. The tuple should be (index of depth=1, index of depth=2, …). If index is None, all indices of the depth is selected.
param["mask_col"] (str, optional) – Column name of the mask column. Defaults to “mask”.
- Returns:
Selected Table.
- Return type: