code: def fft_proj_rms(a1, a2):
      """Compute the RMS of differences between two images.
  
      Compute the RMS of differences between two FFT vectors of a1
      and projection of FFT vectors of a2.
      This metric is sensitive to large scale changes and image noise but
      insensitive to small rendering differences.
      """
      ms = 0
  
      # for i in range(a1.shape[-1]):
      fr1 = np.fft.rfftn(a1)
      fr2 = np.fft.rfftn(a2)
  
      ps1 = np.log10(fr1 * fr1.conj()).real
      ps2 = np.log10(fr2 * fr2.conj()).real
  
      p1 = np.arctan2(fr1.imag, fr1.real)
      p2 = np.arctan2(fr2.imag, fr2.real)
  
      theta = p2 - p1
      l_factor = ps2 * np.cos(theta)
      ms += np.sum(((l_factor - ps1) ** 2)) / float(ps1.size)
  
      rms = np.sqrt(ms)
  
      return rms
  
file_path: satpy/satpy/tests/features/steps/steps-real-load-process-write.py
imports: import fnmatch
  import os
  from tempfile import NamedTemporaryFile
  import numpy
  from behave import given, then, when
  from PIL import Image
label_desc: Use image node_id 1 for calling a global function with example usage: fft_proj_rms(a1, a2) and returns: rms