summaryrefslogtreecommitdiff
path: root/jakob_hanika.py
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2020-06-15 23:08:48 +0200
committerPaweł Redman <pawel.redman@gmail.com>2020-06-15 23:08:48 +0200
commit0d41f4dac20cc75881a69fcbc21b00af290213bf (patch)
tree6fbaf09f51c6d0d9788e98fc0b2b306a14b41a24 /jakob_hanika.py
parent25cd4e2bfffb59a1663a0620a445081723e2627e (diff)
Adapt Jakob and Hanika's interpolation code
Diffstat (limited to 'jakob_hanika.py')
-rw-r--r--jakob_hanika.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/jakob_hanika.py b/jakob_hanika.py
index af55c94..22b87fc 100644
--- a/jakob_hanika.py
+++ b/jakob_hanika.py
@@ -15,10 +15,11 @@ def model(wvlp, ccp):
return 1 / 2 + yy / (2 * np.sqrt(1 + yy ** 2))
# Create a SpectralDistribution using given coefficients
-def model_sd(ccp):
+def model_sd(ccp, primed=True):
# FIXME: don't hardcode the wavelength grid; there should be a way
# of creating a SpectralDistribution from the function alone
- return SpectralDistribution(model(wvlp, ccp), wvl, name="Model")
+ grid = wvlp if primed else wvl
+ return SpectralDistribution(model(grid, ccp), wvl, name="Model")
# The goal is to minimize the color difference between a given distrbution
# and the one computed from the model above.