exosim.plots.radiometricPlotter#
Classes#
Radiometric plotter. |
Module Contents#
- class RadiometricPlotter(input)[source]#
Bases:
exosim.log.LoggerRadiometric plotter. This class handles the methods to plot the radiometric table produced by exosim.
- Variables:
input (str or
astropy.table.QTable) – input datainput_table (
astropy.table.QTable) – input radiometric tablefig (
matplotlib.figure.Figure) – produced figure
- 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:
- 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 bandsscale (str) – x axes scale. Default is log.
channel_edges (bool) – if
Truethe x axes ticks are placed at the channel edges. Default isTrue.add_legend (bool) –
- Returns:
axes with channel bands added
- Return type:
- 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 noisesscale (str) – x axes scale. Default is log.
channel_edges (bool) – if
Truethe x axes ticks are placed at the channel edges. Default isTrue.contribs (bool) – if
Trueall the contributions are plotted. Default isFalse.ch_lengend (bool) – if
Trueadd a legend for the channels color. Default isTrue.
- Returns:
axes with noises plotted
- Return type:
- 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 signalsscale (str) – x axes scale. Default is log.
channel_edges (bool) – if
Truethe x axes ticks are placed at the channel edges. Default isTrue.contribs (bool) – if
Trueall the contributions are plotted. Default isFalse.ch_lengend (bool) – if
Trueadd a legend for the channels color. Default isTrue.
- Returns:
axes with signals plotted
- Return type:
- plot_table(scale='log', channel_edges=True, contribs=False)[source]#
It produces a figure with signal and noise for the input table.
- Parameters:
- Returns:
matplotlib.figure.Figure– plotted figure(
matplotlib.axes.Axes,matplotlib.axes.Axes) – tuple of axis. First axes is for signal, second is for noise.
- 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:
- Returns:
matplotlib.figure.Figure– plotted figure(
matplotlib.axes.Axes,matplotlib.axes.Axes) – tuple of axis. First axes is for signal, second is for noise.
- Return type:
Tuple[matplotlib.pyplot.Figure, Tuple[matplotlib.pyplot.Axes, matplotlib.pyplot.Axes]]