class_docstr: The base class for the FengYun4 AGRI and GHI readers.
class_docstr_tok: ["The","base","class","for","the","FengYun4","AGRI","and","GHI","readers","."]
docstr: Calibrate digital number (DN) by applying a LUT.
  
  Args:
      data: Raw detector digital number
      lut: the look up table
  Returns:
      Calibrated quantity
docstr_tok: ["Calibrate","digital","number","(","DN",")","by","applying","a","LUT",".","Args",":","data",":","Raw","detector","digital","number","lut",":","the","look","up","table","Returns",":","Calibrated","quantity"]
code: def apply_lut(self, data, lut):
      """Calibrate digital number (DN) by applying a LUT.
  
      Args:
          data: Raw detector digital number
          lut: the look up table
      Returns:
          Calibrated quantity
      """
      # append nan to the end of lut for fillvalue
      lut = np.append(lut, np.nan)
      data.data = da.where(
          data.data > lut.shape[0], lut.shape[0] - 1, data.data
      )
      res = data.data.map_blocks(self._getitem, lut, dtype=lut.dtype)
      res = xr.DataArray(
          res, dims=data.dims, attrs=data.attrs, coords=data.coords
      )
  
      return res
  
imports: import logging
  from datetime import datetime
  import dask.array
  import numpy
  import xarray
  from satpy._compat import cached_property
  from satpy.readers._geos_area import get_area_definition, get_area_extent
  from satpy.readers.hdf5_utils import HDF5FileHandler
label_desc: Use image node_id 3 for calling the FY4Base obj's underlying member method code with example usage: obj.apply_lut(data, lut) and returns: res