nidn.plots package

Submodules

nidn.plots.plot_model_grid module

nidn.plots.plot_model_grid.plot_model_grid(run_cfg, save_path=None)

Plots the absolute value of the epsilon over all frequencies for each 3-D grid point. Optionally saves it. :param run_cfg: The run configuration. :type run_cfg: dict :param save_path: Folder to save the plot in. Defaults to None, then the plot will not be saved. :type save_path: str, optional

nidn.plots.plot_model_grid_per_freq module

nidn.plots.plot_model_grid_per_freq.plot_model_grid_per_freq(run_cfg, freq_idx=[0, 1, 2, 3], save_path=None)

Plots the real and imaginary part of the permittivity in two separate plots for frequencies in target_frequencies defined by freq_idx. Optionally saves it.

Parameters
  • run_cfg (dict) – The run configuration.

  • freq_idx (list of int) – Which of the frequency indices in target_frequencies we want to plot. Defaults to [0, 1, 2, 3].

  • save_path (str, optional) – Folder to save the plot in. Defaults to None, then the plot will not be saved.

nidn.plots.plot_spectra module

nidn.plots.plot_spectra.plot_spectra(run_cfg, save_path=None, prod_R_spectrum=None, prod_T_spectrum=None, markers=True, filename=None, ylim=[[0.0, 1.0], [0.0, 1.0]])

Plots the produced RTA spectra together with the target spectra. Optionally saves it.

Parameters
  • run_cfg (dict) – The run configuration.

  • save_path (str, optional) – Folder to save the plot in. Defaults to None, then the plot will not be saved.

  • prod_R_spectrum (torch.tensor, optional) – The produced reflection spectrum. Defaults to None, then will compute from model.

  • prod_T_spectrum (torch.tensor, optional) – The produced transmission spectrum. Defaults to None, then will compute from model.

  • markers (bool) – Whether to plot markers for the target and produced spectra.

  • filename (str, optional) – Filename to save the plot in. Defaults to None, then the plot will be saved with the name “spectra.png”.

  • ylim (list) – The y-limits of the plot for the two spectra. Defaults to [[0.0, 1.0],[0.0, 1.0]].

Module contents