@classmethod
def fromfile(cls, fh_ts, fh_raw, payload_nbytes=1 << 24, nchan=1, bps=4,
    complex_data=False, valid=True, verify=True):
    """Read a frame from timestamp and raw data filehandles.

        Any arguments beyond the filehandle are used to help initialize the
        payload, except for ``valid`` and ``verify``, which are passed on
        to the header and class initializers.

        Parameters
        ----------
        fh_ts : filehandle
            To the timestamp file.  The next line will be read.
        fh_raw : file_handle or tuple
            Should be a single handle for a rawdump data frame, or a tuple
            containing tuples with pairs of handles for a phased one.  E.g.,
            ``((L1, L2), (R1, R2))`` for left and right polarisations.
        payload_nbytes : int, optional
            Size of the individual payloads in bytes.  Default: ``2**24``
            (16 MB).
        nchan : int, optional
            Number of channels.  Default: 1.
        bps : int, optional
            Bits per elementary sample.  Default: 4.
        complex_data : bool, optional
            Whether data are complex.  Default: `False`.
        valid : bool, optional
            Whether the data are valid (default: `True`). Note that this cannot
            be inferred from the header or payload itself.  If `False`, any
            data read will be set to ``cls.fill_value``.
        verify : bool, optional
            Whether to verify consistency of the frame parts.  Default: `True`.
        """
    header = cls._header_class.fromfile(fh_ts, verify=verify)
    payload = cls._payload_class.fromfile(fh_raw, payload_nbytes=
        payload_nbytes, nchan=nchan, bps=bps, complex_data=complex_data)
    return cls(header, payload, valid=valid, verify=verify)
