Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 2.04 KB

README.md

File metadata and controls

47 lines (31 loc) · 2.04 KB

Planck.jl

Build Status PkgEval Coverage License

Stable Dev

Blackbody radiation curves, with support for Unitful.jl.

TODO (help welcome, not expected)

  • Documentation
    • Need at least one example showing easy calculations/plotting
    • need another example showing fits/gradients
  • Unit tests
  • Gradients

Installation

Usage

Wien's law

Using Optim.jl we can numerically maximize the blackbody function to see how closely it agrees with Wien's law.

using Optim

# function to minimize
Teff = 5796
f(λ) = -blackbody(λ, Teff)

# bounded between 1 picometer and 10 m
res = Optim.optimize(f, 1e-12, 10)

λ = Optim.minimizer(res)
isapprox(λ, 2.898e-3 / Teff; rtol=1e-4)

Contributing and Support

If you would like to contribute, feel free to open a pull request. If you want to discuss something before contributing, head over to discussions and join or open a new topic. If you're having problems with something, please open an issue.