def planck_nu_range(tmin, tmax=None):

    # Set constant for Wien displacement law
    alpha = 2.821439

    # Find peak frequencies for lower and upper temperature
    nu_peak_min = alpha / h * k * tmin
    if tmax is None:
        nu_peak_max = alpha / h * k * tmin
    else:
        nu_peak_max = alpha / h * k * tmax

    # Find frequency range if we want to go below 1 thousandth of the Planck
    # function peak

    nu_min = np.log10(nu_peak_min / 100.)
    nu_max = np.log10(nu_peak_max * 10.)

    # If we use at least 100 frequencies per order of magnitude of frequency
    # then we will achieve differences around 2% flux-to-flux

    n_nu = int((nu_max - nu_min) * 100.)

    return np.logspace(nu_min, nu_max, n_nu)
dataset/ETHPy150Open hyperion-rt/hyperion/hyperion/util/functions.py/planck_nu_range/original