plots.py#
Make plots of spectral response data.
- plots.main(args=None, **kw)[source]#
Make pdf of figures for a spectral response.
Load data
Plot monochromator spectral irradiance data
Plot camera spectral response
Plot camera spectral image stack measurements vs estimated values from the spectral response
Save the figures to a pdf
If called without parameters, parses arguments from the command line. Arguments may be passed as a list of strings or as keyword arguments. E.g.:
main(['-r','response.h5','--quiet']) # or main(response='response.h5',quiet=True)
- Parameters:
response (
'-r'
,'--response'
, Path) – path to spectral response filemonochromator (
'-m'
,'--monochromator'
, Path) – path to monochromator irradiance fileoutput (
'-o'
,'--output'
, Path) – path to pdf plots filestyle ('--style', matplotlib style name) – Matplotlib style name or path to style file. default
ggplot
logy ('--logy', bool) – Use log-y scale
dpi ('--dpi') – Figure dpi
figsize ('--figsize', [width, height]) – Set figure (page) size in inches. Default [8.3,5.8] is A5 landscape
margins ('--margins', [left, right, top, bottom]) – Set page margins, in inches. Default [0.5, 0.5, 1.0, 0.75]
title_pos ('--title-pos', float) – Title position from the top of the page, in inches. Ignores margins. Default 0.75
quiet ('--quiet') – Suppress progress messages
- plots.srgb_spectrum(wl, fit=[(0.366, 435.0, 39.3), (1.0, 610.0, 86.0), (0.913, 539, 90.3), (1.0, 453, 71.2)])[source]#
Estimate sRGB for each wavelength, based on gaussian approximation.
- plots.plot_irradiances(wl, irrad, irrad_std=0, likelihood=0.95, logy=False, ax=None)[source]#
Plot monochromator irradiances.