Re: circles on the sky [message #65874 is a reply to message #65871] |
Sat, 28 March 2009 08:54   |
Jeremy Bailin
Messages: 618 Registered: April 2008
|
Senior Member |
|
|
On Mar 27, 1:53 pm, Christopher Thom <ct...@oddjob.uchicago.edu>
wrote:
> Hi all,
>
> I'm drawing some points on a sky map. The map is <0.5deg across, so I
> thought a flat approximation would be ok...this may not be true. Around my
> central point, I draw a circle using a flat geometry relation [x =
> x0+r*cos(theta); y = y0 + r*sin(theta)], but i see a point outside the
> circle that I expect to be inside.
>
> I expect this point to be inside the circle, because the radius of the
> circle (in arcsec) is *greater* than the great-circle angular distance
> from the centre of the circle to the point.
>
> So...I'm thinking that my flat-geometry assumption is false. My question:
> can anyone point me towards forumlae/code that will calculate this circle
> on the sky (i.e. all points which have a fixed great-circle distance from
> the centre)? I'm using the astro library gcirc.pro to calculte my
> great-circle angular distances...I kind of want the "inverse" of that
> routine, I guess.
>
> Or...is there a better way to do it? [Or maybe my bug is elsewhere?]
>
> cheers
> chris
Would something like this work? (all quantities in radians)
phi = 2.*!pi*findgen(nphi)/(nphi-1)
x = radius*cos(phi)
y = radius*sin(phi)
dec = dec_center + y
RA = RA_center + asin(sin(radius)/cos(dec))
(totally untested, but that's what I get from spherical trig...)
-Jeremy.
|
|
|