dust_extinction.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:dust_extinction 作者: karllark 项目源码 文件源码
def _test_valid_x_range(x, x_range, outname):
    """
    Test if any of the x values are outside of the valid range

    Parameters
    ----------
    x : float array
       wavenumbers in inverse microns

    x_range: 2 floats
       allowed min/max of x

    outname: str
       name of curve for error message
    """
    if np.logical_or(np.any(x < x_range[0]),
                     np.any(x > x_range[1])):
        raise ValueError('Input x outside of range defined for ' + outname \
                         + ' ['
                         + str(x_range[0])
                         +  ' <= x <= '
                         + str(x_range[1])
                         + ', x has units 1/micron]')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号