diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2020-06-15 23:08:48 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2020-06-15 23:08:48 +0200 |
commit | 0d41f4dac20cc75881a69fcbc21b00af290213bf (patch) | |
tree | 6fbaf09f51c6d0d9788e98fc0b2b306a14b41a24 /jakob_hanika.py | |
parent | 25cd4e2bfffb59a1663a0620a445081723e2627e (diff) |
Adapt Jakob and Hanika's interpolation code
Diffstat (limited to 'jakob_hanika.py')
-rw-r--r-- | jakob_hanika.py | 5 |
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. |