Loading...
You are not logged-in Login/Register





  • Posts   Search Threads
  • eriehmlJune 23, 2009 4:51 PM PDT   
    Fortran library or subroutine needed for curve fitting

    Hello all.
    I am physics grad. student and I am returning to coding after 15 years so have some patience with me.  I have experimental data points, X and Y which need to be fitted to an exponential or forth order polynomial (no other order is necessary and I could use forth order polynomial only if it easier).  The purpose of the fitting is to subtract background.  These X and Y are photoemission data (Valence Band) to be precise.  So it is only necesarry to fit the curve (exponential or forth order polynomial) to the firsts and lasts data points.  After the fit is obtained it will correspond to the background.  Then I can subtract at any X, Y the background just calculated.  Online I found this NAG library but I can not download anything but pdf files.  In the NAG library there is a subroutine called E02ADF which might help me do the fiiting but I can not download it, any body knows how access NAG downloads?  Either this subroutine or any other you might know I can give it a try as long as I can download it.  As far as the minimization algorithm I am really not picky, LM or Simplex will do for me.  I am coding in fortran using G77 compiler, windows Vista, plataform Force 2 in my laptop. My code is really simple I just need to handle too many data to fit manually each one of them.  I appreciate your time, everyone's.  Thanks for your help.


    David WhiteJune 23, 2009 5:15 PM PDT
    Rate
     
    Re: Fortran library or subroutine needed for curve fitting

    Quoting - eriehml
    Hello all.
    I am physics grad. student and I am returning to coding after 15 years so have some patience with me.  I have experimental data points, X and Y which need to be fitted to an exponential or forth order polynomial (no other order is necessary and I could use forth order polynomial only if it easier).  The purpose of the fitting is to subtract background.  These X and Y are photoemission data (Valence Band) to be precise.  So it is only necesarry to fit the curve (exponential or forth order polynomial) to the firsts and lasts data points.  After the fit is obtained it will correspond to the background.  Then I can subtract at any X, Y the background just calculated.  Online I found this NAG library but I can not download anything but pdf files.  In the NAG library there is a subroutine called E02ADF which might help me do the fiiting but I can not download it, any body knows how access NAG downloads?  Either this subroutine or any other you might know I can give it a try as long as I can download it.  As far as the minimization algorithm I am really not picky, LM or Simplex will do for me.  I am coding in fortran using G77 compiler, windows Vista, plataform Force 2 in my laptop. My code is really simple I just need to handle too many data to fit manually each one of them.  I appreciate your time, everyone's.  Thanks for your help.

    The NAG libraries are probably only available via license.  You may want to try Netlib (www.netlib.org) for a range of Fortran and other sources for many statistical and other operations. 

    eriehmlJune 23, 2009 5:57 PM PDT
    Rate
     
    Re: Fortran library or subroutine needed for curve fitting

    Thanks.  I already had that done and netllib.org libraries where no help, they have a very good search engine so looking for stuff you need is not so painful.  Such elementary stuff like what I need I hope is not on license but if NAG has to sell me the subroutine I need then I will be glad to pay.  Thanks for your time.


    PeterJune 23, 2009 7:01 PM PDT
    Rate
     
    Re: Fortran library or subroutine needed for curve fitting

    Quoting - eriehml
    Thanks.  I already had that done and netllib.org libraries where no help, they have a very good search engine so looking for stuff you need is not so painful.  Such elementary stuff like what I need I hope is not on license but if NAG has to sell me the subroutine I need then I will be glad to pay.  Thanks for your time.
     NAG libraries are very expensive, if you are just looking for curve fitting.Intel Visual Fortran's (IVF) MKL libraries might be of help. But you need to buy a copy of IVF.
    Alternatively try excel 2007!


    eos pengwernJune 24, 2009 1:47 AM PDT
    Rate
     
    Re: Fortran library or subroutine needed for curve fitting

    Quoting - Peter
     NAG libraries are very expensive, if you are just looking for curve fitting.Intel Visual Fortran's (IVF) MKL libraries might be of help. But you need to buy a copy of IVF.
    Alternatively try excel 2007!

    Another very good source of Fortran source code for a host of scientific applications is Alan Miller's page. Whereas most of what's on NETLIB is in Fortran 77, Alan Miller's resources are generally in Fortran 90 so are a bit more user-friendly. This may not help you if you're using g77, however.

    Jugoslav DujicJune 24, 2009 6:02 AM PDT
    Rate
     
    Re: Fortran library or subroutine needed for curve fitting

    Quoting - eriehml
    Hello all.
    I am physics grad. student and I am returning to coding after 15 years so have some patience with me.  I have experimental data points, X and Y which need to be fitted to an exponential or forth order polynomial (no other order is necessary and I could use forth order polynomial only if it easier).

    For polynomial fitting see:

    http://rosettacode.org/wiki/Polynomial_Fitting#Fortran

    LAPACK is part of Intel MKL, shipped with Intel Fortran Professional 11.0 onwards.


    Jugoslav
    www.xeffort.com

    anthonyrichardsJune 24, 2009 9:03 AM PDT
    Rate
     
    Re: Fortran library or subroutine needed for curve fitting

    Quoting - Jugoslav Dujic

    For polynomial fitting see:

    http://rosettacode.org/wiki/Polynomial_Fitting#Fortran

    LAPACK is part of Intel MKL, shipped with Intel Fortran Professional 11.0 onwards.

    Or find a friend with access to MathCad and ask to borrow it. It is very good for curve fitting.

    greg_thorwaldJune 24, 2009 10:28 AM PDT
    Rate
     
    Re: Fortran library or subroutine needed for curve fitting

    Hello,
    Another source for Fortran routines is the NIST "Guide to Available Mathematical Software": http://gams.nist.gov/
    I think there are a number of routines related to polynomials and curve fitting.  The web site has a search tool and directory tree to find what you're looking for.  I've used a few routines from that web site with good success.

    Regards,
    Greg

    eriehmlJune 24, 2009 2:44 PM PDT
    Rate
     
    Re: Fortran library or subroutine needed for curve fitting

    Quoting - Peter
    NAG libraries are very expensive, if you are just looking for curve fitting.Intel Visual Fortran's (IVF) MKL libraries might be of help. But you need to buy a copy of IVF.
    Alternatively try excel 2007!
    Peter
    Thanks for your reply.  When I read the "try excel 2007!" I thought, Oh man, people with good sense of humor at this forums, so thanks for that laugh.  I had no idea about the Intel Visual Fortran you mentioned so I really appreciate you said it.  I am looking more into it as we speak and found only some info at
    http://software.intel.com/sites/products/collateral/hpc/compilers/fwin_brief.pdf
    but maybe you can answer some of my questions.  Is this a stand alone plataform/program so that I can code and compile?, do you know if the it also has some ploting libraries?, can this be installed in a laptop?, any idea of the price?  I'll keep looking into it but I would appreciate your comments.  I just found out the cost is $699, Oh my!, that is so totally out my budget unless I hit Powerball tonight.
    Thanks.


    eriehmlJune 24, 2009 2:50 PM PDT
    Rate
     
    Re: Fortran library or subroutine needed for curve fitting

    Quoting - greg_thorwald
    Hello,
    Another source for Fortran routines is the NIST "Guide to Available Mathematical Software": http://gams.nist.gov/
    I think there are a number of routines related to polynomials and curve fitting.  The web site has a search tool and directory tree to find what you're looking for.  I've used a few routines from that web site with good success.

    Regards,
    Greg
    Greg
    Thanks a lot.  I am looking into it.
    Erie


    anthonyrichardsJune 25, 2009 1:42 AM PDT
    Rate
     
    Re: Fortran library or subroutine needed for curve fitting

    Quoting - eriehml
    Greg
    Thanks a lot.  I am looking into it.
    Erie

    I still think that if you want a quick solution with graphical display of results, MathCad is easily the quickest route. I frequently use MathCad 11 to test and debug my algorithms (and for quick display of intermediate results) before reprogramming them in Fortran for speed. You can buy MathCad 11 on E-bay for a pittance compared to getting a complete Fortran compiler + library of math functions. I attach a screen shot showing a sample fitting function that is available to a MathCad user.
     Attachments 

Forum jump:  

Intel Software Network Forums Statistics

17,025 users have contributed to 48,321 threads and 172,753 posts to date.

In the past 24 hours, we have 16 new thread(s) 57 new posts(s), and 54 new user(s).

In the past 3 days, the most popular thread for everyone has been How to manage rounding by IVF ?? The most posts were made to Most likely, the issue is that The post with the most views is Optimalization of sine function\'s taylor expansion

Please welcome our newest member redfruit83


For more complete information about compiler optimizations, see our Optimization Notice.