code: def eval(self, ebin, dtheta, scale_fn=None):
          
  
          if scale_fn is None and self.scale_fn is not None:
              scale_fn = self.scale_fn
  
          if scale_fn is None:
              scale_factor = 1.0
          else:
              dtheta = dtheta / scale_fn(self.energies[ebin])
              scale_factor = 1. / scale_fn(self.energies[ebin])**2
  
          vals = 10**np.interp(dtheta, self.dtheta, np.log10(self.val[:, ebin]))
          return vals * scale_factor
docs: Evaluate the PSF at the given energy bin index.
  
          Parameters
          ----------
          ebin : int
              Index of energy bin.
  
          dtheta : array_like
              Array of angular separations in degrees.
  
          scale_fn : callable        
              Function that evaluates the PSF scaling function.
              Argument is energy in MeV.