code: def randomfill(a):
      
      a = checkma(a)
      #For data that have already been normalized,
      #This provides a proper normal distribution with mean=0 and std=1
      #a = (a - a.mean()) / a.std()
      #noise = a.mask * (np.random.randn(*a.shape))
      noise = a.mask * np.random.normal(a.mean(), a.std(), a.shape)
      #Add the noise
      b = a.filled(0) + noise
      return b
docs: Fill masked areas with random noise
      
      This is needed for any fft-based operations