title: How to implement a butterworth filter over a 2D np.array of a medical image in python
body: <p>I want to smooth a medical image using a butterworth filter, the data is very noisy and I want to reduce this. I am using Python v3.7. The image data is stored in a 2D np.array, which I transformed to the frequency domain using scipy. I don't know what step is next to be able to apply a butterworth filter</p>
  
  <pre><code>#%% butterworth filter
  import scipy.fftpack
  import scipy.signal
  normal_scan=scan_spect # I have already loaded and preprocessed the data 
  freq_scan=scipy.fftpack.fft2(normal_scan)
  
  N=10 #order/power of the filter
  
  Wn=0.6 #critical frequency
  
  B, A=scipy.signal.butter(10,0.6, output='ba' )
  
  smoothed_data=scipy.signal.filtfilt(B, A, freq_scan)
  </code></pre>
  
  <p>What format does my data have to be in to be able to apply the butterworth filter? And which parameters do I use.</p>