<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _do_ffts(detector, stream, Nc):
 """ Perform ffts on data, detector and denominator boxcar :type detector: eqcorrscan.core.subspace.Detector :param detector: Detector object for doing detecting :type stream: list of obspy.core.stream.Stream :param stream: List of streams processed according to detector :type Nc: int :param Nc: Number of channels in data. 1 for non-multiplexed :return: list of time-reversed detector(s) in freq domain :rtype: list :return: list of squared data stream(s) in freq domain :rtype: list :return: list of data stream(s) in freq domain :return: detector-length boxcar in freq domain :rtype: numpy.ndarray :return: length of detector :rtype: int :return: length of data :rtype: int """

    min_fftlen = int(stream[0][0].data.shape[0] +
                     detector.data[0].shape[0] - Nc)
    fftlen = scipy.fftpack.next_fast_len(min_fftlen)
    mplen = stream[0][0].data.shape[0]
    ulen = detector.data[0].shape[0]
    num_st_fd = [np.fft.rfft(tr.data, n=fftlen)
                 for tr in stream[0]]
    denom_st_fd = [np.fft.rfft(np.square(tr.data), n=fftlen)
                   for tr in stream[0]]
    # Frequency domain of boxcar
    w = np.fft.rfft(np.ones(detector.data[0].shape[0]),
                    n=fftlen)
    # This should go into the detector object as in Detex
    detector_fd = []
    for dat_mat in detector.data:
        detector_fd.append(np.array([np.fft.rfft(col[::-1], n=fftlen)
                                     for col in dat_mat.T]))
    return detector_fd, denom_st_fd, num_st_fd, w, ulen, mplen