def get_spectrum(self, nr_id=None, abmn=None, plot_filename=None):
        assert nr_id is None or abmn is None
        if abmn is not None:
            subdata = self.data.query(
                'a == {} and b == {} and m == {} and n == {}'.format(*abmn)
            ).sort_values('frequency')
            if subdata.shape[0] == 0:
                return None, None
            nr_id = subdata['id'].iloc[0]
        subdata_nor = self.data.query(
            'id == {} and norrec=="nor"'.format(nr_id)
        ).sort_values('frequency')
        subdata_rec = self.data.query(
            'id == {} and norrec=="rec"'.format(nr_id)
        ).sort_values('frequency')
        spectrum_nor = None
        spectrum_rec = None
        if subdata_nor.shape[0] > 0:
            spectrum_nor = eis_plot.sip_response(
                frequencies=subdata_nor['frequency'].values,
                rmag=subdata_nor['r'],
                rpha=subdata_nor['rpha'],
            )
        if subdata_rec.shape[0] > 0:
            spectrum_rec = eis_plot.sip_response(
                frequencies=subdata_rec['frequency'].values,
                rmag=subdata_rec['r'],
                rpha=subdata_rec['rpha'],
            )
        if plot_filename is not None:
            if spectrum_nor is not None:
                fig = spectrum_nor.plot(
                    plot_filename,
                    reciprocal=spectrum_rec,
                    return_fig=True,
                    title='a: {} b: {} m: {}: n: {}'.format(
                        *subdata_nor[['a', 'b', 'm', 'n']].values[0, :]
                    )
                )
                return spectrum_nor, spectrum_rec, fig
        return spectrum_nor, spectrum_rec