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

Home » Public Forums » archive » Hello
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
Hello [message #91401] Thu, 09 July 2015 08:14 Go to next message
hana303132 is currently offline  hana303132
Messages: 5
Registered: July 2015
Junior Member
Hello there,

I'm a new totally in Idl. So, I need your help

Actually, I've plotted two axis, consisting of x-axis which represents color index ( e.g. r-i) and y-axis which represents magnitude (e.g. r) and inside the plot, there is objects (stars) lie in the models which represents log (g) ( g surface gravity ranging from 7.0 to 9.5) and stars lie between them. Now, I need to estimate logg for each stars and I have written the code. Unfortunately, my code does not work.

This my code,

x=fltarr(r-i) ; x-axis
y=fltarr(r) ; y-axis
xx=findgen(6)/20-0.72 ; logg

n=0
while n lt number_of_wd do begin
j=0
while j lt number_of_stars do begin
linterp,x,y,xx,yy
endif
j=j+1
endwhile
n=n+1
endwhile
print,transpose(yy)
end

I'm waiting your suggestions and your help (Please help me)

thanks
Hana
Re: Hello [message #91402 is a reply to message #91401] Thu, 09 July 2015 08:22 Go to previous messageGo to next message
Helder Marchetto is currently offline  Helder Marchetto
Messages: 520
Registered: November 2011
Senior Member
What does "does not work." mean:
1) IDL give an error message -> Please post the error message
2) IDL gives you results that do not match your expectations -> Rethink about your model

Cheers, Helder

PS: there is an "endif" in the middle of the second while loop that should not be there. Try erasing that for a start
Re: Hello [message #91405 is a reply to message #91402] Thu, 09 July 2015 08:54 Go to previous messageGo to next message
hana303132 is currently offline  hana303132
Messages: 5
Registered: July 2015
Junior Member
بتاريخ الخميس، 9 يوليو، 2015 6:22:41 م UTC+3، كتب Helder:
> What does "does not work." mean:
> 1) IDL give an error message -> Please post the error message
> 2) IDL gives you results that do not match your expectations -> Rethink about your model
>
> Cheers, Helder
>
> PS: there is an "endif" in the middle of the second while loop that should not be there. Try erasing that for a start

Thanks for your response

This is a message:

