diff options
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. |