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: Convert digital number (DN) to calibrated quantity through scaling.
  
  Args:
      dn: Raw detector digital number
      slope: Slope
      offset: Offset
  
  Returns:
      Scaled data
docstr_tok: ["Convert","digital","number","(","DN",")","to","calibrated","quantity","through","scaling",".","Args",":","dn",":","Raw","detector","digital","number","slope",":","Slope","offset",":","Offset","Returns",":","Scaled","data"]
code: def scale(dn, slope, offset):
      """Convert digital number (DN) to calibrated quantity through scaling.
  
      Args:
          dn: Raw detector digital number
          slope: Slope
          offset: Offset
  
      Returns:
          Scaled data
  
      """
      ref = dn * slope + offset
      ref = ref.clip(min=0)
      ref.attrs = dn.attrs
  
      return ref
  
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 2 for calling the FY4Base obj's underlying member method code with example usage: obj.scale(dn, slope, offset) and returns: ref