[AstroPy] pyregion : python parser for ds9 region files

James Turner jturner@gemini....
Mon Oct 19 10:45:39 CDT 2009

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.



> Hi,
> 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 : http://leejjoon.github.com/pyregion/examples.html
> 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.
> Regards,
> -JJ
> --------
> * 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
> AstroPy@scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy

More information about the AstroPy mailing list