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

Home » Public Forums » archive » Re: hor2eq mystery - disagreeing output from same input?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: hor2eq mystery - disagreeing output from same input? [message #66934 is a reply to message #66932] Wed, 17 June 2009 07:10 Go to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
Hi,

just a though...

what do you get if you declare a0 and d0 as double before calling
hor2eq? ... in he first case, you are using a float, while in the second
one, you are using a double (a and d)

Jean

MichaelT wrote:
> I have run into a problem using the hor2eq. It output different
> results when using single values from an array as input (correct
> output) compared to using the same array as a whole (wrong output).
> The example below shows what I mean:
>
> alt = [0, 5, 10, 15]
> az = Replicate(295, 4)
> a = DblArr(4)
> d = DblArr(4)
>
> lat = 52.5
> lon = 10.0
>
> jd = 2454999.38928241d
>
> Print, alt, az
>
> For i = 0, N_Elements(alt) - 1 Do Begin
> hor2eq, alt[i], az[i], jd, a0, d0, LAT= lat, LON=lon
> a[i] = a0
> d[i] = d0
> EndFor
> Print, a, d
>
> hor2eq, alt, az, jd, a, d, LAT= lat, LON=lon
> Print, a, d
> end
>
> OutPut:
>
> 124.64645 127.89450 131.10259 134.47664
> 14.470190 18.890924 22.987733 26.978259
>
> 124.64645 128.02987 131.24057 134.61690
> 14.470190 18.858534 22.953070 26.941322
>
> Clearly, the ra and dec values are *not* the same, except for the
> first value. The loop result is listed first and is correct. The other
> is not.
>
> The same applies to using eq2hor.
>
> FYI: And I have just downloaded the current versions of both programs.
>
> How can this be? Anybody run into this problem before? Am I doing
> something wrong?
>
> Michael
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Trial version of Slither, the IDL to Python bridge, available
Next Topic: Problems with tying ROI's to image

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

Current Time: Wed Oct 08 19:59:03 PDT 2025

Total time taken to generate the page: 0.00414 seconds