def METHOD_NAME(self):
    s11 = self.app.data.s11
    maximums = sorted(
        at.maxima([d.impedance().real for d in s11], threshold=500)
    )
    extended_data = {}
    logger.info("TO DO: find near data")
    for lowest in self.crossings:
        my_data = self._get_data(lowest)
        if lowest in extended_data:
            extended_data[lowest].update(my_data)
        else:
            extended_data[lowest] = my_data
    logger.debug("maximumx %s of type %s", maximums, type(maximums))
    for m in maximums:
        logger.debug("m %s of type %s", m, type(m))
        my_data = self._get_data(m)
        if m in extended_data:
            extended_data[m].update(my_data)
        else:
            extended_data[m] = my_data
    fields = [
        ("freq", format_frequency_short),
        ("r", format_resistence_neg),
        ("lambda", lambda x: round(x, 2)),
    ]
    if self.old_data:
        diff = self.compare(self.old_data[-1], extended_data, fields=fields)
    else:
        diff = self.compare({}, extended_data, fields=fields)
    self.old_data.append(extended_data)
    for i, idx in enumerate(sorted(extended_data.keys())):
        self.layout.addRow(
            f"{format_frequency_short(s11[idx].freq)}",
            QtWidgets.QLabel(
                f" ({diff[i]['freq']})"
                f" {format_complex_imp(s11[idx].impedance())}"
                f" ({diff[i]['r']}) {diff[i]['lambda']} m"
            ),
        )
    if self.filename and extended_data:
        with open(
            self.filename, "w", newline="", encoding="utf-8"
        ) as csvfile:
            fieldnames = extended_data[
                sorted(extended_data.keys())[0]
            ].keys()
            writer = csv.DictWriter(csvfile, fieldnames=fieldnames)
            writer.writeheader()
            for idx in sorted(extended_data.keys()):
                writer.writerow(extended_data[idx])