Changing properties of a region.
Closed this issue · 4 comments
I'm using pyregion in an application where I read in a region file, change the size of the regions and then create a mask based on the new sizes. I found that there are two methods to change the size of the region (as well as all other properties): one through region.params and one through region.coord_list and the two methods don't talk to each other. The get_mask method only cares about the latter representation.
FYI: pyregion
has been mostly unmaintained for the past few years, and now we've started to work on a new regions package based on Astropy. It doesn't contain code to compute masks yet, but that can be implemented by creating coordinate grids and calling contains
like we do e.g. here. There's an open issue to add code to compute masks to regions
here: astropy/regions#55
@ivastar - Did you manage to get your analysis done? Do you still need an answer here?
My preference would be that we close this issue, and if you need something, we add it to the new regions
package ASAP.
@ivastar - Thoughts?
I'm closing this now.
@ivastar - If you still have a question or feature request, please re-open or file a new issue!
Yes, I did get my analysis done. I opened the issue just because I found this to be inconsistent.
@cdeil said: "It doesn't contain code to compute masks yet, but that can be implemented by creating coordinate grids and calling contains
like we do e.g..."
I think that the capability to create masks from regions is a single most important feature of the old pyregion
package. I cannot imagine pyregion
without this feature (parsing a DS9 region file alone is quite useless for me).