Optical Spectra Database
Click the Optical Database icon in ?? to open the optical database, which stores optical spectra such as laser profiles, measured solar spectra, and other experimental datasets. The database view is shown in ??.


Double-clicking a spectrum opens it in the Optical Spectrum Editor (??), where you can view existing data or import new spectra. The Basic tab (??) provides fields for notes, metadata, and privacy options.
To import data, click From File in the editor to open the import window (??). Load your raw file with Open data file (shown in the left panel), then choose the correct units for each column (e.g., nanometers for wavelength). The tool automatically converts the data into SI units (right panel). Clicking Import data adds the converted spectrum to the Optical Spectrum Editor.


Spectra are saved in your local database folder
(??) under oghma_local/spectra/<entry>/
.
Each entry contains a data.json
file, a spectra.csv
file with numerical data, and optionally a spectra.bib
reference file.
Opening spectra.csv
(??) shows a header followed by wavelength (m) and spectral irradiance (W m−3).
All spectra are stored in SI units. By definition, the integral of each spectrum gives the total power density (W m−2),
and this must be correct because the simulator does not renormalize imported data.
If in doubt, write a small script to integrate the spectrum and confirm the power density. For a standard solar spectrum (AM1.5G), this should be
approximately 1000 W m−2.
Windows: quickly open your local spectra folder
- Press Win+R, type
%USERPROFILE%\oghma_local\spectra
, and press Enter. - Each spectrum is stored in its own subfolder (e.g.,
...\spectra\example\
).


oghma_local/spectra
. Each entry contains JSON metadata, a CSV with spectral data, and optionally a bibliography file.

spectra.csv
. Columns list wavelength in meters and spectral irradiance in W m−3, always in SI units.
Solar Spectrum Generator
The Solar Spectrum Generator (??) can be launched from the Optical Spectrum Editor. It compares the AM1.5G reference spectrum with calculated Iglobal, Idirect, and Idiffuse components, and allows spectra to be generated for different times of day, geographic locations, and atmospheric conditions (pressure, water vapour, and aerosol loading).
The generator is based on the Simple Solar Spectral Model for Direct and Diffuse Irradiance on Horizontal and Tilted Planes at the Earth's Surface for Cloudless Atmospheres by Bird and Riordan (1986), published in the Journal of Applied Meteorology and Climatology. You can view the original paper here. This semi-empirical model computes solar spectral irradiance at the Earth’s surface by accounting for key atmospheric processes such as Rayleigh scattering, ozone absorption, uniformly mixed gases, water vapour absorption, and aerosol extinction. With inputs including location, time of day, altitude, and atmospheric parameters, the model partitions the solar spectrum into global, direct, and diffuse components. The AM1.5G reference is provided as a benchmark, enabling users to generate site- and condition-specific spectra that reflect both geometric factors (solar zenith angle, air mass) and atmospheric properties (pressure, water vapour, and aerosol optical depth).
