tomasstolker / species

Toolkit for atmospheric characterization of directly imaged exoplanets
https://species.readthedocs.io
MIT License
22 stars 10 forks source link

Higher-order interpolation? #90

Closed gabrielastro closed 7 months ago

gabrielastro commented 7 months ago

I wanted to try out higher-order interpolation by changing interp_method in species_config.ini but get: ValueError: Method 'pchip' is not defined or ValueError: There are 3 points in dimension 2, but method cubic requires at least 4 points per dimension. or ValueError: There are 3 points in dimension 2, but method quintic requires at least 6 points per dimension. from SpeciesInit().

The first question is whether (thinking here especially of FitModel()) it really can be useful to use something other than linear. If yes, would it make sense to let the interpolation method be argument (overriding the default) in the functions? Or does the user need to re-initialise the whole species package when trying out different orders? Comparing on one plot the importance of the interpolation method (as a check) would requiring saving the data, chaning the order in the config file, re-initialising, and reading the data back in. But hopefully linear interpolation is always ok anyway so that this test does not need to be done often :wink:.

tomasstolker commented 7 months ago

Hello @gabrielastro!

At some point I implemented it because I wanted to test the accuracy with different interpolation methods, but then realized that interpolation with NDIM > 2 was not supported by the scipy function. I still need to remove that setting so best to use linear interpolation indeed.

gabrielastro commented 7 months ago

Bedankt, @tomasstolker :)!

tomasstolker commented 7 months ago

The interp_method parameter is no longer supported with commit 3f07949.