autocti.plot.ImagingCIPlotter#

class autocti.plot.ImagingCIPlotter(dataset: ~autocti.charge_injection.imaging.imaging.ImagingCI, mat_plot_2d: ~autoarray.plot.mat_plot.two_d.MatPlot2D = <autoarray.plot.mat_plot.two_d.MatPlot2D object>, visuals_2d: ~autoarray.plot.visuals.two_d.Visuals2D = <autoarray.plot.visuals.two_d.Visuals2D object>, include_2d: ~autoarray.plot.include.two_d.Include2D = <autoarray.plot.include.two_d.Include2D object>, mat_plot_1d: ~autoarray.plot.mat_plot.one_d.MatPlot1D = <autoarray.plot.mat_plot.one_d.MatPlot1D object>, visuals_1d: ~autoarray.plot.visuals.one_d.Visuals1D = <autoarray.plot.visuals.one_d.Visuals1D object>, include_1d: ~autoarray.plot.include.one_d.Include1D = <autoarray.plot.include.one_d.Include1D object>, residuals_symmetric_cmap: bool = True)[source]#

Bases: Plotter

Plots the attributes of Imaging objects using the matplotlib method imshow() and many other matplotlib functions which customize the plot’s appearance.

The mat_plot_2d attribute wraps matplotlib function calls to make the figure. By default, the settings passed to every matplotlib function called are those specified in the config/visualize/mat_wrap/*.ini files, but a user can manually input values into MatPlot2d to customize the figure’s appearance.

Overlaid on the figure are visuals, contained in the Visuals2D object. Attributes may be extracted from the Imaging and plotted via the visuals object, if the corresponding entry is True in the Include2D object or the config/visualize/include.ini file.

Parameters:
  • dataset – The charge injection imaging dataset the plotter plots.

  • mat_plot_2d – Contains objects which wrap the matplotlib function calls that make 2D plots.

  • visuals_2d – Contains 2D visuals that can be overlaid on 2D plots.

  • include_2d – Specifies which attributes of the Imaging are extracted and plotted as visuals for 2D plots.

  • mat_plot_1d – Contains objects which wrap the matplotlib function calls that make 1D plots.

  • visuals_1d – Contains 1D visuals that can be overlaid on 1D plots.

  • include_1d – Specifies which attributes of the ImagingCI are extracted and plotted as visuals for 1D plots.

  • residuals_symmetric_cmap – If true, the pre_cti_residual_map is plotted with a symmetric color map such that abs(vmin) = abs(vmax).

Methods

close_subplot_figure

figures_1d

Plots the individual attributes of the plotter's ImagingCI object in 1D.

figures_1d_data_binned

Plots the charge injection data binned over the parallel and serial directions, with and without the FPR regions included.

figures_2d

Plots the individual attributes of the plotter's ImagingCI object in 2D.

fpr_mask_from

Returns a mask for the FPR of the dataset, where the prescan and overscan regions are also masked.

get_subplot_figsize

Get the size of a sub plotter in (total_y_pixels, total_x_pixels), based on the number of subplots that are going to be plotted.

get_visuals_1d

get_visuals_2d

open_subplot_figure

Setup a figure for plotting an image.

set_filename

set_format

set_mat_plot_1d_for_multi_plot

set_mat_plots_for_subplot

set_title

should_plot_zero_from

subplot

Plots the individual attributes of the plotter's ImagingCI object in 2D on a subplot.

subplot_1d

Plots the individual attributes of the plotter's ImagingCI object in 1D on a subplot.

subplot_dataset

Standard subplot of the attributes of the plotter's ImagingCI object.

subplot_of_plotters_figure

text_manual_dict_from

text_manual_dict_y_from

title_str_2d_from

title_str_from

Attributes

extract_region_from

extract_region_noise_map_from

get_1d

get_2d

is_for_subplot

figures_2d(data: bool = False, noise_map: bool = False, signal_to_noise_map: bool = False, pre_cti_data: bool = False, pre_cti_data_residual_map: bool = False, cosmic_ray_map: bool = False)[source]#

Plots the individual attributes of the plotter’s ImagingCI object in 2D.

The API is such that every plottable attribute of the Imaging object is an input parameter of type bool of the function, which if switched to True means that it is plotted.

Parameters:
  • data – Whether to make a 2D plot (via imshow) of the image data.

  • noise_map – Whether to make a 2D plot (via imshow) of the noise map.

  • signal_to_noise_map – Whether to make a 2D plot (via imshow) of the signal-to-noise map.

  • pre_cti_data – Whether to make a 2D plot (via imshow) of the pre-cti data.

  • pre_cti_data_residual_map – Whether to make a 2D plot (via imshow) of the pre-cti data residual-map.

  • cosmic_ray_map – Whether to make a 2D plot (via imshow) of the cosmic ray map.

figures_1d(region: str, data: bool = False, data_logy: bool = False, noise_map: bool = False, pre_cti_data: bool = False, signal_to_noise_map: bool = False)[source]#

Plots the individual attributes of the plotter’s ImagingCI object in 1D.

The API is such that every plottable attribute of the Imaging object is an input parameter of type bool of the function, which if switched to True means that it is plotted.

if a region string is input, the 1D plots correspond to a region in 2D on the charge injection image, which is binned up over the parallel or serial direction to produce a 1D plot. For example, for the input region=parallel_fpr, this function extracts the FPR over each charge injection region and bins such that the 1D plot shows the FPR in the parallel direction.

The API is such that every plottable attribute of the Imaging object is an input parameter of type bool of the function, which if switched to True means that it is plotted.

Parameters:
  • region – The region on the charge injection image where data is extracted and binned over the parallel or serial direction {“parallel_fpr”, “parallel_eper”, “serial_fpr”, “serial_eper”}

  • data – Whether to make a 1D plot (via plot) of the image data extracted and binned over the region, with the noise-map values included as error bars.

  • data_logy – Whether to make a 1D plot (via plot) of the image data extracted and binned over the region, with the noise-map values included as error bars and the y-axis on a log10 scale.

  • noise_map – Whether to make a 1D plot (via plot) of the noise-map extracted and binned over the region.

  • pre_cti_data – Whether to make a 1D plot (via plot) of the pre-cti data extracted and binned over the region.

  • signal_to_noise_map – Whether to make a 1D plot (via plot) of the signal-to-noise map data extracted and binned over the region.

figures_1d_data_binned(rows_fpr: bool = False, rows_no_fpr: bool = False, columns_fpr: bool = False, columns_no_fpr: bool = False)[source]#

Plots the charge injection data binned over the parallel and serial directions, with and without the FPR regions included.

Plots binned over rows show the FPR of each injection, so that the FPR can be compared between injections. When the FPR is masked it allows comparison of the parallel EPER of each injection.

Plots binned over columns shown the charge injection non-uniformity.

Inaccurate bias subtraction / stray light subtraction and other systematics can produce a gradient over a full image, which these plots often show.

Parameters:

columns_fpr – Whether to plot the data binned over columns with the FPR regions included.

subplot(data: bool = False, noise_map: bool = False, signal_to_noise_map: bool = False, pre_cti_data: bool = False, cosmic_ray_map: bool = False, auto_filename='subplot_dataset')[source]#

Plots the individual attributes of the plotter’s ImagingCI object in 2D on a subplot.

The API is such that every plottable attribute of the Imaging object is an input parameter of type bool of the function, which if switched to True means that it is included on the subplot.

Parameters:
  • data – Whether to include a 2D plot (via imshow) of the image data.

  • noise_map – Whether to include a 2D plot (via imshow) of the noise map.

  • signal_to_noise_map – Whether to include a 2D plot (via imshow) of the signal-to-noise map.

  • pre_cti_data – Whether to include a 2D plot (via imshow) of the pre-cti data.

  • cosmic_ray_map – Whether to include a 2D plot (via imshow) of the cosmic ray map.

  • auto_filename – The default filename of the output subplot if written to hard-disk.

subplot_dataset()[source]#

Standard subplot of the attributes of the plotter’s ImagingCI object.

subplot_1d(region: str)[source]#

Plots the individual attributes of the plotter’s ImagingCI object in 1D on a subplot.

These 1D plots correspond to a region in 2D on the charge injection image, which is binned up over the parallel or serial direction to produce a 1D plot. For example, for the input region=parallel_fpr, this function extracts the FPR over each charge injection region and bins such that the 1D plot shows the FPR in the parallel direction.

The function plots the image, noise map, pre-cti data and signal to noise map in 1D on the subplot.

Parameters:

region – The region on the charge injection image where data is extracted and binned over the parallel or serial direction {“parallel_fpr”, “parallel_eper”, “serial_fpr”, “serial_eper”}