opticam.plotting.plots ====================== .. py:module:: opticam.plotting.plots Functions --------- .. autoapisummary:: opticam.plotting.plots.plot_catalogs opticam.plotting.plots.plot_time_between_files opticam.plotting.plots.plot_backgrounds opticam.plotting.plots.plot_background_meshes opticam.plotting.plots.plot_growth_curves opticam.plotting.plots.plot_psf opticam.plotting.plots.plot_rms_vs_median_flux opticam.plotting.plots.get_lc_rms_and_flux_dict opticam.plotting.plots.plot_snrs opticam.plotting.plots.plot_noise Module Contents --------------- .. py:function:: plot_catalogs(out_directory, stacked_images, catalogs, show, save) Plot the source catalogs. Parameters ---------- out_directory : str The directory path to which the resulting plot will be saved. filters : List[str] The catalog filters. stacked_images : Dict[str, NDArray] The stacked images for each filter {filter: image}. show : bool Whether to show the plot. save : bool Whether to save the plot. .. py:function:: plot_time_between_files(out_directory, camera_files, bmjds, show, save) Plot the times between files. Useful for identifying gaps. Parameters ---------- out_directory : str The directory path to which the resulting plot will be saved. camera_files : Dict[str, List[str]] The file paths separated by camera {filter: file paths}. bmjds : Dict[str, float] The file time stamps {file path: time stamp}. show : bool Whether to show the plot. save : bool Whether to save the plot. .. py:function:: plot_backgrounds(out_directory, camera_files, background_median, background_rms, bmjds, t_ref, show, save) Plot the time-varying background for each camera. Parameters ---------- camera_files : Dict[str, str] The files for each camera {fltr: file}. background_median : Dict[str, List] The median background for each camera. background_rms : Dict[str, List] The background RMS for each camera. bmjds : Dict[str, float] The Barycentric MJD dates for each image {file: BMJD}. t_ref : float The reference BMJD. out_directory : str The directory to which the resulting files will be saved. show: bool Whether to display the plot. save : bool Whether to save the plot. .. py:function:: plot_background_meshes(out_directory, filters, stacked_images, background, show, save) Plot the background meshes on top of the catalog images. Parameters ---------- stacked_images : Dict[str, NDArray] The stacked images for each camera. show : bool Whether to display the plot. .. py:function:: plot_growth_curves(image, cat, targets, psf_params) Plot the growth curves given a (stacked) image and a source catalog. Parameters ---------- image : NDArray The image. cat : QTable The catalog corresponding to `image`. targets : int | List[int] The target(s) for which growth curves are to be computed. psf_params : Dict The PSF parameters. Returns ------- Figure The growth curve plots. .. py:function:: plot_psf(catalog, source_indx, stacked_image, fltr, a, b, out_directory) Plot the PSF for given source. Parameters ---------- catalog : QTable The source catalog. source_indx : int The index of the source in the catalog. stacked_image : NDArray The catalog image. fltr : str The filter. a : float The semimajor standard deviation of the PSF. b : float The semiminor standard deviation of the PSF. out_directory : str, The save path. .. py:function:: plot_rms_vs_median_flux(lc_dir, save_dir, phot_label, show = True) Plot the RMS as a function of the median flux for all catalog sources. Parameters ---------- lc_dir : str The light curve directory path. save_dir : str The output directory path. phot_label : str The photometry label. show : bool, optional Whether to show the plot, by default True. .. py:function:: get_lc_rms_and_flux_dict(lc_dir) Get the RMS and median flux for a series of light curves. Parameters ---------- lc_dir : str The directory path to the light curves. Returns ------- Dict[str, Dict[str, Dict[str, float]]] The median and RMS flux values for each light curve grouped by filter. .. py:function:: plot_snrs(out_directory, files, background, psf_params, catalogs, show = False) Plot the S/N for each source. Parameters ---------- out_directory : str The output directory. files : Dict[str, str] The reference files for each filter {filter: path to image}. background : BaseBackground | Callable The global background estimator. psf_params : Dict[str, Dict[str, float]] The PSF parameters for each filter {filter: psf parameters}. catalogs : Dict[str, QTable] The catalogs for each filter {filter: catalog}. photometer : BasePhotometer The photometer to use for measuring noise. show : bool, optional Whether to show the plot, by default `False`. .. py:function:: plot_noise(out_directory, files, background, psf_params, catalogs, show = False) Plot the various noise contributions and compare them to the measured noise for a series of images. Parameters ---------- out_directory : str The output directory. files : Dict[str, str] The reference files for each filter {filter: path to image}. background : BaseBackground | Callable The global background estimator. psf_params : Dict[str, Dict[str, float]] The PSF parameters for each filter {filter: psf parameters}. catalogs : Dict[str, QTable] The catalogs for each filter {filter: catalog}. photometer : BasePhotometer The photometer to use for measuring noise. show : bool, optional Whether to show the plot, by default `False`.