Subtracting arrays of same dimension, different size - interpolating one to fit the other [message #73211] |
Mon, 01 November 2010 09:10  |
polystethylene
Messages: 28 Registered: February 2009
|
Junior Member |
|
|
Hi All,
I have some data and a model, both 2 column - one column phase, the
second column a ratio...
They both have different sizes, and the model's phase points don't
match up with those of the data...
I'd like to plot the residual i.e. data - model, but obviously that's
not immediately accessible without interpolating the model so that
every data phase point has a corresponding model value...
Anyone got any ideas how I can do this?
Please no-one say histogram :-/ *crosses fingers*
Cheers,
Stef
|
|
|
|
|
Re: Subtracting arrays of same dimension, different size - interpolating one to fit the other [message #73352 is a reply to message #73211] |
Mon, 01 November 2010 13:41  |
polystethylene
Messages: 28 Registered: February 2009
|
Junior Member |
|
|
On Nov 1, 5:17 pm, Paul van Delst <paul.vande...@noaa.gov> wrote:
> recalculate the model data to match the measured data. Then direct compare.
>
> If you don't have access to the model software itself, then try to get your hands on it. Otherwise you're going to have
> to interpolate. I always interpolate model data (initially at least) since it is typically better behaved (e.g.
> smoother/less noisy) than measured data and thus less likely to suffer from egregious interpolation artifacts.
>
> Now, which interpolation method you employ (linear, polynomial, spline, fourier(!) etc) is a decision *you* need to make
> based on the data.
>
> cheers,
>
> paulv
>
> polystethylene wrote:
>> Hi All,
>
>> I have some data and a model, both 2 column - one column phase, the
>> second column a ratio...
>
>> They both have different sizes, and the model's phase points don't
>> match up with those of the data...
>
>> I'd like to plot the residual i.e. data - model, but obviously that's
>> not immediately accessible without interpolating the model so that
>> every data phase point has a corresponding model value...
>
>> Anyone got any ideas how I can do this?
>
>> Please no-one say histogram :-/ *crosses fingers*
>
>> Cheers,
>
>> Stef
>
>
I need to interpolate it unfortunately - I just don't understand how I
do it using the various interpolation functions...
Essentially, I one set of phases for the measured data that are
irregularly gridded, and the model points which are regularly
gridded...
How do I get IDL to evaluate the model value through interpolation at
the irregularly (measured) grid points?
I can't see how to do it using the Interpolate function; can it be
done with the provided IDL functions?
|
|
|
Re: Subtracting arrays of same dimension, different size - interpolating one to fit the other [message #73358 is a reply to message #73211] |
Mon, 01 November 2010 10:17  |
Paul Van Delst[1]
Messages: 1157 Registered: April 2002
|
Senior Member |
|
|
recalculate the model data to match the measured data. Then direct compare.
If you don't have access to the model software itself, then try to get your hands on it. Otherwise you're going to have
to interpolate. I always interpolate model data (initially at least) since it is typically better behaved (e.g.
smoother/less noisy) than measured data and thus less likely to suffer from egregious interpolation artifacts.
Now, which interpolation method you employ (linear, polynomial, spline, fourier(!) etc) is a decision *you* need to make
based on the data.
cheers,
paulv
polystethylene wrote:
> Hi All,
>
> I have some data and a model, both 2 column - one column phase, the
> second column a ratio...
>
> They both have different sizes, and the model's phase points don't
> match up with those of the data...
>
> I'd like to plot the residual i.e. data - model, but obviously that's
> not immediately accessible without interpolating the model so that
> every data phase point has a corresponding model value...
>
> Anyone got any ideas how I can do this?
>
> Please no-one say histogram :-/ *crosses fingers*
>
> Cheers,
>
> Stef
|
|
|