public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Patrick Alken <patrick.alken@Colorado.EDU>
To: "Jean-François Caron" <jfcaron@phas.ubc.ca>
Cc: "gsl-discuss@sourceware.org" <gsl-discuss@sourceware.org>
Subject: Re: Compiling & Testing New Interpolation Type
Date: Thu, 20 Mar 2014 17:52:00 -0000	[thread overview]
Message-ID: <532B2ACF.1060608@colorado.edu> (raw)
In-Reply-To: <AE615778-0196-446E-84C9-C2DB09934F01@phas.ubc.ca>

Hi, I'm moving this discussion over to gsl-discuss which is more suited 
for development issues.

I have 2 naive questions which you may be able to answer since you've 
been working on this code.

1) If the Steffen algorithm is applied to non-monotonic data, will it 
still provide a solution or does the method encounter an error?

2) Earlier on the GSL list it was mentioned that there are 3 different 
methods for interpolating monotonic data:

(a) M.Steffen, "A simple method for monotonic interpolation in one 
dimension", Astron. Astrophys. 239, 443-450 (1990).

(b) H.T.Huynh, "Accurate Monotone Cubic Interpolation", SIAM J. Numer. 
Anal. 30, 57-100 (1993).

(c) Fritsch, F. N.; Carlson, R. E., "Monotone Piecewise Cubic 
Interpolation", SIAM J. Numer. Anal. 17 (2), 238–246 (1980).

I haven't looked at (c) but it seems that (a) and (b) both use piecewise 
cubic polynomials and preserve monotonicity. Do you happen to know if 
one method is superior to the other? If one method is significantly 
better than the other two it would make more sense to include that one 
in GSL.

Patrick

