def request_spectra(self):
        cmd = struct.pack('<B', 0x09)
        self.log_debug('Requesting spectra')
        self.usb_send_ep.write(cmd)
        
        data = np.zeros(shape=(3840,), dtype='<u2')
        
        try:
            data_lo = self._spec_lo.read(512*4, timeout=100)
            data_hi = self._spec_hi.read(512*11, timeout=100)

            data_sync = self._spec_hi.read(1, timeout=100)

            assert struct.unpack('<B', data_sync)[0] == 0x69

            data[:1024], data[1024:] = np.frombuffer(data_lo, dtype='<u2'), \
                                       np.frombuffer(data_hi, dtype='<u2')
        except __HOLE__:
            self.log_error('Not synchronized')
        except VisaIOError:
            self.log_error('Timeout on usb')
        finally:
            self.log_debug('Obtained spectra')

        return data
dataset/ETHPy150Open LabPy/lantz/lantz/drivers/oceanoptics/usb4000.py/USB4000.request_spectra