def get_reflectance_lut(filename):
    """Read the LUT with reflectances as a function of wavelength, satellite
    zenith secant, azimuth difference angle, and sun zenith secant

    """

    h5f = h5py.File(filename, 'r')

    tab = h5f['reflectance']
    wvl = h5f['wavelengths']
    azidiff = h5f['azimuth_difference']
    satellite_zenith_secant = h5f['satellite_zenith_secant']
    sun_zenith_secant = h5f['sun_zenith_secant']

    if HAVE_DASK:
        tab = from_array(tab, chunks=(10, 10, 10, 10))
        wvl = wvl[:]  # no benefit to dask-ifying this
        azidiff = from_array(azidiff, chunks=(1000,))
        satellite_zenith_secant = from_array(satellite_zenith_secant,
                                             chunks=(1000,))
        sun_zenith_secant = from_array(sun_zenith_secant,
                                       chunks=(1000,))
    else:
        # load all of the data we are going to use in to memory
        tab = tab[:]
        wvl = wvl[:]
        azidiff = azidiff[:]
        satellite_zenith_secant = satellite_zenith_secant[:]
        sun_zenith_secant = sun_zenith_secant[:]
        h5f.close()

    return tab, wvl, azidiff, satellite_zenith_secant, sun_zenith_secant
def get_reflectance_lut ( filename ) : h5f = h5py . File ( filename , 'r' ) tab = h5f [ 'reflectance' ] wvl = h5f [ 'wavelengths' ] azidiff = h5f [ 'azimuth_difference' ] satellite_zenith_secant = h5f [ 'satellite_zenith_secant' ] sun_zenith_secant = h5f [ 'sun_zenith_secant' ] if HAVE_DASK : tab = from_array ( tab , chunks = ( 10 , 10 , 10 , 10 ) ) wvl = wvl [ : ] azidiff = from_array ( azidiff , chunks = ( 1000 , ) ) satellite_zenith_secant = from_array ( satellite_zenith_secant , chunks = ( 1000 , ) ) sun_zenith_secant = from_array ( sun_zenith_secant , chunks = ( 1000 , ) ) else : tab = tab [ : ] wvl = wvl [ : ] azidiff = azidiff [ : ] satellite_zenith_secant = satellite_zenith_secant [ : ] sun_zenith_secant = sun_zenith_secant [ : ] h5f . close ( ) return tab , wvl , azidiff , satellite_zenith_secant , sun_zenith_secant
Read the LUT with reflectances as a function of wavelength, satellite
    zenith secant, azimuth difference angle, and sun zenith secant