<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _det_stat_freq(det_freq, data_freq_sq, data_freq, w, Nc, ulen, mplen):
 """ Compute detection statistic in the frequency domain :type det_freq: numpy.ndarray :param det_freq: detector in freq domain :type data_freq_sq: numpy.ndarray :param data_freq_sq: squared data in freq domain :type data_freq: numpy.ndarray :param data_freq: data in freq domain :type w: numpy.ndarray :param w: boxcar in freq domain :type Nc: int :param Nc: number of channels in data stream :type ulen: int :param ulen: length of detector :type mplen: int :param mplen: length of data :return: Array of detection statistics :rtype: numpy.ndarray """

    num_cor = np.multiply(det_freq, data_freq)  # Numerator convolution
    den_cor = np.multiply(w, data_freq_sq)  # Denominator convolution
    # Do inverse fft
    # First and last Nt - 1 samples are invalid; clip them off
    num_ifft = np.real(np.fft.irfft(num_cor))[:, ulen-1:mplen:Nc]
    denominator = np.real(np.fft.irfft(den_cor))[ulen-1:mplen:Nc]
    # Ratio of projected to envelope energy = det_stat across all channels
    result = np.sum(np.square(num_ifft), axis=0) / denominator
    return result