exosim.plots.radiometricPlotter#

Classes#

RadiometricPlotter

Radiometric plotter.

Module Contents#

class RadiometricPlotter(input)[source]#

Bases: exosim.log.Logger

Radiometric plotter. This class handles the methods to plot the radiometric table produced by exosim.

Variables:
Parameters:

input (Union[str, astropy.table.Table]) –

Examples

The following example, given the test_file.h5 preoduced by Exosim, plots the radiometric table and stores the figure as radiometric.png.

>>> from exosim.plots import RadiometricPlotter
>>> radiometricPlotter = RadiometricPlotter(input='./test_file.h5')
>>> radiometricPlotter.plot_table()
>>> radiometricPlotter.save_fig('radiometric.png')
load_table(input_file)[source]#

It loads the radiometric table from the input file:

Parameters:

input_file (str) – input file name

Returns:

loaded radiometric table

Return type:

astropy.table.QTable

plot_bands(ax, scale='log', channel_edges=True, add_legend=True)[source]#

It plots the channels bands behind the indicated axes.

Parameters:
  • ax (matplotlib.axes.Axes) – axes where to plot the bands

  • scale (str) – x axes scale. Default is log.

  • channel_edges (bool) – if True the x axes ticks are placed at the channel edges. Default is True.

  • add_legend (bool) –

Returns:

axes with channel bands added

Return type:

matplotlib.axes.Axes

plot_noise(ax, scale='log', channel_edges=True, contribs=False, ch_lengend=True)[source]#

It plots the noise components found in the input table in the indicated axes.

Parameters:
  • ax (matplotlib.axes.Axes) – axes where to plot the noises

  • scale (str) – x axes scale. Default is log.

  • channel_edges (bool) – if True the x axes ticks are placed at the channel edges. Default is True.

  • contribs (bool) – if True all the contributions are plotted. Default is False.

  • ch_lengend (bool) – if True add a legend for the channels color. Default is True.

Returns:

axes with noises plotted

Return type:

matplotlib.axes.Axes

plot_signal(ax, ylim=None, scale='log', channel_edges=True, contribs=False, ch_lengend=True)[source]#

It plots the signal components found in the input table in the indicated axes.

Parameters:
  • ylim (float or (float, float)) – ylim for matplotlib.axes.Axes.

  • ax (matplotlib.axes.Axes) – axes where to plot the signals

  • scale (str) – x axes scale. Default is log.

  • channel_edges (bool) – if True the x axes ticks are placed at the channel edges. Default is True.

  • contribs (bool) – if True all the contributions are plotted. Default is False.

  • ch_lengend (bool) – if True add a legend for the channels color. Default is True.

Returns:

axes with signals plotted

Return type:

matplotlib.axes.Axes

plot_table(scale='log', channel_edges=True, contribs=False)[source]#

It produces a figure with signal and noise for the input table.

Parameters:
  • scale (str) – x axes scale. Default is log.

  • channel_edges (bool) – if True the x axes ticks are placed at the channel edges. Default is True.

  • contribs (bool) – if True all the contributions are plotted. Default is False.

Returns:

Return type:

Tuple[matplotlib.pyplot.Figure, Tuple[matplotlib.pyplot.Axes, matplotlib.pyplot.Axes]]

plot_efficiency(scale='log', channel_edges=False, ch_lengend=True)[source]#

It produces a figure with efficiencies for the input table.

Parameters:
  • scale (str) – x axes scale. Default is log.

  • channel_edges (bool) – if True the x axes ticks are placed at the channel edges. Default is True.

  • ch_lengend (bool) – if True add a legend for the channels color. Default is True.

Returns:

Return type:

Tuple[matplotlib.pyplot.Figure, Tuple[matplotlib.pyplot.Axes, matplotlib.pyplot.Axes]]

plot_apertures()[source]#

It produces a figure with apertures superimposed to the focal plane.

Returns:

plotted figure

Return type:

matplotlib.figure.Figure

save_fig(name)[source]#

It saves the produced figure.

Parameters:

name (str) – figure name

Return type:

None