class_docstr: A file handler class for VIIRS compact format.
class_docstr_tok: ["A","file","handler","class","for","VIIRS","compact","format","."]
docstr: Generate the angle datasets.
docstr_tok: ["Generate","the","angle","datasets","."]
code: def angles(self, azi_name, zen_name):
      """Generate the angle datasets."""
      chunks = self._get_geographical_chunks()
  
      azi = self.geography[azi_name]
      zen = self.geography[zen_name]
  
      switch_to_cart = (
          (np.max(azi) - np.min(azi) > 5)
          or (np.min(zen) < 10)
          or (max(abs(self.min_lat), abs(self.max_lat)) > 80)
      )
  
      azi = da.from_array(azi, chunks=chunks)
      zen = da.from_array(zen, chunks=chunks)
  
      if switch_to_cart:
          arrays = convert_from_angles(azi, zen)
      else:
          arrays = (azi, zen)
  
      expanded = self.expand_angle_and_nav(arrays)
      if switch_to_cart:
          return convert_to_angles(*expanded)
  
      return expanded
  
imports: import logging
  from contextlib import suppress
  from datetime import datetime, timedelta
  import dask.array
  import h5py
  import numpy
  import xarray
  from satpy.readers.file_handlers import BaseFileHandler
  from satpy.readers.utils import np2str
  from satpy.utils import angle2xyz, get_legacy_chunk_size, lonlat2xyz, xyz2angle, xyz2lonlat
label_desc: Use image node_id 13 for calling the VIIRSCompactFileHandler obj's underlying member method code with example usage: obj.angles(azi_name, zen_name) and returns: expanded, convert_to_angles