slitflow.tbl.filter module

class CutOffPixelQuantile(info_path=None)[source]

Bases: Table

Select table rows by the intensity count quantile.

Noise distribution seems to be Gaussian distribution. However, the image includes signals and results in gamma-like distribution. This function uses Median + factor * (Q2 - Q1) as intensity threshold instead of Mean + factor * STD to avoid using signal-biased STD.

Caution

The threshold is calculated from all rows entered into the process(). You have to split the required data into appropriate depths.

Parameters:
  • reqs[0] (Table) – Table including intensity values.

  • param["calc_col"] (str) – Column name for calculating the median.

  • param["cut_factor"] (float) – Cutoff factor above the median value.

  • param["ignore_zero"] (bool, optional) – Whether zero values are ignored from the intensity.

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

Returns:

Selected Table

Return type:

Table

set_info(param={})[source]

Copy info from reqs[0] and add params.

static process(reqs, param)[source]

Select table rows by the intensity count quantile.

Parameters:
  • reqs[0] (pandas.DataFrame) – Table including intensity values.

  • param["calc_col"] (str) – Column name for calculating the median.

  • param["cut_factor"] (float) – Cutoff factor above the median value.

  • param["ignore_zero"] (bool, optional) – Whether zero values are ignored from the intensity.

Returns:

Selected table

Return type:

pandas.DataFrame