class_docstr: fft tools for arma processes
  
  This class contains several methods that are providing the same or similar
  returns to try out and test different implementations.
  
  Notes
  -----
  TODO:
  check whether we do not want to fix maxlags, and create new instance if
  maxlag changes. usage for different lengths of timeseries ?
  or fix frequency and length for fft
  
  check default frequencies w, terminology norw  n_or_w
  
  some ffts are currently done without padding with zeros
  
  returns for spectral density methods needs checking, is it always the power
  spectrum hw*hw.conj()
  
  normalization of the power spectrum, spectral density: not checked yet, for
  example no variance of underlying process is used
class_docstr_tok: ["fft","tools","for","arma","processes","This","class","contains","several","methods","that","are","providing","the","same","or","similar","returns","to","try","out","and","test","different","implementations",".","Notes","--","--","-","TODO",":","check","whether","we","do","not","want","to","fix","maxlags",",","and","create","new","instance","if","maxlag","changes",".","usage","for","different","lengths","of","timeseries","?","or","fix","frequency","and","length","for","fft","check","default","frequencies","w",",","terminology","norw","n_or_w","some","ffts","are","currently","done","without","padding","with","zeros","returns","for","spectral","density","methods","needs","checking",",","is","it","always","the","power","spectrum","hw","*","hw.conj","(",")","normalization","of","the","power","spectrum",",","spectral","density",":","not","checked","yet",",","for","example","no","variance","of","underlying","process","is","used"]
docstr: filter a time series using fftconvolve3 with ARMA filter
  
  padding of x currently works only if x is 1d
  in example it produces same observations at beginning as lfilter even
  without padding.
  
  TODO: this returns 1 additional observation at the end
docstr_tok: ["filter","a","time","series","using","fftconvolve3","with","ARMA","filter","padding","of","x","currently","works","only","if","x","is","1d","in","example","it","produces","same","observations","at","beginning","as","lfilter","even","without","padding",".","TODO",":","this","returns","1","additional","observation","at","the","end"]
code: def filter2(self, x, pad=0):
      """filter a time series using fftconvolve3 with ARMA filter
  
      padding of x currently works only if x is 1d
      in example it produces same observations at beginning as lfilter even
      without padding.
  
      TODO: this returns 1 additional observation at the end
      """
      from statsmodels.tsa.filters import fftconvolve3
  
      if not pad:
          pass
      elif pad == "auto":
          # just guessing how much padding
          x = self.padarr(
              x, x.shape[0] + 2 * (self.nma + self.nar), atend=False
          )
      else:
          x = self.padarr(x, x.shape[0] + int(pad), atend=False)
  
      return fftconvolve3(x, self.ma, self.ar)
  
imports: import numpy
  import numpy.fft
  from scipy import signal
  from statsmodels.tsa.arima_process import ArmaProcess
label_desc: Use image node_id 15 for calling the ArmaFft obj's underlying member method code with example usage: obj.filter2(x, pad) and returns: fftconvolve3