Published February 3, 2025 | Version 6.5
Software Open

Light Spectrum Converter

  • 1. Polytechnic University of Catalonia (UPC)

Description



Spectrum Calculator: Description and User Manual

Overview

The Spectrum Calculator is a  Python desktop application designed for spectral analysis and visualization. This tool allows users to load, analyze, and visualize spectral data with features for scientific and technical research.

Key Features

The application provides the following core functionalities:

  • Load spectral data from text or CSV files
  • Calculate and display spectral power distribution
  • Compute key optical metrics including:
    • Total Power Density
    • Illuminance
    • Color Temperature
    • Photon Flux
  • Overlay and compare multiple spectra
  • Generate blackbody radiation spectra
  • Save results and graphs
  • Interactive, dual-axis graphing

User Manual

Getting Started

  1. Launching the Application
    • Run the Python script
    • The Spectrum Calculator window will open, displaying an empty graph and control panel
  2. Loading a Spectrum
    • Click the "Load Spectrum" button
    • Select a spectrum data file (text or CSV)
    • File must contain two columns: wavelength (nm) and power density
    • Wavelengths should be in ascending order, typically ranging from 360-830 nm
  3. Interpreting the Graph
    • Blue Line: Power Density (mW/cm²/nm)
    • Red Line: Lux Contribution (lux/nm)
    • X-axis: Wavelength (nm)
    • Left Y-axis (blue): Power Density scale
    • Right Y-axis (red): Lux Contribution scale

Additional Features

Blackbody Spectrum Overlay

  1. Enter a temperature (in Kelvin) in the "Enter Temp (K)" field
  2. Click "Overlay Blackbody"
  3. A dashed line representing the blackbody spectrum will be added to the graph

Photon Flux and Total Power Density Recalculation

  1. Enter a desired photon flux value in the "Enter Photon Flux" field or in the Enter Total PD field
  2. Click "Recalculate"
  3. The spectrum will be scaled to match the new photon flux or total power density

Saving Results

  1. Save Results
    • Saves spectral data as a CSV file
    • Includes wavelength, power density, and lux contribution
  2. Save Graph and Results
    • Saves the graph as an image (PNG/JPEG)
    • Simultaneously saves the spectral data as a CSV

Clearing the Plot

  • Use the "Clear" button to reset the graph and clear all current data

Technical Details

Metrics Calculated

  • Total Power Density: Integrated power across the spectrum (mW/cm²)
  • Illuminance: Total luminous flux per unit area (lux)
  • Color Temperature: Correlated Color Temperature (CCT) in Kelvin
  • Photon Flux: Total photons per square meter per second

Calculation Methods

  • Photopic Luminosity Function from 360-830 nm
  • CIE 1931 Color Matching Functions
  • McCamy's formula for Color Temperature
  • Planck's Law for Blackbody Radiation

Recommended Use

  • Spectral analysis in photonics
  • Lighting research
  • Optical engineering
  • Color science studies

Limitations

  • Assumes photopic (daytime) vision response
  • Accuracy depends on input spectral data quality
  • Limited to visible and near-visible spectrum

 

Release note

  • version 6.4: automatic sorting of the wavelength to avoid an error message when the data aren't organised by ascending order.

Note: This description was written by an AI.

Files

Files (71.5 MB)

Name Size Download all
md5:1f895423acc16c73a0adc7a909b7cf80
71.5 MB Download

Additional details

Dates

Created
2024-11-27
First public version

Software

Programming language
Python