def METHOD_NAME(cmin, cmax, intens, method):
    # scale to 0 - 1
    val = (intens - cmin) / float((cmax - cmin))
    if method == "logistic":
        val = 1.0 / (1 + exp(-10 * (val - 0.5)))
    val *= 255
    return int(val)