GUIBRUSHR.GUI.Input_Output_Panels.Input_Panels.TabPanels.FrameGenerationHRData.plot module

Module for generating aligned matrix PDF plots for high-resolution spectroscopic data.

This module provides functionality to create multi-page PDF reports showing synthetic aligned matrices for different spectral orders.

GUIBRUSHR.GUI.Input_Output_Panels.Input_Panels.TabPanels.FrameGenerationHRData.plot.generate_aligned_matrix_pdf(synthetic_plus_error_model: ndarray, wavelength_matrix: ndarray | None, output_path: str | Path, target_name: str = 'Target', invert_x: bool = False, original_aligned_data: ndarray | None = None) None[source]

Generate a multi-page PDF with aligned matrix plots, one page per spectral order.

Each page contains two subplots: - Upper subplot: Aligned matrix visualization for the current order showing flux variations across wavelength points and image numbers - Lower subplot: Original aligned data visualization (if provided), otherwise blank

The function creates a comprehensive visualization of synthetic spectroscopic data with error models, useful for quality assessment and data analysis.

Parameters:
  • synthetic_plus_error_model (np.ndarray) – 3D numpy array of shape (wavelength_points, orders, images) containing synthetic flux data with error model applied

  • wavelength_matrix (np.ndarray or None) – 3D numpy array of shape (wavelength_points, orders, images) containing wavelength calibration values. If None, wavelength information won’t be displayed on plots

  • output_path (str or Path) – File path where the PDF report will be saved. Should include .pdf extension

  • target_name (str, optional) – Name of the astronomical target for plot titles and headers, by default “Target”

  • invert_x (bool, optional) – If True, the wavelength axis will be inverted (from right to left) in the plots, by default False.

  • original_aligned_data (np.ndarray or None, optional) – 3D numpy array of shape (wavelength_points, orders, images) containing original aligned data. If provided, will be plotted in the lower subplot.

Returns:

The function saves the PDF file to the specified path

Return type:

None

Raises:
  • ValueError – If synthetic_plus_error_model is not a 3D array

  • IOError – If the output path cannot be written to