Questions tagged [interpolation]

Anything related to function interpolation, i.e. the mathematical techniques for estimating the (unknown) value of a function in a point on the basis of a set of known values in other (usually nearby) points. For interpolation of strings, see the [string-interpolation] tag.

Anything related to function interpolation, i.e. the mathematical techniques for estimating the (unknown) value of a function in a point on the basis of a set of known values in other (usually nearby) points.

See Wikipedia on interpolation.

In scientific software for statistical computing and graphics, function approx implements linear interpolation and function spline implements cubic spline interpolation.

For interpolation of strings, see .

5155 questions
2
votes
2 answers

Java 2D Array Bicubic Interpolation

I have recently been playing around with Bicubic Interpolation, as I am wanting to generate the earth, based on real heightmaps inside Minecraft. The reason I am using the interpolation, is because I would like to make the world have more detail.…
user3853021
2
votes
1 answer

scipy interpolation is not smoothing my data

I'm trying to use interpolation in scipy. Here is my code: from Constants import LOWER_LAT, LOWER_LONG, UPPER_LAT, UPPER_LONG, GRID_RESOLUTION from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt from matplotlib import cm from…
lenhhoxung
  • 2,530
  • 2
  • 30
  • 61
2
votes
1 answer

Step Based signal to smooth one - How can I interpolate?

I'm programming a sort of audio plugin, and I get an array of values that represent a step-based signal such as this: that have these values: [ 0.27, 0.43, 0.48, 0.51, 0.85, 0.15, 0.48, 0.01, 0.28, 0.84, 0.15, 0.22, 0.11, 0.86, 0.66, 0.92, 0.40,…
markzzz
  • 47,390
  • 120
  • 299
  • 507
2
votes
1 answer

Find ideal sampling points for data sets with arbitrary sampling points

I have measurement data that has pretty arbitrary sampling points. For instance the sampling points of 3 curves might be [0.1, 0.15, 0.17, 0.18, 0.185, 20, 1000, 15000] [0.09, 0.151, 0.169, 0.18, 21, 14000] [0.11, 0.2, 13999, 14001] (the…
stebu92
  • 313
  • 1
  • 2
  • 12
2
votes
1 answer

Python Scipy, interpolation array to image

I have problem with my basic script which load image, then convert it to array, zooming by interpolation and should save zoomed image to file but this last line don't work. I have no idea how to fix it, i know that problem it is with zoomed array. I…
Rarez
  • 129
  • 2
  • 11
2
votes
1 answer

Iterated Interpolation: First interpolate grids, then interpolate value

I want to interpolate from x onto z. But there's a caveat: Depending on a state y, I have a different xGrid - which i need to interpolate. I have a grid for y, yGrid. Say yGrid=[0,1]. And xGrid is given by 1 10 2 20 3 30 The…
FooBar
  • 15,724
  • 19
  • 82
  • 171
2
votes
1 answer

Python: Rescale time-series in pandas by non-integer scale-factor

I have no idea if this is feasible in Pandas. I thought df.resample may do the work but no. Here's my objective: I have a time-series in a DataFrame, df that looks like this: return 12:30:00 -0.000202 12:30:01 -0.000257 12:30:02…
Plug4
  • 3,838
  • 9
  • 51
  • 79
2
votes
1 answer

Shopify Liquid How do I use for-loop index variables in an assign or capture tag?

I am just getting into some liquid template coding on a Shopify site. How do I use the for-loop index/variable when defining variable names in assign or capture tags? ie: I'm trying to condense the code to create multiple link menus from…
dan chow
  • 59
  • 2
  • 8
2
votes
0 answers

Fitting unorganized data to a sphere using scipy.interpolate.SmoothSphereBivariateSpline

I have 974 data points located on the surface of the unit sphere. The points are not ordered in any particular way. I wish to read in these data points, along with their corresponding polar coordinates (phi, theta). I then wish to interpolate onto a…
O Smith
  • 375
  • 1
  • 3
  • 11
2
votes
0 answers

Rebinning numpy array by non-integer factor

I have a grid of model spectra, which have a constant, very high spectral resolution, and I need to down-sample them to a lower resolution, while preserving the total number of counts. In essence, if the first 5 bins have (nominal center-of-bin)…
DathosPachy
  • 742
  • 1
  • 6
  • 17
2
votes
2 answers

Interpolation in R: retrieving hourly values

I recognize there are several related questions, but I seem to be stumbling somewhere here. I followed this thread as best I could: Interpolating timeseries, but get error messages (see below) : My dataset contains samples collected every four…
2
votes
1 answer

How to find closest point to grid values

I'm trying to interpolate the value of a function at a single point from it's nearest neighbors. I have f specified on a meshgrid, [x_grid,y_grid,z_grid] = np.meshgrid(x_range,y_range,z_range), for which I'd like to find an approximate value of a…
anon01
  • 10,618
  • 8
  • 35
  • 58
2
votes
2 answers

Linear interpolation on a numpy array

I have the following numpy array: # A B C Y my_arr = np.array([ [.20, .54, .26], # <0 [.22, .54, .24], # 1 [.19, .56, .25], # 2 [.19, .58,…
dassouki
  • 6,286
  • 7
  • 51
  • 81
2
votes
1 answer

Interpolating 3D points from input points corresponding to a closed surface

I have a list of scattered 3D points similar to the one below: Using MATLAB, I want to interpolate further points from the surface that those original points correspond to, in order to obtain a more complete scatter. Note that there are no…
Filipe Aleixo
  • 3,924
  • 3
  • 41
  • 74
2
votes
1 answer

Interpolation with default if key not exists

I found a short snippet for string-interpolation on GitHub and shortened it to this: var interpolate = function (tmpl, data) { return new Function('data', 'with(data){return \'' + tmpl.replace(/{{\s*(.+?)\s*}}/g, '\'+($1)+\'') +…
Martin
  • 1,283
  • 2
  • 14
  • 28