class_docstr: Galaxy simulation using the density wave theory 
code: def eccentricity(self, r):
      # Core region of the galaxy. Innermost part is round
      # eccentricity increasing linear to the border of the core.
      if r < self._core_radius:
          return 1 + (r / self._core_radius) * (
              self._inner_eccentricity - 1
          )
  
      elif r > self._core_radius and r <= self._galaxy_radius:
          a = self._galaxy_radius - self._core_radius
          b = self._outer_eccentricity - self._inner_eccentricity
          return (
              self._inner_eccentricity + (r - self._core_radius) / a * b
          )
  
      # Eccentricity is slowly reduced to 1.
      elif r > self._galaxy_radius and r < self._distant_radius:
          a = self._distant_radius - self._galaxy_radius
          b = 1 - self._outer_eccentricity
          return (
              self._outer_eccentricity
              + (r - self._galaxy_radius) / a * b
          )
  
      else:
          return 1
  
file_path: vispy/examples/demo/gloo/galaxy/galaxy_simulation.py
imports: import math
  import numpy
label_desc: Use image node_id 6 for calling the Galaxy obj's underlying member method code with example usage: obj.eccentricity(r) and returns: unknown, unknown, unknown, int