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

Home » Public Forums » archive » hor2eq mystery - disagreeing output from same input?
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
hor2eq mystery - disagreeing output from same input? [message #66935] Wed, 17 June 2009 06:45
MichaelT is currently offline  MichaelT
Messages: 52
Registered: May 2006
Member
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: The Newest Special Offers/Discount/Coupons This Week
Next Topic: POLAR_CONTOUR plot giving strange values for contour lines

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

Current Time: Wed Oct 08 17:10:59 PDT 2025

Total time taken to generate the page: 0.00571 seconds