module thresh

Threshold functions

This module provides functions for creating threshold maps.

When called directly as main, it allows for creating a threshold map based on the number of bits per cell, the std dev of each threshold level, and the threshold distribution.

$ python -m mlcsim.thresh --help

usage: thresh.py [-h] [-d D] [-e E] [-f F] [--plot] [--scale-e]

options:

    -h, --help  show this help message and exit

    -d D        Threshold distribution

    -e E        Threshold stdev for 2 bits per cell

    -f F        Threshold map json to output

    --plot

    --scale-e   Scale -e with MLC size to preserve overlap

Currently supported threshold distributions are uniform, and split-n where increasing n increases the amount of separation in the center.

uniform threshold distribution:

uniform threshold distribution

split-1 threshold distribution:

split-1 threshold distribution

split-2 threshold distribution:

split-2 threshold distribution


function generateThresh

generateThresh(b: int, e: float, dist: str) → List[Tuple[float, float]]

Generates a threshold map

Args:

  • b (int): bits per cell
  • e (float): std dev between levels
  • dist (str): threshold distribution (uniform or split-*)

Raises:

  • ValueError: if dist is not uniform or split-*

Returns:

  • list: threshold map

This file was automatically generated via lazydocs.