def Add_text(self, s):
        """
        Add text to measurement data window.
        """
        self.logger.DeleteAllItems()
        FONT_RATIO = self.GUI_RESOLUTION + (self.GUI_RESOLUTION - 1) * 5
        if self.GUI_RESOLUTION > 1.1:
            font1 = wx.Font(11, wx.SWISS, wx.NORMAL,
                            wx.NORMAL, False, self.font_type)
        elif self.GUI_RESOLUTION <= 0.9:
            font1 = wx.Font(8, wx.SWISS, wx.NORMAL,
                            wx.NORMAL, False, self.font_type)
        else:
            font1 = wx.Font(10, wx.SWISS, wx.NORMAL,
                            wx.NORMAL, False, self.font_type)

        # get temperature indecies to display current interp steps in logger
        t1 = self.tmin_box.GetValue()
        t2 = self.tmax_box.GetValue()

        # microwave or thermal
        if "LP-PI-M" in self.Data[s]['datablock'][0]['magic_method_codes']:
            MICROWAVE = True
            THERMAL = False

            steps_tr = []
            for rec in self.Data[s]['datablock']:

                if "measurement_description" in rec:
                    MW_step = rec["measurement_description"].strip(
                        '\n').split(":")
                    for STEP in MW_step:
                        if "Number" in STEP:
                            temp = float(STEP.split("-")[-1])
                            steps_tr.append(temp)

                else:
                    power = rec['treatment_mw_power']
                    if '-' in str(power):
                        power = power.split('-')[-1]
                    steps_tr.append(int(power))



            #steps_tr = [float(d['treatment_mw_power'].split("-")[-1])
            #            for d in self.Data[s]['datablock']]
        else:
            MICROWAVE = False
            THERMAL = True
            steps_tr = [float(d['treatment_temp']) -
                        273 for d in self.Data[s]['datablock']]

        if (t1 == "" or t2 == "") or float(t2) < float(t1):
            tmin_index, tmax_index = -1, -1
        else:
            tmin_index = steps_tr.index(int(t1))
            tmax_index = steps_tr.index(int(t2))

        self.logger.SetFont(font1)
        for i, rec in enumerate(self.Data[s]['datablock']):
            if "LT-NO" in rec['magic_method_codes']:
                step = "N"
            elif "LT-AF-Z" in rec['magic_method_codes']:
                step = "AFD"
            elif "LT-T-Z" in rec['magic_method_codes'] or 'LT-M-Z' in rec['magic_method_codes']:
                step = "Z"
            elif "LT-T-I" in rec['magic_method_codes'] or 'LT-M-I' in rec['magic_method_codes']:
                step = "I"
            elif "LT-PTRM-I" in rec['magic_method_codes'] or "LT-PMRM-I" in rec['magic_method_codes']:
                step = "P"
            elif "LT-PTRM-MD" in rec['magic_method_codes'] or "LT-PMRM-MD" in rec['magic_method_codes']:
                step = "T"
            elif "LT-PTRM-AC" in rec['magic_method_codes'] or "LT-PMRM-AC" in rec['magic_method_codes']:
                step = "A"
            else:
                print(("unrecognized step in specimen %s Method codes: %s" %
                       (str(rec['magic_method_codes']), s)))
            if THERMAL:
                self.logger.InsertItem(i, "%i" % i)
                self.logger.SetItem(i, 1, step)
                self.logger.SetItem(i, 2, "%1.0f" %
                                    (float(rec['treatment_temp']) - 273.))
                self.logger.SetItem(i, 3, "%.1f" %
                                    float(rec['measurement_dec']))
                self.logger.SetItem(i, 4, "%.1f" %
                                    float(rec['measurement_inc']))
                self.logger.SetItem(i, 5, "%.2e" %
                                    float(rec['measurement_magn_moment']))
            elif MICROWAVE:  # mcrowave
                if "measurement_description" in list(rec.keys()):
                    MW_step = rec["measurement_description"].strip(
                        '\n').split(":")
                    for STEP in MW_step:
                        if "Number" not in STEP:
                            continue
                        temp = float(STEP.split("-")[-1])

                        self.logger.InsertItem(i, "%i" % i)
                        self.logger.SetItem(i, 1, step)
                        self.logger.SetItem(i, 2, "%1.0f" % temp)
                        self.logger.SetItem(i, 3, "%.1f" %
                                            float(rec['measurement_dec']))
                        self.logger.SetItem(i, 4, "%.1f" %
                                            float(rec['measurement_inc']))
                        self.logger.SetItem(i, 5, "%.2e" % float(
                            rec['measurement_magn_moment']))
            self.logger.SetItemBackgroundColour(i, "WHITE")
            if i >= tmin_index and i <= tmax_index:
                self.logger.SetItemBackgroundColour(i, "LIGHT BLUE")
            if 'measurement_flag' not in list(rec.keys()):
                rec['measurement_flag'] = 'g'
Add text to measurement data window.