parameters: (box, params, nTheta=200, nPhi=200, figNumber=2, fracBoxToHistogram=1.0, useIDX=None)
docstring: compareBVGFitData is used for comparing a fit and the histogram.  Useful for debugging.
docstring_summary: compareBVGFitData is used for comparing a fit and the histogram.  Useful for debugging.
docstring_tokens: compareBVGFitData is used for comparing a fit and the histogram . Useful for debugging .
function: def compareBVGFitData(box, params, nTheta=200, nPhi=200, figNumber=2, fracBoxToHistogram=1.0, useIDX=None):
      '''
      compareBVGFitData is used for comparing a fit and the histogram.  Useful for debugging.
      '''
      h, thBins, phBins = getAngularHistogram(
          box, nTheta=nTheta, nPhi=nPhi, fracBoxToHistogram=fracBoxToHistogram, useIDX=useIDX)
      Y = getBVGResult(box, params, nTheta=nTheta, nPhi=nPhi,
                       fracBoxToHistogram=fracBoxToHistogram)
      pLow = 0.0
      pHigh = 1.0
      nX, nY = Y.shape
      plt.figure(figNumber)
      plt.clf()
      plt.subplot(2, 2, 1)
      plt.imshow(h, vmin=0, vmax=0.7 * np.max(h), interpolation='None')
      plt.xlim([pLow * nX, pHigh * nX])
      plt.ylim([pLow * nY, pHigh * nY])
      if useIDX is None:
          plt.title('Measured Peak')
      else:
          plt.title('BG Removed Measured Peak')
      plt.colorbar()
      plt.subplot(2, 2, 2)
      plt.imshow(Y, vmin=0, vmax=0.7 * np.max(h), interpolation='None')
      plt.title('Modeled Peak')
      plt.xlim([pLow * nX, pHigh * nX])
      plt.ylim([pLow * nY, pHigh * nY])
      plt.colorbar()
      plt.subplot(2, 2, 3)
      plt.imshow(h - Y, interpolation='None')
      plt.xlim([pLow * nX, pHigh * nX])
      plt.ylim([pLow * nY, pHigh * nY])
      plt.xlabel('Difference')
      plt.colorbar()
  
      if useIDX is not None:
          h0, thBins, phBins = getAngularHistogram(
              box, nTheta=nTheta, nPhi=nPhi, fracBoxToHistogram=fracBoxToHistogram, useIDX=None)
          plt.subplot(2, 2, 4)
          plt.imshow(h0, vmin=0, vmax=1.0 * np.max(h0), interpolation='None')
          plt.xlim([pLow * nX, pHigh * nX])
          plt.ylim([pLow * nY, pHigh * nY])
          plt.xlabel('Measured Peak')
          plt.colorbar()
function_tokens: def compareBVGFitData ( box , params , nTheta = 200 , nPhi = 200 , figNumber = 2 , fracBoxToHistogram = 1.0 , useIDX = None ) : h , thBins , phBins = getAngularHistogram ( box , nTheta = nTheta , nPhi = nPhi , fracBoxToHistogram = fracBoxToHistogram , useIDX = useIDX ) Y = getBVGResult ( box , params , nTheta = nTheta , nPhi = nPhi , fracBoxToHistogram = fracBoxToHistogram ) pLow = 0.0 pHigh = 1.0 nX , nY = Y . shape plt . figure ( figNumber ) plt . clf ( ) plt . subplot ( 2 , 2 , 1 ) plt . imshow ( h , vmin = 0 , vmax = 0.7 * np . max ( h ) , interpolation = 'None' ) plt . xlim ( [ pLow * nX , pHigh * nX ] ) plt . ylim ( [ pLow * nY , pHigh * nY ] ) if useIDX is None : plt . title ( 'Measured Peak' ) else : plt . title ( 'BG Removed Measured Peak' ) plt . colorbar ( ) plt . subplot ( 2 , 2 , 2 ) plt . imshow ( Y , vmin = 0 , vmax = 0.7 * np . max ( h ) , interpolation = 'None' ) plt . title ( 'Modeled Peak' ) plt . xlim ( [ pLow * nX , pHigh * nX ] ) plt . ylim ( [ pLow * nY , pHigh * nY ] ) plt . colorbar ( ) plt . subplot ( 2 , 2 , 3 ) plt . imshow ( h - Y , interpolation = 'None' ) plt . xlim ( [ pLow * nX , pHigh * nX ] ) plt . ylim ( [ pLow * nY , pHigh * nY ] ) plt . xlabel ( 'Difference' ) plt . colorbar ( ) if useIDX is not None : h0 , thBins , phBins = getAngularHistogram ( box , nTheta = nTheta , nPhi = nPhi , fracBoxToHistogram = fracBoxToHistogram , useIDX = None ) plt . subplot ( 2 , 2 , 4 ) plt . imshow ( h0 , vmin = 0 , vmax = 1.0 * np . max ( h0 ) , interpolation = 'None' ) plt . xlim ( [ pLow * nX , pHigh * nX ] ) plt . ylim ( [ pLow * nY , pHigh * nY ] ) plt . xlabel ( 'Measured Peak' ) plt . colorbar ( )