From 89a67854f5af72836498a9412f759d4337fad32d Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Sun, 14 Jun 2026 18:50:27 +0200 Subject: Migrate remaining GSoC posts Co-authored-by: Cursor --- site/content/gsoc/nondimensionalization.typ | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 site/content/gsoc/nondimensionalization.typ (limited to 'site/content/gsoc/nondimensionalization.typ') diff --git a/site/content/gsoc/nondimensionalization.typ b/site/content/gsoc/nondimensionalization.typ new file mode 100644 index 0000000..aba870a --- /dev/null +++ b/site/content/gsoc/nondimensionalization.typ @@ -0,0 +1,36 @@ +#import "/common.typ": post + +#show: post.with( + title: "Nondimensionalization", + date: datetime(year: 2020, month: 6, day: 8), +) + +Here's a simple but interesting bit of math that came up while working on an implementation of Jakob and Hanika (2019) @Jakob2019. The reflectivity model they proposed is: +$ + R(lambda) = sigma(c_0 lambda^2 + c_1 lambda + c_2) +$ +where $c_0, c_1, c_2$ are model parameters, $lambda in [360 "nm", 830 "nm"]$ and $sigma: RR -> [0, 1]$ is a sigmoid function. Reflectivities tend to be rather smooth and the values of the polynomial not too large. If wavelengths are expressed numerically in nanometers, $c_1$ and especially $c_0$ will tend to be very small. This makes it harder to find minima of the function, as solvers tend get confused, unless special care is taken to change the default tolerances properly. + +A more straightforward solution is to rescale $lambda$ to a more convenient range, a process a physicist would call *nondimensionalization*. Following the authors of the article, let +$ + lambda' = (lambda - 360 "nm") / (830 "nm" - 360 "nm") +$ +so that $lambda' in [0, 1]$ (and no longer has a physical unit) and +$ + R(lambda') = sigma(c'_0 lambda'^2 + c'_1 lambda + c'_2) +$ +This makes solvers far more likely to converge, without having to fine tune their settings. + += Recovering the units + +The interesting part is that having found the primed parameters, one can recover the unprimed ones. Start by equating $R(lambda)$ and $R(lambda')$, +$ + sigma(c_0 lambda^2 + c_1 lambda + c_2) = sigma(c'_0 lambda'^2 + c'_1 lambda + c'_2) +$ +Because $sigma$ is invertible, its inverse can be applied to both sides of the equation, resulting in an equality between the arguments. Then, replace $lambda'$ with its definition and expand the right hand side, +$ + c_0 lambda^2 + c_1 lambda + c_2 = c'_0 / (220900 "nm"^2) lambda^2 + (-36 c'_0 / (11045 "nm") + c'_1 / (470 "nm")) lambda + 1296 / 2209 c'_0 - 36 / 47 c'_1 + c'_2 +$ +Because the equation must hold for all $lambda$, equate the two quadratic polynomials' coefficients to get the final answers. + +#bibliography("/refs.bib") -- cgit