class_docstr: Multi-term Fourier fit to a light curve
  
  Parameters
  ----------
  omega : float
      angular frequency of the fundamental mode
  n_terms : int
      the number of Fourier modes to use in the fit
class_docstr_tok: ["Multi-term","Fourier","fit","to","a","light","curve","Parameters","--","--","--","--","--","omega",":","float","angular","frequency","of","the","fundamental","mode","n_terms",":","int","the","number","of","Fourier","modes","to","use","in","the","fit"]
docstr: Fit multiple Fourier terms to the data
  
  Parameters
  ----------
  t: array_like
      observed times
  y: array_like
      observed fluxes or magnitudes
  dy: array_like
      observed errors on y
  
  Returns
  -------
  self :
      The MultiTermFit object is  returned
docstr_tok: ["Fit","multiple","Fourier","terms","to","the","data","Parameters","--","--","--","--","--","t",":","array_like","observed","times","y",":","array_like","observed","fluxes","or","magnitudes","dy",":","array_like","observed","errors","on","y","Returns","--","--","--","-","self",":","The","MultiTermFit","object","is","returned"]
code: def fit(self, t, y, dy):
      """Fit multiple Fourier terms to the data
  
      Parameters
      ----------
      t: array_like
          observed times
      y: array_like
          observed fluxes or magnitudes
      dy: array_like
          observed errors on y
  
      Returns
      -------
      self :
          The MultiTermFit object is  returned
      """
      t = np.asarray(t)
      y = np.asarray(y)
      dy = np.asarray(dy)
  
      X_scaled = self._make_X(t) / dy[:, None]
      y_scaled = y / dy
  
      self.t_ = t
      self.w_ = np.linalg.solve(
          np.dot(X_scaled.T, X_scaled), np.dot(X_scaled.T, y_scaled)
      )
      return self
  
file_path: astroML/astroML/time_series/periodogram.py
imports: import numpy
  from sklearn.utils import check_random_state
  from ..utils.decorators import deprecated
  from ..utils.exceptions import AstroMLDeprecationWarning
label_desc: Use image node_id 3 for calling the MultiTermFit obj's underlying member method code with example usage: obj.fit(t, y, dy) and returns: self