Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce a consistent interpolation method #274

Open
wtbarnes opened this issue Mar 18, 2024 · 2 comments
Open

Enforce a consistent interpolation method #274

wtbarnes opened this issue Mar 18, 2024 · 2 comments
Labels
discussion Issues that require some extended deliberation

Comments

@wtbarnes
Copy link
Owner

wtbarnes commented Mar 18, 2024

Data often need to be interpolated to a particular grid, usually in temperature space. Initially, I used interp1d for everything, but that function is now considered "legacy" and thus should be avoided.

Additionally, for reasons explained more fully in #223, I've used a PCHIP interpolation method in log-log space for particular pieces of data.

Now, in #260, CubicSpline is being used.

We need to come up with a policy for which interpolation method we use by default and stick to a single method unless there is a compelling reason to deviate from that method. Once a decision is made, this should probably be put in the docs somewhere.

A rough plan of work for addressing this:

  1. Decide whether CubicSpline or PCHIPInterpolator is a more appropriate general solution
  2. Replace all interp1d calls with the decision from 1
  3. Document this decision somewhere, maybe a dev guide?
@wtbarnes wtbarnes added the discussion Issues that require some extended deliberation label Mar 18, 2024
@jwreep
Copy link
Contributor

jwreep commented Mar 19, 2024

I used CubicSpline in #260 simply because it closely matches the IDL code. Happy to switch if another is preferred.

@wtbarnes
Copy link
Owner Author

Actually, I think your approach is the right one. We should replace interp1d with CubicSpline everywhere and use PCHIPInterpolator where necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Issues that require some extended deliberation
Projects
None yet
Development

No branches or pull requests

2 participants