Planck.jl

Code Build Status PkgEval Coverage License

Planck radiation curves, with support for Unitful.jl.

Installation

Usage

API/Reference

Planck.blackbodyMethod
blackbody([OT], x, T)

Evaluate a blackbody[1] at x, which is in meters by default. If OT is given, the output will be converted to that type, which is convenient for unit conversions. Temperature is assumed to be Kelvin.

Units

If you do not use Unitful.jl, the defaults will be SI

Examples

julia> using Unitful

julia> blackbody(6e-7, 5850)
2.583616647617973e13
    
julia> blackbody(Float32, 6e-7, 5850)
2.5836166f13

julia> blackbody(u"erg/s/cm^2/nm/sr", 600u"nm", 5850u"K")
2.5836166476179734e7 erg nm⁻¹ cm⁻² s⁻¹ sr⁻¹

References

source

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.