class_docstr: VIIRS L1B File Reader.
class_docstr_tok: ["VIIRS","L1B","File","Reader","."]
docstr: Get dataset.
docstr_tok: ["Get","dataset","."]
code: def get_dataset(self, dataset_id, ds_info):
      """Get dataset."""
      var_path = self._dataset_name_to_var_path(
          dataset_id["name"], ds_info
      )
      metadata = self.get_metadata(dataset_id, ds_info)
  
      (
          valid_min,
          valid_max,
          scale_factor,
          scale_offset,
      ) = self._get_dataset_valid_range(dataset_id, ds_info, var_path)
      if (
          dataset_id.get("calibration") == "radiance"
          and ds_info["units"] == "W m-2 um-1 sr-1"
      ):
          data = self[var_path]
      elif ds_info.get("units") == "%":
          data = self[var_path]
      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"
          )
          data = self[var_path]
          # we get the BT values from a look up table using the scaled radiance integers
          index_arr = data.data.astype(int)
          coords = data.coords
          data.data = (
              self[lut_var_path]
              .data[index_arr.ravel()]
              .reshape(data.shape)
          )
          data = data.assign_coords(**coords)
      else:
          data = self[var_path]
      data.attrs.update(metadata)
  
      if valid_min is not None and valid_max is not None:
          data = data.where((data >= valid_min) & (data <= valid_max))
      if (
          data.attrs.get("units") in ["%", "K", "1", "W m-2 um-1 sr-1"]
          and "flag_meanings" in data.attrs
      ):
          # flag meanings don't mean anything anymore for these variables
          # these aren't category products
          data.attrs.pop("flag_meanings", None)
          data.attrs.pop("flag_values", None)
  
      factors = (scale_factor, scale_offset)
      factors = self.adjust_scaling_factors(
          factors, metadata["file_units"], ds_info.get("units")
      )
      if factors[0] != 1 or factors[1] != 0:
          data *= factors[0]
          data += factors[1]
      # rename dimensions to correspond to satpy's 'y' and 'x' standard
      if "number_of_lines" in data.dims:
          data = data.rename(
              {"number_of_lines": "y", "number_of_pixels": "x"}
          )
      return data
  
imports: import logging
  from datetime import datetime
  import numpy
  from satpy.readers.netcdf_utils import NetCDF4FileHandler
label_desc: Use image node_id 14 for calling the VIIRSL1BFileHandler obj's underlying member method code with example usage: obj.get_dataset(dataset_id, ds_info) and returns: data