docstr: Calculates the real discrete odf for a given discrete sphere
  
  ..math::
      :nowrap:
          \begin{equation}
              \psi_{DSI}(\hat{\mathbf{u}})=\int_{0}^{\infty}P(r\hat{\mathbf{u}})r^{2}dr
          \end{equation}
  
  where $\hat{\mathbf{u}}$ is the unit vector which corresponds to a
  sphere point.
docstr_tok: ["Calculates","the","real","discrete","odf","for","a","given","discrete","sphere","..","math",":",":",":","nowrap",":","\\begin","{","equation","}","\\psi_","{","DSI","}","(","\\hat","{","\\mathbf","{","u","}","}",")","=\\int_","{","0","}","^","{","\\infty","}","P","(","r\\hat","{","\\mathbf","{","u","}","}",")","r^","{","2","}","dr","\\end","{","equation","}","where","$","\\hat","{","\\mathbf","{","u","}","}","$","is","the","unit","vector","which","corresponds","to","a","sphere","point","."]
code: def odf(self, sphere):
      r"""Calculates the real discrete odf for a given discrete sphere
  
      ..math::
          :nowrap:
              \begin{equation}
                  \psi_{DSI}(\hat{\mathbf{u}})=\int_{0}^{\infty}P(r\hat{\mathbf{u}})r^{2}dr
              \end{equation}
  
      where $\hat{\mathbf{u}}$ is the unit vector which corresponds to a
      sphere point.
      """
      interp_coords = self.model.cache_get("interp_coords", key=sphere)
      if interp_coords is None:
          interp_coords = pdf_interp_coords(
              sphere, self.model.qradius, self.model.origin
          )
          self.model.cache_set("interp_coords", sphere, interp_coords)
  
      Pr = self.pdf()
  
      # calculate the orientation distribution function
      return pdf_odf(Pr, self.model.qradius, interp_coords)
  
imports: import numpy
  from scipy.ndimage import map_coordinates
  from scipy.fftpack import fftn, fftshift, ifftshift
  from dipy.reconst.odf import OdfModel, OdfFit
  from dipy.reconst.cache import Cache
  from dipy.reconst.multi_voxel import multi_voxel_fit
label_desc: Use image node_id 6 for calling the DiffusionSpectrumFit obj's underlying member method code with example usage: obj.odf(sphere) and returns: pdf_odf