def get_indices(self, fit=None, tmin=None, tmax=None, specimen=None):
        """
        Finds the appropriate indices in self.Data[self.s]['zijdplot_steps']
        given a set of upper/lower bounds. This is to resolve duplicate
        steps using the convention that the first good step of that name is
        the indicated step by that bound if there are no steps of the names
        tmin or tmax then it complains and reutrns a tuple (None,None).

        Parameters
        ----------
        fit : the fit who's bounds to find the indecies of if no upper or
            lower bounds are specified
        tmin : the lower bound to find the index of
        tmax : the upper bound to find the index of
        specimen : the specimen who's steps to search for indecies (defaults
            to currently selected specimen)

        Returns
        -------
        (tmin_index, tmax_index) : a tuple with the lower bound index then
            the upper bound index
        """
        if specimen == None:
            specimen = self.s
        if fit and not tmin and not tmax:
            tmin = fit.tmin
            tmax = fit.tmax
        if specimen not in list(self.Data.keys()):
            self.user_warning("No data for specimen " + specimen)
        if tmin in self.Data[specimen]['zijdblock_steps']:
            tmin_index = self.Data[specimen]['zijdblock_steps'].index(tmin)
        elif type(tmin) == str or type(tmin) == str and tmin != '':
            int_steps = [float(x.strip("C mT"))
                         for x in self.Data[specimen]['zijdblock_steps']]
            if tmin == '':
                tmin = self.Data[specimen]['zijdblock_steps'][0]
                print(("No lower bound for %s on specimen %s using lowest step (%s) for lower bound" % (
                    fit.name, specimen, tmin)))
                if fit != None:
                    fit.tmin = tmin
            int_tmin = float(tmin.strip("C mT"))
            diffs = [abs(x-int_tmin) for x in int_steps]
            tmin_index = diffs.index(min(diffs))
        else:
            tmin_index = self.tmin_box.GetSelection()
        if tmax in self.Data[specimen]['zijdblock_steps']:
            tmax_index = self.Data[specimen]['zijdblock_steps'].index(tmax)
        elif type(tmax) == str or type(tmax) == str and tmax != '':
            int_steps = [float(x.strip("C mT"))
                         for x in self.Data[specimen]['zijdblock_steps']]
            if tmax == '':
                tmax = self.Data[specimen]['zijdblock_steps'][-1]
                print(("No upper bound for fit %s on specimen %s using last step (%s) for upper bound" % (
                    fit.name, specimen, tmax)))
                if fit != None:
                    fit.tmax = tmax
            int_tmax = float(tmax.strip("C mT"))
            diffs = [abs(x-int_tmax) for x in int_steps]
            tmax_index = diffs.index(min(diffs))
        else:
            tmax_index = self.tmin_box.GetSelection()

        max_index = len(self.Data[specimen]['zijdblock_steps'])-1
        while (self.Data[specimen]['measurement_flag'][max_index] == 'b' and max_index-1 > 0):
            max_index -= 1

        if tmin_index >= max_index:
            print(("lower bound is greater or equal to max step cannot determine bounds for specimen: " + specimen))
            return (None, None)

        if (tmin_index >= 0):
            while (self.Data[specimen]['measurement_flag'][tmin_index] == 'b' and
                   tmin_index+1 < len(self.Data[specimen]['zijdblock_steps'])):
                if (self.Data[specimen]['zijdblock_steps'][tmin_index+1] == tmin):
                    tmin_index += 1
                else:
                    tmin_old = tmin
                    while (self.Data[specimen]['measurement_flag'][tmin_index] == 'b' and
                           tmin_index+1 < len(self.Data[specimen]['zijdblock_steps'])):
                        tmin_index += 1
                    tmin = self.Data[specimen]['zijdblock_steps'][tmin_index]
                    if fit != None:
                        fit.tmin = tmin
                    self.tmin_box.SetStringSelection(tmin)
                    print(("For specimen " + str(specimen) + " there are no good measurement steps with value - " +
                           str(tmin_old) + " using step " + str(tmin) + " as lower bound instead"))
                    break

        if (tmax_index < max_index):
            while (self.Data[specimen]['measurement_flag'][tmax_index] == 'b' and
                   tmax_index+1 < len(self.Data[specimen]['zijdblock_steps'])):
                if (self.Data[specimen]['zijdblock_steps'][tmax_index+1] == tmax):
                    tmax_index += 1
                else:
                    tmax_old = tmax
                    while (self.Data[specimen]['measurement_flag'][tmax_index] == 'b' and
                           tmax_index >= 0):
                        tmax_index -= 1
                    tmax = self.Data[specimen]['zijdblock_steps'][tmax_index]
                    if fit != None:
                        fit.tmax = tmax
                    self.tmax_box.SetStringSelection(tmax)
                    print(("For specimen " + str(specimen) + " there are no good measurement steps with value - " +
                           str(tmax_old) + " using step " + str(tmax) + " as upper bound instead"))
                    break

        if (tmin_index < 0):
            tmin_index = 0
        if (tmax_index > max_index):
            tmax_index = max_index

        return (tmin_index, tmax_index)