def return_hdr(self):
        """Return the header for further use.

        Returns
        -------
        subj_id : str
            subject identification code
        start_time : datetime
            start time of the dataset
        s_freq : float
            sampling frequency
        chan_name : list of str
            list of all the channels
        n_samples : int
            number of samples in the dataset
        orig : dict
            the full header
        """
        with self.filename.open('br') as f:
            orig = _read_header(f)

        assert orig['protocol']['nOperationMode'] == 3, 'Only continuous no-gap recordings are supported'
        assert orig['sections']['SynchArraySection']['llNumEntries'] == 0
        assert orig['sections']['SynchArraySection']['uBlockIndex'] == 0

        # file format
        if orig['nDataFormat'] == 0:
            self.dtype = dtype('i2')
        elif orig['nDataFormat'] == 1:
            self.dtype = dtype('f4')

        chan_name = []
        offset = []
        gain = []
        for ch in orig['listADCInfo']:
            chan_name.append(ch['ADCChNames'].decode('utf-8').strip())

            # compute the gain and offset
            ch_gain = orig['protocol']['lADCResolution'] / orig['protocol']['fADCRange']
            ch_gain *= (ch['fInstrumentScaleFactor'] *
                        ch['fSignalGain'] *
                        ch['fADCProgrammableGain'])
            if ch['nTelegraphEnable'] == 1:
                ch_gain *= ch['fTelegraphAdditGain']
            gain.append(1 / ch_gain)

            offset.append(ch['fInstrumentOffset'] -
                          ch['fSignalOffset'])

        self.offset = array(offset)[:, newaxis]
        self.gain = array(gain)[:, newaxis]
        self.head = orig['sections']['DataSection']['uBlockIndex'] * BLOCKSIZE
        self.n_chan = orig['sections']['ADCSection']['llNumEntries']
        assert self.n_chan == len(chan_name)
        self.n_samples = int(orig['sections']['DataSection']['llNumEntries'] /
                             self.n_chan)

        subj_id = self.filename.stem
        try:
            start_time = (datetime.strptime(str(orig['uFileStartDate']), '%Y%m%d') +
                          timedelta(seconds=orig['uFileStartTimeMS'] / 1000))
        except ValueError:  # no time given, use placeholder
            start_time = DEFAULT_DATETIME

        s_freq = 1.e6 / orig['protocol']['fADCSequenceInterval']

        return subj_id, start_time, s_freq, chan_name, self.n_samples, orig
Return the header for further use.

        Returns
        -------
        subj_id : str
            subject identification code
        start_time : datetime
            start time of the dataset
        s_freq : float
            sampling frequency
        chan_name : list of str
            list of all the channels
        n_samples : int
            number of samples in the dataset
        orig : dict
            the full header