On 03/20/2014 11:37 AM, Jean-François Caron wrote:
> Yes, I didnÂ’t bother doing the integration function at the time because I was having trouble just compiling.  I will add the integration function, and re-write the eval and deriv/deriv2 functions to use HornerÂ’s scheme for the polynomials.  I can generate some comparison graphs using fake data like in SteffenÂ’s paper, that sounds easy enough.
>
> IÂ’ll look at the interpolation/test.c file and see if I can come up with similar tests.
>
> Thanks for offering to help with the integration into GSL itself.  I donÂ’t know a lot of the procedures (or even politics sometimes!) involved.
>
> Jean-François
>
> On Mar 20, 2014, at 10:22 , Patrick Alken <patrick.alken@Colorado.EDU> wrote:
>
>> I did notice you talking about 1.6 in your earlier messages, but assumed it was a typo and you meant 1.16, oops.
>>
>> On 03/20/2014 11:11 AM, Jean-François Caron wrote:
>>> My original problem was that I wanted to add an interpolation type to GSL.  Specifically I want monotonic cubic-splines following the description in Steffen (1990): http://adsabs.harvard.edu/full/1990A%26A...239..443S
>> I took a quick look at your code earlier and it looks pretty nice. I noticed you commented out the _integ function - is this something you could add to make it feature complete with the other interpolation types?
>>
>> It is important to add automated tests for this. Can you look at interpolation/test.c and design similar tests for your new method? Also I think it would be nice to add a figure to the manual illustrating the differences between cubic, akima, and your new steffen method (similar to the figures in the Steffen paper). This would help users a lot when trying to decide what method to use. Do you happen to have a dataset which shows a nice contrast like Figs 1, 3 and 8 from that paper?
>>
>> When everything is ready I would be happy to add it to GSL, as we are already planning to update the interpolation module for the next release. When I find some time I want to import the 2D interpolation extension discussed previously, and also add Hermite interpolation.
>>
>> It would be easiest for us if you could clone the GSL git repository and make your changes there. You could make a new branch called 'steffen' or something and publish it to github, or just send a patch file to me, whichever is easiest.
>>
>> Patrick
>>
>> On Mar 19, 2014, at 18:40 , Dave Allured - NOAA Affiliate <dave.allured@noaa.gov> wrote:
>>>> More data.  I tried the same plain build recipe, GSL 1.16 on our test
>>>> machine which is at Mac OS 10.9.3.  Got another perfect build, no make
>>>> check errors, no PPC-related issues.  Outputs on request, please be
>>>> specific.
>>>>
>>>> CC=clang
>>>> CFLAGS=-g
>>>> ./configure --prefix /Users/dallured/Disk/3rd/gsl/1.16.os10.9
>>>>
>>>> mac27:~/Disk/3rd/gsl/1.16.os10.9 57> sw_vers
>>>> ProductName: Mac OS X
>>>> ProductVersion: 10.9.3
>>>> BuildVersion: 13D17
>>>>
>>>> mac27:~/Disk/3rd/gsl/1.16.os10.9/src 36> \
>>>> ? grep -i '# [a-z]' ../logfiles/make-check.0319a.log | sort | uniq -c
>>>>   45 # ERROR: 0
>>>>   45 # FAIL:  0
>>>>   42 # PASS:  1
>>>>    3 # PASS:  2
>>>>   45 # SKIP:  0
>>>>   42 # TOTAL: 1
>>>>    3 # TOTAL: 2
>>>>   45 # XFAIL: 0
>>>>   45 # XPASS: 0
>>>>
>>>> mac27:~/Disk/3rd/gsl/1.16.os10.9 62> \
>>>> ? grep -c -i ppc logfiles/*319a*log
>>>> logfiles/configure.0319a.os10.9.log:0
>>>> logfiles/install.0319a.log:0
>>>> logfiles/make-check.0319a.log:0
>>>> logfiles/make.0319a.log:0
>>>>
>>>> mac27:~/Disk/3rd/gsl/1.16.os10.9 65> \
>>>> ? grep -i ppc src/config.h src/config.log src/config.status
>>>> src/config.h:/* #undef HAVE_GNUPPC_IEEE_INTERFACE */
>>>> src/config.log:HAVE_GNUPPC_IEEE_INTERFACE=''
>>>> src/config.status:S["HAVE_GNUPPC_IEEE_INTERFACE"]=""
>>>>
>>>> --Dave
>>>>
>>>> On Wed, Mar 19, 2014 at 5:27 PM, Jean-Francois Caron <jfcaron@phas.ubc.ca>
>>>> wrote:
>>>>> Dave is correct, I am using an "i686" 64-bit x86 mac.  For some reason
>>>>> it is still looking for the PPC mac header file.  The ./configure
>>>>> stage correctly identifies my system, so it's a bit strange.  Also GSL
>>>>> installs without errors when I do it from MacPorts, and MacPorts
>>>>> doesn't seem to do anything other than ./configure && make, from my
>>>>> reading of the portfile.
>>>>>
>>>>> When I get back to my Mac, I will look at the NOTES file to see if
>>>>> anything needs to be done for 10.9.
>>>>>
>>>>> Jean-François
>>

       reply	other threads:[~2014-03-20 17:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <57ABFACA-CA7C-439D-9695-F136F0142156@phas.ubc.ca>
     [not found] ` <5328EF5C.5010300@colorado.edu>
     [not found]   ` <0665FACA-1454-4C7C-80B5-30D08E71A1B7@phas.ubc.ca>
     [not found]     ` <A5FA6472-084A-4335-AC4A-4824AA14F1AF@phas.ubc.ca>
     [not found]       ` <5329F67E.7080203@colorado.edu>
     [not found]         ` <CAKZ7wvc+Pf7QR+cxcK9Lm3ad5bMpBqw1qn0HAhtnfr7sDfK3Fw@mail.gmail.com>
     [not found]           ` <532A124B.4090608@colorado.edu>
     [not found]             ` <532A13D0.2050609@colorado.edu>
     [not found]               ` <CALqwTFO7nJ_aDpYKq+RSLmJHTduK0SDgKFnJZLEx14G5ZfojHA@mail.gmail.com>
     [not found]                 ` <CAKZ7wve=fwdkH+0u3NSirH6-aK7u5TTfZe9kjPzGDVYznjfUxw@mail.gmail.com>
     [not found]                   ` <CALqwTFOMN-brCpnVzV2ebMn57sGbK_wE4v1Qs-apUQxz69kO6Q@mail.gmail.com>
     [not found]                     ` <8EA5CA7B-E4C4-48A0-A9EB-BA77F3F1AC11@phas.ubc.ca>
     [not found]                       ` <532B23E3.7050700@colorado.edu>
     [not found]                         ` <AE615778-0196-446E-84C9-C2DB09934F01@phas.ubc.ca>
2014-03-20 17:52                           ` Patrick Alken [this message]
2014-03-20 18:04                             ` Patrick Alken
2014-03-20 18:18                               ` Jean-François Caron
2014-03-20 18:30                                 ` Patrick Alken
2014-03-25 21:56                                   ` Jean-François Caron
2014-03-25 22:51                                     ` Jean-François Caron
2014-03-27  1:10                                       ` Jean-François Caron
2014-03-27  8:13                                         ` Patrick Alken
     [not found]                                           ` <ACADDE72-BE04-4B2E-8553-FA83C0DC227C@phas.ubc.ca>
2014-03-27 17:17                                             ` Jean-François Caron
2014-03-31 20:37                                               ` Steffen interpolation Patrick Alken
2014-03-31 22:24                                                 ` Patrick Alken
     [not found]                                                   ` <958F2963-D3D1-4BC0-8081-EB56644E3AEE@phas.ubc.ca>
2014-04-03 21:51                                                     ` Patrick Alken
2014-04-03 21:53                                                       ` Jean-François Caron
2014-04-03 22:01                                                         ` Patrick Alken
2014-04-03 22:07                                                           ` Jean-François Caron
2014-04-03 22:29                                                             ` Patrick Alken

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=532B2ACF.1060608@colorado.edu \
    --to=patrick.alken@colorado.edu \
    --cc=gsl-discuss@sourceware.org \
    --cc=jfcaron@phas.ubc.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).