Coder Social home page Coder Social logo

photometry-converter's Introduction

photometry-converter

Converts between photometric and radiometric units. Supports luminous intensity (in candela), lumious flux (in lumen) and radiant flux/optical power (in milliwatt). Takes into account the spectral emission and beam profile of a light source. See labsphere technical guide for details about the theory.

Installation

$ git clone https://github.com/andibarg/photometry-converter.git
$ cd photometry-converter

Usage

The following example code converts from milliwatt to lumen to candela. The spectrum is a gaussian peak around 457 nm with a bandwith of 27 nm. The beam profile is according to Lambert's cosing law.

import photometry_converter as pc

mW = 827
specdata = pc.gauss_emission(cwvl=457,sbw=27)
beamdata = pc.lambert()

lm = pc.mW2lm(mW, specdata)
cd = pc.lm2cd(lm, beamdata)

Alternatively, you can create a class instance. In the following example the beam profile is specified via the apexangle:

import photometry_converter as pc

led = pc.source(name = 'Blue LED',
                mW = 827,
                specdata = pc.gauss_emission(cwvl=457,sbw=27),
                apexangle = 120)
led.mW2lm()
led.lm2cd()

led.lm
led.cd

The example conversion above may be complemented by the following figures, which show the emission spectrum and the beam profile of the light source: Screenshot

photometry-converter's People

Contributors

andibarg avatar abarg3shape avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.