Photometric model: luminosity function, radiant flux, luminous flux, luminous efficacy
Definitionluminous_efficacyThe photometric model underlying the mission, transcribed from the "Mathematical definition" section of the source.
A spectral radiant flux distribution is modelled as a finite Borel measure on the wavelength axis (wavelengths in nanometres). Using a measure rather than a density covers both cases the source discusses: an ordinary spectrum with spectral radiant flux is the measure , while an ideal monochromatic source is a point mass, which has no density.
- lm/W is the photopic maximum spectral luminous efficacy (attained at nm), and lm/W is its scotopic counterpart (at nm).
- A luminosity function with peak at is a measurable with for all and . Only these normalization properties of the CIE curve are assumed; no further shape is imposed.
- Radiant flux .
- Luminous flux , i.e. the integral of the spectral luminous efficacy against the spectral radiant flux.
- Luminous efficacy of radiation , luminous efficiency , and luminous efficacy of a source , where is the total input power consumed by the source.
- is the measure with density with respect to Lebesgue measure on the wavelength axis, used to connect the measure model with the source's integral formula.
import Mathlib open MeasureTheory namespace LuminousEfficacy /-- The photopic maximum spectral luminous efficacy `K_m = 683.002` lm/W, attained at the wavelength 555 nm. -/ noncomputable def Km : ℝ := 683.002 /-- The scotopic maximum spectral luminous efficacy `1700` lm/W, attained at the wavelength 507 nm. -/ noncomputable def KmScotopic : ℝ := 1700 /-- `IsLuminosityFunction V peak` says that `V` is a normalized luminous efficiency function (luminosity function) of the wavelength, with its maximum value `1` attained at the wavelength `peak`: `V` is measurable, takes values in `[0, 1]`, and `V peak = 1`. -/ structure IsLuminosityFunction (V : ℝ → ℝ) (peak : ℝ) : Prop where measurable : Measurable V nonneg : ∀ l, 0 ≤ V l le_one : ∀ l, V l ≤ 1 peak_eq_one : V peak = 1 /-- The radiant flux `Φ_e` of a spectral radiant flux distribution `mu`, modelled as a finite Borel measure on the wavelength axis: the total mass of `mu`. -/ noncomputable def radiantFlux (mu : Measure ℝ) : ℝ := (mu Set.univ).toReal /-- The luminous flux `Φ_v = K_max * ∫ V dmu` of the spectral radiant flux distribution `mu`, where the spectral luminous efficacy is `K(λ) = K_max * V λ`. -/ noncomputable def luminousFlux (Kmax : ℝ) (V : ℝ → ℝ) (mu : Measure ℝ) : ℝ := Kmax * ∫ l, V l ∂mu /-- The luminous efficacy of radiation `K = Φ_v / Φ_e`. -/ noncomputable def efficacyOfRadiation (Kmax : ℝ) (V : ℝ → ℝ) (mu : Measure ℝ) : ℝ := luminousFlux Kmax V mu / radiantFlux mu /-- The luminous efficiency: the luminous efficacy of radiation divided by its maximum possible value `K_max`. -/ noncomputable def luminousEfficiency (Kmax : ℝ) (V : ℝ → ℝ) (mu : Measure ℝ) : ℝ := efficacyOfRadiation Kmax V mu / Kmax /-- The luminous efficacy of a source (overall luminous efficacy): the luminous flux divided by the total input power `P` consumed by the source. -/ noncomputable def efficacyOfSource (Kmax : ℝ) (V : ℝ → ℝ) (mu : Measure ℝ) (P : ℝ) : ℝ := luminousFlux Kmax V mu / P /-- The spectral radiant flux distribution whose spectral radiant flux (density with respect to wavelength) is `Phi`. -/ noncomputable def ofDensity (Phi : ℝ → ℝ) : Measure ℝ := volume.withDensity (fun l => ENNReal.ofReal (Phi l)) end LuminousEfficacy
Read-back
What the Lean code literally says, in plain math · self-authored by the drafting agent (non-blind; see the notice in each read-back)
Provenance notice - this read-back is NOT independent testimony. It was written by the same agent that drafted the Lean statement it describes, and it was written with full knowledge of the source material and of the intended meaning of the statement. It is therefore not blind: it is self-review, not third-party corroboration, and it can repeat any misreading already baked into the formalization. It is uploaded in this form at the explicit instruction of the proposal's human owner. A reviewer should treat it as an annotation by the author, and should still obtain a genuinely independent read-back before relying on it.
This bundle introduces a model of photometric quantities on the real line, whose points are written and play the role of wavelengths. It fixes two real constants, and , with no unit attached inside the code.
It defines a predicate on a function and a real number , which holds exactly when all four of the following hold:
Nothing else is required of : it need not be continuous, unimodal, supported in any particular band, or equal to any tabulated curve, and is an arbitrary real number (though does make it a global maximizer).
For a Borel measure on it defines
the total mass of converted from an extended nonnegative real to a real number; if has infinite total mass this conversion returns .
For a real number , a function , and a measure it defines
where the integral is the Bochner integral, which by convention returns when is not -integrable;
and, for a real number ,
All three are ordinary real division, so they return when the denominator is ( the zero or infinite-mass measure, , ); no hypothesis prevents this at the level of the definitions.
Finally, for it defines the measure
namely Lebesgue measure weighted by the density (the conversion of a real to an extended nonnegative real truncates negative values to ).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.