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

Home » Public Forums » archive » Re: IDL issues: poly_fit.pro.
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
Re: IDL issues: poly_fit.pro. [message #83943] Wed, 17 April 2013 11:33 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sreelakshmi S writes:

> I have defined the path as you have said.
>
> export IDL_PATH=$IDL_PATH:'+~/idlastrosoftware'
>
> My operating system is Ubuntu

Well, if that is where POLY_FIT program is, then you are good to go. The
POLY_FIT I know about doesn't live in the Astronomy Library, but in the
IDL library. So, in my case, this wouldn't help much. You may have
better results. :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL issues: poly_fit.pro. [message #83944 is a reply to message #83943] Wed, 17 April 2013 11:22 Go to previous messageGo to next message
Sreelakshmi S is currently offline  Sreelakshmi S
Messages: 8
Registered: April 2013
Junior Member
I have defined the path as you have said.

export IDL_PATH=$IDL_PATH:'+~/idlastrosoftware'

My operating system is Ubuntu

On Wednesday, April 17, 2013 11:22:21 PM UTC+5:30, David Fanning wrote:
> Sreelakshmi S writes:
>
>
>
>>> Its showing error opening file. File:poly_fit
>
>
>
> Well, then I would say we know what the problem is. Somehow the IDL
>
> library directory has gotten itself lost and is no longer on your
>
> IDL path. You are going to need to find it (it is the lib directory in
>
> your IDL distribution) and put it back on the IDL path (!PATH system
>
> variable) so it can be found. How you do that depends on your operating
>
> system and how you are running IDL, but here are some general
>
> instructions for installing any third-party IDL library. They will apply
>
> equally well to the library that comes with IDL:
>
>
>
> http://www.idlcoyote.com/code_tips/installcoyote.php
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL issues: poly_fit.pro. [message #83945 is a reply to message #83944] Wed, 17 April 2013 10:52 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sreelakshmi S writes:

>> Its showing error opening file. File:poly_fit

Well, then I would say we know what the problem is. Somehow the IDL
library directory has gotten itself lost and is no longer on your
IDL path. You are going to need to find it (it is the lib directory in
your IDL distribution) and put it back on the IDL path (!PATH system
variable) so it can be found. How you do that depends on your operating
system and how you are running IDL, but here are some general
instructions for installing any third-party IDL library. They will apply
equally well to the library that comes with IDL:

http://www.idlcoyote.com/code_tips/installcoyote.php

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL issues: poly_fit.pro. [message #83946 is a reply to message #83945] Wed, 17 April 2013 10:42 Go to previous messageGo to next message
Sreelakshmi S is currently offline  Sreelakshmi S
Messages: 8
Registered: April 2013
Junior Member
On Wednesday, April 17, 2013 8:27:45 PM UTC+5:30, David Fanning wrote:
> Sreelakshmi S writes:
>
>
>
>> fit=poly_fit(x,y,fit)
>
>> both x any y are arrays
>
>
>
> OK, well, I think IDL has gotten confused for some reason. What happens
>
> if you try this command after compiling POLY_FIT?
>
>
>
> IDL> .compile poly_fit
>
> IDL> fit=poly_fit(x,y,fit)
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
> Its showing error opening file. File:poly_fit
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL issues: poly_fit.pro. [message #83951 is a reply to message #83946] Wed, 17 April 2013 07:57 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sreelakshmi S writes:

> fit=poly_fit(x,y,fit)
> both x any y are arrays

OK, well, I think IDL has gotten confused for some reason. What happens
if you try this command after compiling POLY_FIT?

IDL> .compile poly_fit
IDL> fit=poly_fit(x,y,fit)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL issues: poly_fit.pro. [message #83952 is a reply to message #83951] Wed, 17 April 2013 07:47 Go to previous messageGo to next message
Sreelakshmi S is currently offline  Sreelakshmi S
Messages: 8
Registered: April 2013
Junior Member
On Wednesday, April 17, 2013 8:13:01 PM UTC+5:30, David Fanning wrote:
> Sreelakshmi S writes:
>
>
>
>> I am new to idl..I have been trying to fit the function poly_fit to my data but each time an error message comes:
>
>> % Variable is undefined: POLY_FIT.
>
>> % Execution halted at: $MAIN$
>
>>
>
>> Its a lib defined function...
>
>> y am i still getting this error?
>
>
>
> Don't know. Let's see the line of code where you are calling it.
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
>
fit=poly_fit(x,y,fit)
both x any y are arrays

>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL issues: poly_fit.pro. [message #83953 is a reply to message #83952] Wed, 17 April 2013 07:43 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Sreelakshmi S writes:

> I am new to idl..I have been trying to fit the function poly_fit to my data but each time an error message comes:
> % Variable is undefined: POLY_FIT.
> % Execution halted at: $MAIN$
>
> Its a lib defined function...
> y am i still getting this error?

Don't know. Let's see the line of code where you are calling it.

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL issues: poly_fit.pro. [message #84026 is a reply to message #83952] Tue, 23 April 2013 09:13 Go to previous message
Norbert Hahn is currently offline  Norbert Hahn
Messages: 46
Registered: May 2003
Member
Sreelakshmi S <sreelakshmi.s86@gmail.com> wrote:

> fit=poly_fit(x,y,fit)
> both x any y are arrays

... and how is the variable fit (3rd parameter) defined?
It will be overridden by the result of poly_fit. Is that what you want?

The documentation says:

; CALLING SEQUENCE:
; Result = POLY_FIT(X, Y, Degree)
;
; INPUTS:
; X: The independent variable vector.
;
; Y: The dependent variable vector, should be same length as x.
;
; Degree: The degree of the polynomial to fit.
;
; OUTPUTS:
; POLY_FIT returns a vector of coefficients with a length of NDegree+1.
;

Norbert
Re: IDL issues: poly_fit.pro. [message #84028 is a reply to message #83943] Tue, 23 April 2013 07:09 Go to previous message
Sreelakshmi S is currently offline  Sreelakshmi S
Messages: 8
Registered: April 2013
Junior Member
On Thursday, April 18, 2013 12:03:50 AM UTC+5:30, David Fanning wrote:
> Sreelakshmi S writes:
>
>
>
>> I have defined the path as you have said.
>
>>
>
>> export IDL_PATH=$IDL_PATH:'+~/idlastrosoftware'
>
>>
>
>> My operating system is Ubuntu
>
>
>
> Well, if that is where POLY_FIT program is, then you are good to go. The
>
> POLY_FIT I know about doesn't live in the Astronomy Library, but in the
>
> IDL library. So, in my case, this wouldn't help much. You may have
>
> better results. :-)
>
>
>
> Cheers,
>
>
>
> David
>
>
>
>
>
> So how should I modify so that it reads from both libraries?
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Subscripts with greek symbols
Next Topic: Smoothing global land-only data without land/sea boundary errors and then applying a land-mask?

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

Current Time: Wed Oct 08 13:57:02 PDT 2025

Total time taken to generate the page: 0.00687 seconds