[AstroPy] pyregion : python parser for ds9 region files
Mon Oct 19 12:41:09 CDT 2009
On Mon, Oct 19, 2009 at 11:45 AM, James Turner <firstname.lastname@example.org> wrote:
> Hi Jae-Joon,
> That looks interesting! It sounds like these region files are specific
> do DS9. I wonder whether there is a way to make it work with ximtool
> as well? Presumably it would require extending numdisplay or wrapping
> the IRAF "Client Display Library" and making it work like a back end?
> I'm guessing that's not a small amount of work though.
Yes. what I wanted is to create regions files using ds9 and display
them with matplotlib.
For the ximtool part, I'm not sure what you're trying to do. I wonder
if ximtool itself can handle ds9 region files. However, if you're
talking about manipulating ds9 with something like numdisplay, you can
simply use ds9's xpa protocol.
>> pyregion is a python module to parse ds9 (and ciao) region files. The
>> parser is based on the pyparsing module.
>> My personal motivation with this module is to draw ds9 regions with
>> matplotlib, and to create mask images.
>> Homepage : http://leejjoon.github.com/pyregion/
>> examples w/ matplotlib :
>> GitHub repository : http://github.com/leejjoon/pyregion
>> The parser seems to be rather slow (likely due to my lack of parser
>> design skill), but I currently don't have any further plan to improve
>> its performance. So, any contribution will be welcomed.
>> For questions, comments, or feature requests, you may use the github
>> issue tracker or email me.
>> * ds9 and ciao region files.
>> * (physical, wcs) coordinate conversion to the image coordinate.
>> * convert regions to matplotlib patches.
>> * convert regions to spatial filters (i.e., generate mask images)
>> MIT License. See LICENSE.txt
>> AstroPy mailing list
More information about the AstroPy