Compiled module: INTERPOL.
% Arrays are allowed 1 - 8 dimensions.
Re: Hello [message #91412 is a reply to message #91401] Fri, 10 July 2015 11:45 Go to previous messageGo to next message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Thursday, July 9, 2015 at 11:14:12 AM UTC-4, hana3...@gmail.com wrote:
> Hello there,
>
> I'm a new totally in Idl. So, I need your help
>
> Actually, I've plotted two axis, consisting of x-axis which represents color index ( e.g. r-i) and y-axis which represents magnitude (e.g. r) and inside the plot, there is objects (stars) lie in the models which represents log (g) ( g surface gravity ranging from 7.0 to 9.5) and stars lie between them. Now, I need to estimate logg for each stars and I have written the code. Unfortunately, my code does not work.
>
> This my code,
>
> x=fltarr(r-i) ; x-axis
> y=fltarr(r) ; y-axis
> xx=findgen(6)/20-0.72 ; logg
>
> n=0
> while n lt number_of_wd do begin
> j=0
> while j lt number_of_stars do begin
> linterp,x,y,xx,yy
> endif
> j=j+1
> endwhile
> n=n+1
> endwhile
> print,transpose(yy)
> end
>
> I'm waiting your suggestions and your help (Please help me)
>
> thanks
> Hana

Look at your definitions of x and y.

FLTARR creates a new array of length its argument that initially contains zeros. I don't think that's what you want -- perhaps you just want:

x = r-i
y = r

-Jeremy.
Re: Hello [message #91414 is a reply to message #91412] Fri, 10 July 2015 12:59 Go to previous messageGo to next message
hana303132 is currently offline  hana303132
Messages: 5
Registered: July 2015
Junior Member
بتاريخ الجمعة، 10 يوليو، 2015 9:45:29 م UTC+3، كتب Jeremy Bailin:
> On Thursday, July 9, 2015 at 11:14:12 AM UTC-4, hana3...@gmail.com wrote:
>> Hello there,
>>
>> I'm a new totally in Idl. So, I need your help
>>
>> Actually, I've plotted two axis, consisting of x-axis which represents color index ( e.g. r-i) and y-axis which represents magnitude (e.g. r) and inside the plot, there is objects (stars) lie in the models which represents log (g) ( g surface gravity ranging from 7.0 to 9.5) and stars lie between them. Now, I need to estimate logg for each stars and I have written the code. Unfortunately, my code does not work.
>>
>> This my code,
>>
>> x=fltarr(r-i) ; x-axis
>> y=fltarr(r) ; y-axis
>> xx=findgen(6)/20-0.72 ; logg
>>
>> n=0
>> while n lt number_of_wd do begin
>> j=0
>> while j lt number_of_stars do begin
>> linterp,x,y,xx,yy
>> endif
>> j=j+1
>> endwhile
>> n=n+1
>> endwhile
>> print,transpose(yy)
>> end
>>
>> I'm waiting your suggestions and your help (Please help me)
>>
>> thanks
>> Hana
>
> Look at your definitions of x and y.
>
> FLTARR creates a new array of length its argument that initially contains zeros. I don't think that's what you want -- perhaps you just want:
>
> x = r-i
> y = r
>
> -Jeremy.

I'll try that

Tanks
Re: Hello [message #91415 is a reply to message #91412] Fri, 10 July 2015 13:00 Go to previous messageGo to next message
hana303132 is currently offline  hana303132
Messages: 5
Registered: July 2015
Junior Member
بتاريخ الجمعة، 10 يوليو، 2015 9:45:29 م UTC+3، كتب Jeremy Bailin:
> On Thursday, July 9, 2015 at 11:14:12 AM UTC-4, hana3...@gmail.com wrote:
>> Hello there,
>>
>> I'm a new totally in Idl. So, I need your help
>>
>> Actually, I've plotted two axis, consisting of x-axis which represents color index ( e.g. r-i) and y-axis which represents magnitude (e.g. r) and inside the plot, there is objects (stars) lie in the models which represents log (g) ( g surface gravity ranging from 7.0 to 9.5) and stars lie between them. Now, I need to estimate logg for each stars and I have written the code. Unfortunately, my code does not work.
>>
>> This my code,
>>
>> x=fltarr(r-i) ; x-axis
>> y=fltarr(r) ; y-axis
>> xx=findgen(6)/20-0.72 ; logg
>>
>> n=0
>> while n lt number_of_wd do begin
>> j=0
>> while j lt number_of_stars do begin
>> linterp,x,y,xx,yy
>> endif
>> j=j+1
>> endwhile
>> n=n+1
>> endwhile
>> print,transpose(yy)
>> end
>>
>> I'm waiting your suggestions and your help (Please help me)
>>
>> thanks
>> Hana
>
> Look at your definitions of x and y.
>
> FLTARR creates a new array of length its argument that initially contains zeros. I don't think that's what you want -- perhaps you just want:
>
> x = r-i
> y = r
>
> -Jeremy.

I will try that

Thanks
Re: Hello [message #91443 is a reply to message #91415] Wed, 15 July 2015 19:12 Go to previous message
hana303132 is currently offline  hana303132
Messages: 5
Registered: July 2015
Junior Member
بتاريخ الجمعة، 10 يوليو، 2015 11:00:59 م UTC+3، كتب hana3...@gmail.com:
> بتاريخ الجمعة، 10 يوليو، 2015 9:45:29 م UTC+3، كتب Jeremy Bailin:
>> On Thursday, July 9, 2015 at 11:14:12 AM UTC-4, hana3...@gmail.com wrote:
>>> Hello there,
>>>
>>> I'm a new totally in Idl. So, I need your help
>>>
>>> Actually, I've plotted two axis, consisting of x-axis which represents color index ( e.g. r-i) and y-axis which represents magnitude (e.g. r) and inside the plot, there is objects (stars) lie in the models which represents log (g) ( g surface gravity ranging from 7.0 to 9.5) and stars lie between them. Now, I need to estimate logg for each stars and I have written the code. Unfortunately, my code does not work.
>>>
>>> This my code,
>>>
>>> x=fltarr(r-i) ; x-axis
>>> y=fltarr(r) ; y-axis
>>> xx=findgen(6)/20-0.72 ; logg
>>>
>>> n=0
>>> while n lt number_of_wd do begin
>>> j=0
>>> while j lt number_of_stars do begin
>>> linterp,x,y,xx,yy
>>> endif
>>> j=j+1
>>> endwhile
>>> n=n+1
>>> endwhile
>>> print,transpose(yy)
>>> end
>>>
>>> I'm waiting your suggestions and your help (Please help me)
>>>
>>> thanks
>>> Hana
>>
>> Look at your definitions of x and y.
>>
>> FLTARR creates a new array of length its argument that initially contains zeros. I don't think that's what you want -- perhaps you just want:
>>
>> x = r-i
>> y = r
>>
>> -Jeremy.
>
> I will try that
>
> Thanks


Hi,

I have tried this but it does not appear until now

Please help me
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: to convert 3d array to 2d array
Next Topic: IDLWAVE and &$ blocks

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

Current Time: Wed Oct 08 13:36:39 PDT 2025

Total time taken to generate the page: 0.00468 seconds