@classmethod
def fromdata(cls, data, header, *args, valid=True, verify=True, **kwargs):
    """Construct frame from data and header.

        Parameters
        ----------
        data : `~numpy.ndarray`
            Array holding data to be encoded.
        header : `~baseband.vlbi_base.header.VLBIHeaderBase`
            Header for the frame.
        *args, **kwargs :
            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.
        valid : bool, optional
            Whether this payload contains valid data.
        verify : bool, optional
            Whether to verify the header and frame correctness.
        """
    payload = cls._payload_class.fromdata(data, *args, **kwargs)
    return cls(header, payload, valid=valid, verify=verify)
