code: def wavelet_PSD(t, h, f0, Q=1.0):
      """Compute the wavelet PSD as a function of f0 and t
  
      Parameters
      ----------
      t : array_like
          array of times, length N
      h : array_like
          array of observed values, length N
      f0 : array_like
          array of candidate frequencies, length Nf
      Q : float
          Q-parameter for wavelet
  
      Returns
      -------
      PSD : ndarray
          The 2-dimensional PSD, of shape (Nf, N), corresponding with
          frequencies f0 and times t.
      """
      t, h, f0 = map(np.asarray, (t, h, f0))
      if (t.ndim != 1) or (t.shape != h.shape):
          raise ValueError(
              "t and h must be one dimensional and the same shape"
          )
  
      if f0.ndim != 1:
          raise ValueError("f0 must be one dimensional")
  
      Q = Q + np.zeros_like(f0)
  
      f, H = FT_continuous(t, h)
      W = np.conj(sinegauss_FT(f, 0, f0[:, None], Q[:, None]))
      _, HW = IFT_continuous(f, H * W)
  
      return abs(HW) ** 2
  
file_path: astroML/astroML/fourier.py
imports: import numpy
label_desc: Use image node_id 7 for calling a global function with example usage: wavelet_PSD(t, h, f0, Q) and returns: unknown