comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Sliding scale interpolation
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Sliding scale interpolation [message #20281] Tue, 06 June 2000 00:00 Go to next message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Hi there,

I want to do (what I call) "sliding scale" linear interpolation and am
trolling for hints on how to do it.

I have some data (complex refractive index of water) which is mostly
smooth but punctuated with some higher resolution absorption features.
What I would like to do would be to linearly interpolate the data with a
relatively large x-spacing in the smooth, low resolution regions but
increase the data spacing in the high resolution regions. The second
derivative of the function provides definitions for those regions (e.g.
for smooth regions d2y/dx2 ~ 0).

I was wondering if anyone has already done or seen info on something
like this? I would like to somehow dampen the ability of the
interpolation spacing change so that it doesn't change *only* in
response to the second derivative (which is rather noisy in places).

Any hints, comments, suggestions appreciated.

paulv
--
Paul van Delst Ph: (301) 763-8000 x7274
CIMSS @ NOAA/NCEP Fax: (301) 763-8545
Rm.202, 5200 Auth Rd. Email: pvandelst@ncep.noaa.gov
Camp Springs MD 20746
Re: Sliding scale interpolation [message #20357 is a reply to message #20281] Thu, 08 June 2000 00:00 Go to previous message
Randall Smith is currently offline  Randall Smith
Messages: 4
Registered: November 1998
Junior Member
Paul van Delst <pvandelst@ncep.noaa.gov> writes:

> Hi there,
>
> I want to do (what I call) "sliding scale" linear interpolation and am
> trolling for hints on how to do it.
>
> I have some data (complex refractive index of water) which is mostly
> smooth but punctuated with some higher resolution absorption features.
> What I would like to do would be to linearly interpolate the data with a
> relatively large x-spacing in the smooth, low resolution regions but
> increase the data spacing in the high resolution regions. The second
> derivative of the function provides definitions for those regions (e.g.
> for smooth regions d2y/dx2 ~ 0).
>
> I was wondering if anyone has already done or seen info on something
> like this? I would like to somehow dampen the ability of the
> interpolation spacing change so that it doesn't change *only* in
> response to the second derivative (which is rather noisy in places).
>
> Any hints, comments, suggestions appreciated.
>

You may want to check out:

D.G. Wilson, 1976, ACM Transactions on Mathematical Software,2,388
http://www.mirror.ac.uk/sites/netlib.bell-labs.com/netlib/to ms/510.gz

Basically, this code takes two vectors, x and y, and a tolerance
epsilon, and returns arrays xprime and yprime. The guarantee is that
if you then interpolate y based on xprime, yprime, and x the error
will be no larger than epsilon.

I use it here to handle spectra which have a few lines and some
continuum emission. It can dramatically reduce the amount of memory
required to handle everything.

The code is written in FORTRAN, but I believe somebody around here has
converted it to IDL--could be dug up if desired.

Randall Smith
rsmith@cfa.harvard.edu
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: contour plot with extra values
Next Topic: I Hope I'm Missing It

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 09:05:55 PDT 2025

Total time taken to generate the page: 1.52376 seconds