Magnitude difference from brightness ratio.
double difference(double ratio) => 2.5 * math.log(ratio) / math.ln10;