def _read_from_block(self, block_num, start, stop, step, chan_idx, sample_idx):
    num = (stop - start)
    if (num == 1):
        prof_idx = 0
    else:
        prof_idx = slice(0, num, step)
    fstart = (self.data_start_bytes[block_num] + (self.profile_bytes * start))
    with open(self.fpath, 'rb') as f:
        f.seek(fstart)
        vlt_raw = np.fromfile(f, self.raw_dtype, (num * self.nitems_per_profile))
    try:
        vlt_raw = vlt_raw.reshape(num, self.nsamples_per_profile, self.nchannels)
    except ValueError:
        raise EOFError('End of file reached. Could not read requested data.')
    vlt_raw = vlt_raw.swapaxes(1, 2)[(prof_idx, chan_idx, sample_idx)]
    vlt = np.empty(vlt_raw.shape, dtype=self.dtype)
    vlt.real = vlt_raw['real']
    vlt.imag = vlt_raw['imag']
    return vlt
def _read_from_block(self, block_num, start, stop, step, chan_idx, sample_idx):
    num = (stop - start)
    if (num == 1):
        prof_idx = 0
    else:
        prof_idx = slice(0, num, step)
    fstart = (self.data_start_bytes[block_num] + (self.profile_bytes * start))
    with open(self.fpath, 'rb') as f:
        f.seek(fstart)
        vlt_raw = np.fromfile(f, self.raw_dtype, (num * self.nitems_per_profile))
    try:
        vlt_raw = vlt_raw.reshape(num, self.nsamples_per_profile, self.nchannels)
    except ValueError:
        raise EOFError('End of file reached. Could not read requested data.')
    vlt_raw = vlt_raw.swapaxes(1, 2)[(prof_idx, chan_idx, sample_idx)]
    vlt = np.empty(vlt_raw.shape, dtype=self.dtype)
    vlt.real = vlt_raw['real']
    vlt.imag = vlt_raw['imag']
    return vlt