hor2eq mystery - disagreeing output from same input? [message #66935] |
Wed, 17 June 2009 06:45 |
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
|
|
|