This is a convenience function to plot ALL spectra currently
        stored in the container. It is useful to asses whether data filters
        do perform correctly.

        Note that the function just iterates over all ids and plots the
        corresponding spectra, thus it is slow.

        Spectra a named using the format: \%.2i_spectrum_id_\{\}.png.

        Parameters
        ----------
        outdir : string
            Output directory to store spectra in. Created if it does not
            exist.

def plot_all_spectra(self, outdir):
        """This is a convenience function to plot ALL spectra currently
        stored in the container. It is useful to asses whether data filters
        do perform correctly.

        Note that the function just iterates over all ids and plots the
        corresponding spectra, thus it is slow.

        Spectra a named using the format: \%.2i_spectrum_id_\{\}.png.

        Parameters
        ----------
        outdir : string
            Output directory to store spectra in. Created if it does not
            exist.
        """
        os.makedirs(outdir, exist_ok=True)

        g = self.data.groupby('id')
        for nr, (name, item) in enumerate(g):
            print(
                'Plotting spectrum with id {} ({} / {})'.format(
                    name, nr, len(g.groups.keys()))
            )
            plot_filename = ''.join((
                outdir + os.sep,
                '{:04}_spectrum_id_{}.png'.format(nr, name)
            ))
            spec_nor, spec_rec, spec_fig = self.get_spectrum(
                nr_id=name,
                plot_filename=plot_filename
            )
            plt.close(spec_fig)