Example #1
0
    def get_info_filters(self):
        """
        Function that gets the info of the filters
        Returns:
            initfreq : float
                Initial frequency for AMPA
            endfreq : float
                End frequency for AMPA
            bandwidth : float
                The bandwith with the
            beta : float
                Impulssivenes of the filter response
            L_filters : list
                The list of filters we will use
        """
        initfreq = float(self.initialfreq.value())
        endfreq = float(self.endfreq.value())
        bandwidth = float(self.bandWidth.value())
        beta = float(self.lcoefficient.value())
        L_filters = []

        # we recover the correspondent value. CHanges this part in a future
        for row in xrange(0, self.tableWidget.rowCount()):
            value = str(self.tableWidget.item(row, 0).text())
            if gui_functions.check_digits(value):
                L_filters.append(value)

        return [initfreq, endfreq, bandwidth, beta, L_filters]
Example #2
0
 def check_param(self, param):
     """Function to check if the input field is empty or not."""
     if gui_functions.check_digits(param) and gui_functions.check_emptiness(
             param):
         return True
     else:
         return False
Example #3
0
    def empty_filed(self, val1, val2):
        """
        Function that checks if the hybrid low and hybrid high are checked or not, and if they are number.
        Args:

            val1 : str:
                The first value to check
            val2 : str
                The second value to check
        Returns:
        True if any of the fields are empty, or not nobers
        """

        cond1 = gui_functions.check_emptiness(val1) and gui_functions.check_emptiness(val2)
        cond2 = gui_functions.check_digits(val1) and gui_functions.check_digits(val2)

        return cond1 and cond2