[AstroPy] point in ellipse

Phil Rosenfield philrose@astro.washington....
Thu Jan 31 12:12:37 CST 2013


I use nxutils for this:
http://matplotlib.org/api/nxutils_api.html


On Thu, Jan 31, 2013 at 10:00 AM, <astropy-request@scipy.org> wrote:

> Send AstroPy mailing list submissions to
>         astropy@scipy.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://mail.scipy.org/mailman/listinfo/astropy
> or, via email, send a message with subject or body 'help' to
>         astropy-request@scipy.org
>
> You can reach the person managing the list at
>         astropy-owner@scipy.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of AstroPy digest..."
>
>
> Today's Topics:
>
>    1. point in ellipse (gonghang.naoc)
>    2. Re: point in ellipse (Tim Jenness)
>    3. Re: point in ellipse (Perry Greenfield)
>    4. Re: point in ellipse (Tim Jenness)
>    5. Re: point in ellipse (gonghang.naoc)
>    6. Re: point in ellipse (gonghang.naoc)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 31 Jan 2013 02:33:51 +0800
> From: "gonghang.naoc" <ghang.naoc@gmail.com>
> Subject: [AstroPy] point in ellipse
> To: astropy <astropy@scipy.org>
> Message-ID:
>         <
> CABb23mvkRamvf-7m-atj+5moB3z2y4dRvvjQ8H3iUwoZNYxo6Q@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> hi?everybody?
>      I believe many people here use ds9 and know  its region file
> format.For example?we can make an ellipse if we know its center ra?dec and
> main aixs direction.Is there a pythonic way to judge whether a point is in
> an ellipse if we know ra&dec of the point?
>      Thank you.
>      Best wishes.
>      Hang
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mail.scipy.org/pipermail/astropy/attachments/20130131/87c11093/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Wed, 30 Jan 2013 11:47:52 -0700
> From: Tim Jenness <tim.jenness@gmail.com>
> Subject: Re: [AstroPy] point in ellipse
> To: "gonghang.naoc" <ghang.naoc@gmail.com>
> Cc: astropy <astropy@scipy.org>
> Message-ID:
>         <CA+G92Rcuoc_kd+Uv32N58kj=
> 7RhG2iwbUuUC84Z+QuSoJEh2CA@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> [now replying to list]
>
> You can use the Region class in pyast for that (it's not part of astropy).
> It has support for all the STC regions.
>
>  https://github.com/timj/starlink-pyast
>
> AST is the library used internally by DS9.
>
> --
> Tim Jenness
>
>
> On Wed, Jan 30, 2013 at 11:33 AM, gonghang.naoc <ghang.naoc@gmail.com
> >wrote:
>
> > hi?everybody?
> >      I believe many people here use ds9 and know  its region file
> > format.For example?we can make an ellipse if we know its center ra?dec
> and
> > main aixs direction.Is there a pythonic way to judge whether a point is
> in
> > an ellipse if we know ra&dec of the point?
> >      Thank you.
> >      Best wishes.
> >      Hang
> >
> > _______________________________________________
> > AstroPy mailing list
> > AstroPy@scipy.org
> > http://mail.scipy.org/mailman/listinfo/astropy
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mail.scipy.org/pipermail/astropy/attachments/20130130/38b2b5d6/attachment-0001.html
>
> ------------------------------
>
> Message: 3
> Date: Wed, 30 Jan 2013 13:48:01 -0500
> From: Perry Greenfield <perry@stsci.edu>
> Subject: Re: [AstroPy] point in ellipse
> To: "gonghang.naoc" <ghang.naoc@gmail.com>
> Cc: astropy <astropy@scipy.org>
> Message-ID: <EBE9F98F-1ED3-4469-8F22-0732319F8405@stsci.edu>
> Content-Type: text/plain; charset=utf-8
>
> Sure.
>
> But I'm assuming you wanted more than that. I presume you are looking for
> a function to test if a coordinate (or array of coordinates) lies inside
> the ellipse or not. Yes, that can be done analytically. You want a python
> function that does that specifically? (No, I don't have one handy, but it
> shouldn't be hard to code).
>
> Perry
>
> On Jan 30, 2013, at 1:33 PM, gonghang.naoc wrote:
>
> > hi?everybody?
> >      I believe many people here use ds9 and know  its region file
> format.For example?we can make an ellipse if we know its center ra?dec and
> main aixs direction.Is there a pythonic way to judge whether a point is in
> an ellipse if we know ra&dec of the point?
> >      Thank you.
> >      Best wishes.
> >      Hang
> >       _______________________________________________
> > AstroPy mailing list
> > AstroPy@scipy.org
> > http://mail.scipy.org/mailman/listinfo/astropy
>
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 30 Jan 2013 11:56:34 -0700
> From: Tim Jenness <tim.jenness@gmail.com>
> Subject: Re: [AstroPy] point in ellipse
> To: Perry Greenfield <perry@stsci.edu>
> Cc: astropy <astropy@scipy.org>
> Message-ID:
>         <
> CA+G92Rc4YowNQ2kqpVzVW0n+Cs41YHwLk__kLyoeQSnD9HimYg@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Wed, Jan 30, 2013 at 11:48 AM, Perry Greenfield <perry@stsci.edu>
> wrote:
>
> > Sure.
> >
> > But I'm assuming you wanted more than that. I presume you are looking for
> > a function to test if a coordinate (or array of coordinates) lies inside
> > the ellipse or not. Yes, that can be done analytically. You want a python
> > function that does that specifically? (No, I don't have one handy, but it
> > shouldn't be hard to code).
> >
> >
> pyast has this built in. Create an ellipse object and then ask whether a
> position (or set of positions) is inside or outside it.
>
> --
> Tim Jenness
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mail.scipy.org/pipermail/astropy/attachments/20130130/6b2b8edf/attachment-0001.html
>
> ------------------------------
>
> Message: 5
> Date: Thu, 31 Jan 2013 21:41:28 +0800
> From: "gonghang.naoc" <ghang.naoc@gmail.com>
> Subject: Re: [AstroPy] point in ellipse
> To: Tim Jenness <tim.jenness@gmail.com>, astropy <astropy@scipy.org>
> Message-ID:
>         <
> CABb23mtsqd6Y2-qE4Dgpm8KoHOhj-f6ftkoOFM84TNpT3b8QXQ@mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Thank you very much. http://dsberry.github.com/starlink/node1.html is
> helpful.
> Hang
>
> On Thu, Jan 31, 2013 at 2:56 AM, Tim Jenness <tim.jenness@gmail.com>
> wrote:
>
> >
> >
> >
> > On Wed, Jan 30, 2013 at 11:48 AM, Perry Greenfield <perry@stsci.edu
> >wrote:
> >
> >> Sure.
> >>
> >> But I'm assuming you wanted more than that. I presume you are looking
> for
> >> a function to test if a coordinate (or array of coordinates) lies inside
> >> the ellipse or not. Yes, that can be done analytically. You want a
> python
> >> function that does that specifically? (No, I don't have one handy, but
> it
> >> shouldn't be hard to code).
> >>
> >>
> > pyast has this built in. Create an ellipse object and then ask whether a
> > position (or set of positions) is inside or outside it.
> >
> > --
> > Tim Jenness
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mail.scipy.org/pipermail/astropy/attachments/20130131/edd5670b/attachment-0001.html
>
> ------------------------------
>
> Message: 6
> Date: Thu, 31 Jan 2013 21:49:11 +0800
> From: "gonghang.naoc" <ghang.naoc@gmail.com>
> Subject: Re: [AstroPy] point in ellipse
> To: astropy <astropy@scipy.org>
> Message-ID:
>         <CABb23mu6XjxxTk=
> 8FD67BuJ_KwtymPK9uCutASitZUhJ9WfY7w@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Thank you.oh, I thought a graphic way might be more convenient than a
> mathematical way .I am lazy to calculate..
> Hang
>
> On Thu, Jan 31, 2013 at 2:48 AM, Perry Greenfield <perry@stsci.edu> wrote:
>
> > Sure.
> >
> > But I'm assuming you wanted more than that. I presume you are looking for
> > a function to test if a coordinate (or array of coordinates) lies inside
> > the ellipse or not. Yes, that can be done analytically. You want a python
> > function that does that specifically? (No, I don't have one handy, but it
> > shouldn't be hard to code).
> >
> > Perry
> >
> > On Jan 30, 2013, at 1:33 PM, gonghang.naoc wrote:
> >
> > > hi?everybody?
> > >      I believe many people here use ds9 and know  its region file
> > format.For example?we can make an ellipse if we know its center ra?dec
> and
> > main aixs direction.Is there a pythonic way to judge whether a point is
> in
> > an ellipse if we know ra&dec of the point?
> > >      Thank you.
> > >      Best wishes.
> > >      Hang
> > >       _______________________________________________
> > > AstroPy mailing list
> > > AstroPy@scipy.org
> > > http://mail.scipy.org/mailman/listinfo/astropy
> >
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mail.scipy.org/pipermail/astropy/attachments/20130131/227dd97f/attachment-0001.html
>
> ------------------------------
>
> _______________________________________________
> AstroPy mailing list
> AstroPy@scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>
>
> End of AstroPy Digest, Vol 76, Issue 11
> ***************************************
>



-- 
Phil Rosenfield
Graduate Student: UW Astronomy
Additional contact info:
http://www.astro.washington.edu/philrose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/astropy/attachments/20130131/f77704e3/attachment.html 


More information about the AstroPy mailing list