astropy / pyregion

ds9 region parser for python
https://pyregion.readthedocs.io
MIT License
39 stars 39 forks source link

pyregion and astropy #18

Closed cdeil closed 9 years ago

cdeil commented 11 years ago

@leejjoon @astrofrog Would it make sense to include pyregion into astropy or an astropy affiliated package? Or merge relevant parts, e.g. for https://github.com/astropy/photutils ?

For my astro analyses regions are an essential part and I use tools like CIAO dmstat or skimage.measure.regionprops, but having regions integrated in the astropy core or an affiliated package like photutils would be great. I'll help with this as much as I can.

keflavich commented 11 years ago

+1: I'll help where I can as well, I think a nicely integrated ds9 + photometry system in astropy would be very useful.

keflavich commented 11 years ago

A quick demo of parsing pyregion into astropy coordinates (but not photometric apertures, just for point sources):

import pyregion
import astropy.coordinates as coord
from astropy import units
regfile = pyregion.open('fk5file.reg')
coordlist = [coord.ICRSCoordinates(*s.coord_list[:2],unit=(units.degree,units.degree)) for s in regfile]
astrofrog commented 9 years ago

@cdeil @keflavich - as you can see, pyregion is now in the astropy organization. For now we should keep this separate until the region stuff as part of the generalized WCS is figured out.

cdeil commented 9 years ago

@astrofrog @leejjoon Thanks for doing this!

It would be great if you could make a new release on PyPI soon ... it's still pointing to the old code repo and non-existant docs pages: https://pypi.python.org/pypi/pyregion/1.1.4

astrofrog commented 9 years ago

@cdeil - I can do it in a few days - we should try it out first a fair bit to make sure I didn't break anything in all the reshuffling.