Comments (4)
To state my own opinion, I think what makes the most sense is to exclude the end point from input (that is, to expect that the user does), and to reflect around the edges of input data. In other words, I propose that we expect the red point is not included in the input to correctly interpolate a sine wave from that data, and that we take the magenta approach for reflection.
from interpolations.jl.
I agree with that perspective on BCperiodic. As discussed in timholy/Grid.jl#31, I personally find the orange behavior most intuitive/useful for BCreflect
, because otherwise sampling a vector of length n
at 1:2n
will not yield [x, x[end:-1:1]]
. But I'm fine with a diversity of options being available.
from interpolations.jl.
I guess reflection behavior should also reflect the interpolations we're doing. It's possible to do linear interpolation with data given on half-nodes rather than on nodes (i.e. one line segment has its center on a given data point), in which case reflection on half-nodes give nicer results.
In this image I've cheated, and just evaluated the function in different places for plotting purposes, but it's possible to construct the same linear interpolation from these points as the one up top. With this linear interpolation, there is no "no mans land" between the two end nodes, and sampling at 1:2n
will still yield [x, x[end:-1:1]]
.
However, that's much more complicated than what we're currently doing (although I guess it could probably be expressed in terms of non-interpolating splines) so maybe not what we want to aim for...
from interpolations.jl.
This is thoroughly handled in #9, and as soon as that is working well I'll also merge #12 which documents the mathematics, so I'll close this for housekeeping.
tl;dr: All of the use cases above are supported by appropriate choice of OnCell
/OnGrid
.
from interpolations.jl.
Related Issues (20)
- Documentation: what exactly is meant by "irregular grid"? HOT 1
- NaturalNeighbours.jl HOT 1
- `BoundsError` with Julia 1.10.0-beta1 HOT 2
- Interpolating 2D non-uniform Data HOT 1
- Interpolate a set of points HOT 1
- issue to remove
- Free(OnGrid()) boundary conditions produce surprising results HOT 4
- Documentation on GPU support HOT 6
- Interpolation bug when calling without extrapolate HOT 2
- CITATION.cff not generating options
- RFC: possible rework of element type and inferrability HOT 2
- Running examples in docs fails HOT 4
- Setup jldoctest
- Stable docs is pointing to 0.14.7 HOT 1
- Use abbreviated show methods HOT 1
- If raster contains a single NaN Linear() works but Cubic() returns all NaNs HOT 2
- Cubic spline interpolation for Vector Type x
- Is there a way to interpolate a 2d grid with missing values. HOT 1
- Scaled `Lanczos` interpolator throws `MethodError` regarding the `lbound()` function HOT 1
- MethodError: no method matching Interpolations.Cubic() HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from interpolations.jl.