docstr: Applies the 3D FFT in the q-space grid to generate
  the DSI diffusion propagator, remove the background noise with a
  hard threshold and then deconvolve the propagator with the
  Lucy-Richardson deconvolution algorithm
docstr_tok: ["Applies","the","3D","FFT","in","the","q-space","grid","to","generate","the","DSI","diffusion","propagator",",","remove","the","background","noise","with","a","hard","threshold","and","then","deconvolve","the","propagator","with","the","Lucy-Richardson","deconvolution","algorithm"]
code: def pdf(self):
      """Applies the 3D FFT in the q-space grid to generate
      the DSI diffusion propagator, remove the background noise with a
      hard threshold and then deconvolve the propagator with the
      Lucy-Richardson deconvolution algorithm
      """
      values = self.data
      # create the signal volume
      Sq = np.zeros((self.qgrid_sz, self.qgrid_sz, self.qgrid_sz))
      # fill q-space
      for i in range(len(values)):
          qx, qy, qz = self.model.qgrid[i]
          Sq[qx, qy, qz] += values[i]
      # get deconvolution PSF
      DSID_PSF = self.model.cache_get("deconv_psf", key=self.model.gtab)
      if DSID_PSF is None:
          DSID_PSF = gen_PSF(
              self.model.qgrid,
              self.qgrid_sz,
              self.qgrid_sz,
              self.qgrid_sz,
          )
      self.model.cache_set("deconv_psf", self.model.gtab, DSID_PSF)
      # apply fourier transform
      Pr = fftshift(
          np.abs(np.real(fftn(ifftshift(Sq), 3 * (self.qgrid_sz,))))
      )
      # threshold propagator
      Pr = threshold_propagator(Pr)
      # apply LR deconvolution
      Pr = LR_deconv(Pr, DSID_PSF, 5, 2)
      return Pr
  
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 1 for calling the DiffusionSpectrumDeconvFit obj's underlying member method code with example usage: obj.pdf() and returns: Pr