exosim.plots.focalPlanePlotter#
Attributes#
Classes#
Focal plane plotter. |
Module Contents#
- class FocalPlanePlotter(input)[source]#
Bases:
exosim.log.LoggerFocal plane plotter. This class handles the methods to plot the focal palnes produced by exosim.
- Variables:
input (str) – input file name
fig (
matplotlib.figure.Figure) – produced figure
- Parameters:
input (str) –
Examples
The following example, given the test_file.h5 produced by exosim, plots the focal plane at the first time stamp and stores the figure as focal_plane.png.
>>> from exosim.plots import FocalPlanePlotter >>> focalPlanePlotter = FocalPlanePlotter(input='./test_file.h5') >>> focalPlanePlotter.plot_focal_plane(time_step=0) >>> focalPlanePlotter.save_fig('focal_plane.png')
- load_focal_plane(ch, time_step)[source]#
It loads the channel focal plane from the input file:
- Parameters:
- Returns:
numpy.ndarray– focal planeint – over sampling factor
- Return type:
Tuple[numpy.ndarray, int]
- plot_focal_plane(time_step=0, scale='linear')[source]#
It plots the focal planes at a specific time. For each channel it adds a
Axesto a figure. It returns aFigurewith two rows: on the first row are reported the oversampled focal planes. In the second row are reported the extracted focal plane, where the oversampling is removed. The focal plane plotted is the combination of the source focal plane plus the foreground focal plane.- Parameters:
- Returns:
populated figure
- 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_efficiency(scale='log', channel_edges=False, ch_lengend=False, efficiency='all')[source]#
It produces a figure with efficiencies for the input table.
- Parameters:
scale (str) – x axes scale. Default is log.
channel_edges (bool) – if
Truethe x axes ticks are placed at the channel edges. Default isTrue.ch_lengend (bool) – if
Trueadd a legend for the channels color. Default isTrue.efficiency (str) – what efficiency to plot. Options are “optical efficiency”, “responsivity”, “quantum efficiency”, “photon conversion efficiency” and “all”. Default is “all”.
- Returns:
matplotlib.figure.Figure– plotted figure(
matplotlib.axes.Axes,matplotlib.axes.Axes,matplotlib.axes.Axes,matplotlib.axes.Axes) – tuple of axis. First axes is for optical efficiency, second is for responsivity, third is for quantum efficiency and fourth is for photon conversion efficiency.
- Return type:
Tuple[matplotlib.pyplot.Figure, List[matplotlib.axes.Axes]]