class_docstr: VIIRS L1B File Reader.
class_docstr_tok: ["VIIRS","L1B","File","Reader","."]
code: def _get_dataset_valid_range(self, dataset_id, ds_info, var_path):
      if (
          dataset_id.get("calibration") == "radiance"
          and ds_info["units"] == "W m-2 um-1 sr-1"
      ):
          rad_units_path = var_path + "/attr/radiance_units"
          if rad_units_path in self:
              # we are getting a reflectance band but we want the radiance values
              # special scaling parameters
              scale_factor = self[
                  var_path + "/attr/radiance_scale_factor"
              ]
              scale_offset = self[
                  var_path + "/attr/radiance_add_offset"
              ]
          else:
              # we are getting a btemp band but we want the radiance values
              # these are stored directly in the primary variable
              scale_factor = self[var_path + "/attr/scale_factor"]
              scale_offset = self[var_path + "/attr/add_offset"]
          valid_min = self[var_path + "/attr/valid_min"]
          valid_max = self[var_path + "/attr/valid_max"]
      elif ds_info.get("units") == "%":
          # normal reflectance
          valid_min = self[var_path + "/attr/valid_min"]
          valid_max = self[var_path + "/attr/valid_max"]
          scale_factor = self[var_path + "/attr/scale_factor"]
          scale_offset = self[var_path + "/attr/add_offset"]
      elif ds_info.get("units") == "K":
          # normal brightness temperature
          # use a special LUT to get the actual values
          lut_var_path = ds_info.get(
              "lut", var_path + "_brightness_temperature_lut"
          )
          # we get the BT values from a look up table using the scaled radiance integers
          valid_min = self[lut_var_path + "/attr/valid_min"]
          valid_max = self[lut_var_path + "/attr/valid_max"]
          scale_factor = scale_offset = None
      else:
          valid_min = self.get(var_path + "/attr/valid_min")
          valid_max = self.get(var_path + "/attr/valid_max")
          scale_factor = self.get(var_path + "/attr/scale_factor")
          scale_offset = self.get(var_path + "/attr/add_offset")
  
      return valid_min, valid_max, scale_factor, scale_offset
  
imports: import logging
  from datetime import datetime
  import numpy
  from satpy.readers.netcdf_utils import NetCDF4FileHandler
label_desc: Use image node_id 11 for calling the VIIRSL1BFileHandler obj's underlying member method code with example usage: obj._get_dataset_valid_range(dataset_id, ds_info, var_path) and returns: valid_min,  valid_max,  scale_factor,  scale_offset