Skip to content

winterchaufr/spectralskyviewer

 
 

Repository files navigation

SpectralSkyViewer

img1 img2 img3 img4 img5

A tool for viewing sky photos with correlated spectral radiance measurements side-by-side. Additionally, it can be used to export and convert datasets of sky samples for machine learning.

A prior viewer is clearskydataviewer, written by Dan Knowlton for the Program Of Computer Graphics at Cornell. Parts of his sky coordinate to UV angle calculations are retained in utility_angles.py.

Prerequisites

This software was developed in Python on a Windows 10 box and is intended to be cross-platform.
Python modules required (version used at time of development):

Python    (3.5.2)  
PyQt5     (5.11.2)  
pandas    (0.21.0)  
numpy     (1.14.2)   
Pillow    (5.2.0)   
pyqtgraph (0.10.0)  # used to plot spectral radiance data
colormath (3.0.0)   # used only for color model conversions  
networkx  (2.2.0)   # used only for color model conversions  
decorator (4.3.0)   # used only for color model conversions

Instructions

Install Python and modules above.
Run the application.
Select a data directory (which must have data organized in a very specific way).

Use the dropdowns and sliders to select desired capture datetime and exposure.
Click and drag to select sampling pattern coordinates.
View corresponding spectral radiance measurements.
Right-click (mouse-secondary) on canvas for more selection and HUD options.

To export or convert sample datasets, first run Setup Export File to specify parameters and output file. Exports will then be appended to the same file. Converter will use the same options.

To make your own data directory, follow the format of the example public data linked below.

Controls

control usage
mouse-wheel moves the capture time slider
mouse-primary-drag selects sampling pattern coordinates
mouse-secondary context menu
mouse-wheel-click-hold rotates sky photo
ctrl+selection adds to currently selected samples
shift+selection removes from currently selected samples
ctrl+A selects all samples
ctrl+I selects inverse

Notes

Your Data Directory must be organized in a very specific way for the photos and radiance values to be correlated.
Correlated sky photos and spectral radiance measurements organized and ready to use.

Context menu -> Graph Resolution can be used to optimize plotting of radiance curves. (1 = every wavelength, 2 = every other wavelength, etc.) Adjusting this can significantly improve application performance.

Pixel Region and Pixel Weighting refers to pixel kernel used during convolution of final pixel color viewed and exported. The color can be seen in the bottom-right of the canvas.

res/settings.json - Settings file generated on execution and contains default and saved settings as you use the application, which can be edited by hand. There is a menu option in Help which can be toggled to prevent overwriting of settings.

res/dsetfix.py - Script for searching/operating on exported sample datasets.
res/ddirfix.py - Script for cleaning/organizing a data directory with corresponding sky photos and radiance measurements.

About

Public Release of the Spectral Sky data viewer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 52.3%
  • C 47.7%