quality_control.quicklook.level0
L0 quicklook plots for raw KPF detector images.
- class kpfpipe.quality_control.quicklook.level0.PlotL0(l0_obj, output_dir=None, full_res=False)
Bases:
objectQuicklook plots for KPF L0 (raw CCD) data.
Takes a KPF0 object and generates plots of the raw detector images. Pure visualization — no science computation. Amplifier counting and orientation delegate to ImageAssembly so detector-geometry knowledge has a single home.
- Parameters:
l0_obj (KPF0) – KPF0 data object.
output_dir (str or None) – Directory to save PNG files. None returns the Figure only.
full_res (bool) – Save full 1:1 pixel-resolution PNGs instead of the default downsampled figure PNGs. Full-resolution files can be tens of MB per chip.
- run(which, *, full_res=None)
Generate the requested plot(s) for every chip that has data.
Saves each to output_dir and, in that save-to-disk mode, closes the matplotlib figure so callers don’t accumulate them. When output_dir is None the figures are returned open, so they display when the caller renders them (e.g. interactively in a notebook).
- Parameters:
which (str) – ‘all’ to run every implemented plot, or the name of a single plot method (one of self._PLOT_METHODS).
full_res (bool or None) – Save native-size PNGs when true. None uses the constructor’s full_res setting.
- Returns:
Maps {method_name}_{chip} to its matplotlib.Figure (closed only when saved to output_dir); useful for tests and introspection.
- Return type:
dict
- Raises:
ValueError – If which is neither ‘all’ nor a known plot method name.
- stitched_image(chip, *, full_res=None)
Plot the stitched raw detector image for one CCD.
Replicates v2.12 plot_L0_stitched_image.
- Parameters:
chip (str) – ‘green’ or ‘red’.
full_res (bool or None) – Save a native-size, one-output-pixel-per-CCD-pixel PNG when true. None uses the constructor’s full_res setting.
- Returns:
The stitched-image figure.
- Return type:
matplotlib.Figure