opticam.plotting.plots
Functions
|
Plot the source catalogs. |
|
Plot the times between files. Useful for identifying gaps. |
|
Plot the time-varying background for each camera. |
|
Plot the background meshes on top of the catalog images. |
|
Plot the growth curves given a (stacked) image and a source catalog. |
|
Plot the PSF for given source. |
|
Plot the RMS as a function of the median flux for all catalog sources. |
|
Get the RMS and median flux for a series of light curves. |
|
Plot the S/N for each source. |
|
Plot the various noise contributions and compare them to the measured noise for a series of images. |
Module Contents
- opticam.plotting.plots.plot_catalogs(out_directory, stacked_images, catalogs, show, save)
Plot the source catalogs.
Parameters
- out_directorystr
The directory path to which the resulting plot will be saved.
- filtersList[str]
The catalog filters.
- stacked_imagesDict[str, NDArray]
The stacked images for each filter {filter: image}.
- showbool
Whether to show the plot.
- savebool
Whether to save the plot.
- Parameters:
out_directory (str)
stacked_images (Dict[str, numpy.typing.NDArray])
catalogs (Dict[str, astropy.table.QTable])
show (bool)
save (bool)
- Return type:
None
- opticam.plotting.plots.plot_time_between_files(out_directory, camera_files, bmjds, show, save)
Plot the times between files. Useful for identifying gaps.
Parameters
- out_directorystr
The directory path to which the resulting plot will be saved.
- camera_filesDict[str, List[str]]
The file paths separated by camera {filter: file paths}.
- bmjdsDict[str, float]
The file time stamps {file path: time stamp}.
- showbool
Whether to show the plot.
- savebool
Whether to save the plot.
- Parameters:
out_directory (str)
camera_files (Dict[str, List[str]])
bmjds (Dict[str, float])
show (bool)
save (bool)
- Return type:
None
- opticam.plotting.plots.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_filesDict[str, str]
The files for each camera {fltr: file}.
- background_medianDict[str, List]
The median background for each camera.
- background_rmsDict[str, List]
The background RMS for each camera.
- bmjdsDict[str, float]
The Barycentric MJD dates for each image {file: BMJD}.
- t_reffloat
The reference BMJD.
- out_directorystr
The directory to which the resulting files will be saved.
- show: bool
Whether to display the plot.
- savebool
Whether to save the plot.
- Parameters:
out_directory (str)
camera_files (Dict[str, List[str]])
background_median (Dict[str, Dict[str, numpy.typing.NDArray]])
background_rms (Dict[str, Dict[str, numpy.typing.NDArray]])
bmjds (Dict[str, float])
t_ref (float)
show (bool)
save (bool)
- Return type:
None
- opticam.plotting.plots.plot_background_meshes(out_directory, filters, stacked_images, background, show, save)
Plot the background meshes on top of the catalog images.
Parameters
- stacked_imagesDict[str, NDArray]
The stacked images for each camera.
- showbool
Whether to display the plot.
- Parameters:
out_directory (str)
filters (List[str])
stacked_images (Dict[str, numpy.typing.NDArray])
background (opticam.background.global_background.BaseBackground)
show (bool)
save (bool)
- Return type:
None
- opticam.plotting.plots.plot_growth_curves(image, cat, targets, psf_params)
Plot the growth curves given a (stacked) image and a source catalog.
Parameters
- imageNDArray
The image.
- catQTable
The catalog corresponding to image.
- targetsint | List[int]
The target(s) for which growth curves are to be computed.
- psf_paramsDict
The PSF parameters.
Returns
- Figure
The growth curve plots.
- Parameters:
image (numpy.typing.NDArray)
cat (astropy.table.QTable)
targets (int | List[int])
psf_params (Dict)
- Return type:
matplotlib.figure.Figure
- opticam.plotting.plots.plot_psf(catalog, source_indx, stacked_image, fltr, a, b, out_directory)
Plot the PSF for given source.
Parameters
- catalogQTable
The source catalog.
- source_indxint
The index of the source in the catalog.
- stacked_imageNDArray
The catalog image.
- fltrstr
The filter.
- afloat
The semimajor standard deviation of the PSF.
- bfloat
The semiminor standard deviation of the PSF.
- out_directorystr,
The save path.
- Parameters:
catalog (astropy.table.QTable)
source_indx (int)
stacked_image (numpy.typing.NDArray)
fltr (str)
a (float)
b (float)
out_directory (str)
- Return type:
None
- opticam.plotting.plots.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_dirstr
The light curve directory path.
- save_dirstr
The output directory path.
- phot_labelstr
The photometry label.
- showbool, optional
Whether to show the plot, by default True.
- Parameters:
lc_dir (str)
save_dir (str)
phot_label (str)
show (bool)
- Return type:
None
- opticam.plotting.plots.get_lc_rms_and_flux_dict(lc_dir)
Get the RMS and median flux for a series of light curves.
Parameters
- lc_dirstr
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.
- Parameters:
lc_dir (str)
- Return type:
Dict[str, Dict[str, Dict[str, float]]]
- opticam.plotting.plots.plot_snrs(out_directory, files, background, psf_params, catalogs, show=False)
Plot the S/N for each source.
Parameters
- out_directorystr
The output directory.
- filesDict[str, str]
The reference files for each filter {filter: path to image}.
- backgroundBaseBackground | Callable
The global background estimator.
- psf_paramsDict[str, Dict[str, float]]
The PSF parameters for each filter {filter: psf parameters}.
- catalogsDict[str, QTable]
The catalogs for each filter {filter: catalog}.
- photometerBasePhotometer
The photometer to use for measuring noise.
- showbool, optional
Whether to show the plot, by default False.
- Parameters:
out_directory (str)
files (Dict[str, str])
background (opticam.background.global_background.BaseBackground | Callable)
psf_params (Dict[str, Dict[str, float]])
catalogs (Dict[str, astropy.table.QTable])
show (bool)
- opticam.plotting.plots.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_directorystr
The output directory.
- filesDict[str, str]
The reference files for each filter {filter: path to image}.
- backgroundBaseBackground | Callable
The global background estimator.
- psf_paramsDict[str, Dict[str, float]]
The PSF parameters for each filter {filter: psf parameters}.
- catalogsDict[str, QTable]
The catalogs for each filter {filter: catalog}.
- photometerBasePhotometer
The photometer to use for measuring noise.
- showbool, optional
Whether to show the plot, by default False.
- Parameters:
out_directory (str)
files (Dict[str, str])
background (opticam.background.global_background.BaseBackground | Callable)
psf_params (Dict[str, Dict[str, float]])
catalogs (Dict[str, astropy.table.QTable])
show (bool)