code: def set_energy_range(self, logemin, logemax):
          
  
          if logemin is None:
              logemin = self.log_energies[0]
          else:
              imin = int(utils.val_to_edge(self.log_energies, logemin)[0])
              logemin = self.log_energies[imin]
  
          if logemax is None:
              logemax = self.log_energies[-1]
          else:
              imax = int(utils.val_to_edge(self.log_energies, logemax)[0])
              logemax = self.log_energies[imax]
  
          self._loge_bounds = np.array([logemin, logemax])
          self._roi_data['loge_bounds'] = np.copy(self.loge_bounds)
          for c in self.components:
              c.set_energy_range(logemin, logemax)
  
          return self._loge_bounds
docs: Set the energy bounds of the analysis.  This restricts the
          evaluation of the likelihood to the data that falls in this
          range.  Input values will be rounded to the closest bin edge
          value.  If either argument is None then the lower or upper
          bound of the analysis instance will be used.
  
          Parameters
          ----------
  
          logemin : float
             Lower energy bound in log10(E/MeV).
  
          logemax : float
             Upper energy bound in log10(E/MeV).
  
          Returns
          -------
  
          eminmax : array
             Minimum and maximum energy in log10(E/MeV).