Hello [message #91401] |
Thu, 09 July 2015 08:14  |
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 #91412 is a reply to message #91401] |
Fri, 10 July 2015 11:45   |
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   |
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   |
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  |
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
|
|
|