Goes through and checks all stimuli and input settings are valid
        and consistent. Prompts user with a message if there is a condition
        that would prevent acquisition.

        :param mode: The mode of acquisition trying to be run. Options are
            'chart', or anthing else ('explore', 'protocol', 'calibration')
        :type mode: str
        :returns: bool -- Whether all inputs and stimuli are valid

def verifyInputs(self, mode):
        """Goes through and checks all stimuli and input settings are valid
        and consistent. Prompts user with a message if there is a condition
        that would prevent acquisition.

        :param mode: The mode of acquisition trying to be run. Options are
            'chart', or anthing else ('explore', 'protocol', 'calibration')
        :type mode: str
        :returns: bool -- Whether all inputs and stimuli are valid
        """
        if len(self._aichans) < 1:
            failmsg = "Must have at least one input channel selected"
            QtGui.QMessageBox.warning(self, "Invalid Setting", failmsg)
            return False
        if mode == 'chart':
            if self.ui.aifsSpnbx.value()*self.fscale > 100000:
                QtGui.QMessageBox.warning(self, "Invalid Input", "Recording samplerate cannot exceed 100kHz for chart acquisition")
                return False
        elif mode is not None:
            # if (1./self.ui.reprateSpnbx.value()) < self.ui.windowszSpnbx.value()*self.tscale + 0.05:
            #     QtGui.QMessageBox.warning(self, "Invalid Input", "A minimum of 50ms time between repetitions required. Current interval {}, required {}".format((1./self.ui.reprateSpnbx.value()), self.ui.windowszSpnbx.value()*self.tscale + 0.05))
            #     return False
            if self.ui.tabGroup.currentWidget().objectName() == 'tabExplore':
                # each widget should be in charge of putting its own stimulus together
                self.ui.exploreStimEditor.saveToObject()
                failmsg = self.ui.exploreStimEditor.verify(self.ui.windowszSpnbx.value())
                if failmsg:
                    QtGui.QMessageBox.warning(self, "Invalid Input", failmsg)
                    return False
                # if selectedStim.intensity() > self.calvals['caldb']:
                #     QtGui.QMessageBox.warning(self, "Invalid Input",
                #             "Intensity must be below calibrated maximum {}dB SPL".format(self.calvals['caldb']))
                #     return False
            elif self.ui.tabGroup.currentWidget().objectName() == 'tabProtocol':
                protocol_model = self.acqmodel.protocol_model()
                # protocol delegates to each test to verify itself and report
                failure = protocol_model.verify(float(self.ui.windowszSpnbx.value()))
                if failure:
                    QtGui.QMessageBox.warning(self, "Invalid Input", failure)
                    return False
            elif self.ui.tabGroup.currentWidget().objectName() == 'tabCalibrate':
                if len(self._aichans) > 1:
                    failmsg = "Speaker calibration only supported for single channel, currently {} channels selected; select 1 input channel.".format(len(self._aichans))
                    QtGui.QMessageBox.warning(self, "Invalid Setting", failmsg)
                    return False
                # get what stimulus is about to be presented
                if self.ui.calibrationWidget.ui.savecalCkbx.isChecked() or not self.ui.calibrationWidget.currentSelection() == 'Tone Curve':
                    calibration_stimulus = self.acqmodel.calibration_stimulus('noise')
                    self.ui.calibrationWidget.saveToObject()
                else:
                    calibration_stimulus = self.acqmodel.calibration_stimulus('tone')

                failmsg = calibration_stimulus.verify(float(self.ui.windowszSpnbx.value()))
                if failmsg:
                    QtGui.QMessageBox.warning(self, "Invalid Input", failmsg)
                    return False
                # also check that the recording samplerate is high enough in this case
                failmsg = calibration_stimulus.verifyExpanded(samplerate=self.ui.aifsSpnbx.value())
                if failmsg:
                    failmsg = failmsg.replace('Generation', 'Recording')
                    QtGui.QMessageBox.warning(self, "Invalid Input", failmsg)
                    return False
            if self.advanced_options['use_attenuator'] and not self.acqmodel.attenuator_connection():
                failmsg = "Error Connection to attenuator, make sure it it turned on and connected, and try again"
                QtGui.QMessageBox.warning(self, "Connection Error", failmsg)
                return False
        return True