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

Home » Public Forums » archive » Re: circles on the sky
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
Re: circles on the sky [message #65871] Sun, 29 March 2009 16:18 Go to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
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

One thing that is unclear in this question is whether you are talking
about the surface of a sphere (in which case spherical trig formulae
like in gcirc.pro are appropriate) or a projection onto a flat map.
You begin by saying that you are drawing points on a map. In that
case you need to know what projection you are using to create the flat
map (e.g. gnomomic? Mercator?). Once you specify the projection
(e.g. with MAP_INIT) then you can use MAP_PROJ_FORWARD /
MAP_PROJ_INVERSE to convert between X,Y and spherical coordinates.
( In astronomy you would use the world coordinate system routines
wcssph2xy / wcsxy2sph ).

--Wayne
Re: circles on the sky [message #65874 is a reply to message #65871] Sat, 28 March 2009 08:54 Go to previous messageGo to next message
Jeremy Bailin is currently offline  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.
Re: circles on the sky [message #65877 is a reply to message #65874] Fri, 27 March 2009 11:58 Go to previous messageGo to next message
pgrigis is currently offline  pgrigis
Messages: 436
Registered: September 2007
Senior Member
I would say that you are more likely to have the plate
scale of the image wrong than to see any non-euclidean
effect :)

Ciao,
Paolo


Christopher Thom 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
Re: circles on the sky [message #65943 is a reply to message #65871] Tue, 31 March 2009 12:09 Go to previous message
Christopher Thom is currently offline  Christopher Thom
Messages: 66
Registered: October 2006
Member
Quoth wlandsman:

> 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
>
> One thing that is unclear in this question is whether you are talking
> about the surface of a sphere (in which case spherical trig formulae
> like in gcirc.pro are appropriate) or a projection onto a flat map.
> You begin by saying that you are drawing points on a map. In that
> case you need to know what projection you are using to create the flat
> map (e.g. gnomomic? Mercator?). Once you specify the projection
> (e.g. with MAP_INIT) then you can use MAP_PROJ_FORWARD /
> MAP_PROJ_INVERSE to convert between X,Y and spherical coordinates.
> ( In astronomy you would use the world coordinate system routines
> wcssph2xy / wcsxy2sph ).

I think i was pretty unclear about what i was trying to accomplish, and
included some confusing details. So, a condensed question, on what I'm
actually trying to accomplish:

Given a co-ordinate position (ra/dec or lat/long), a direction (e.g an
angle east of north, for instance), and a great circle angular distance,
how do I compute the coordinate of the final position?

cheers
chris
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Recombining Real and Imaginary parts of FT in IDL?
Next Topic: Re: Recombining Real and Imaginary parts of FT in IDL?

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

Current Time: Wed Oct 08 17:30:19 PDT 2025

Total time taken to generate the page: 0.00486 seconds