astropy / astropy/regions

Support computing area for compound regions

Open
#433 3 comments 2 reactions 0 assignees View on GitHub
core feature-request shapes
Dominant language
Python
Stars
65
Forks
64
Avg merge
2d 13h
Merged PRs (30d)
4

Description

The following example currently raises a `NotImplementedError`:
```python3
from regions import CirclePixelRegion, PixCoord

circle_1 = CirclePixelRegion(
center=PixCoord(0, 0),
radius=10
)

circle_2 = CirclePixelRegion(
center=PixCoord(10, 0),
radius=10
)

compound = circle_1 & circle_2
print(compound.area)
```
It would be great to have this supported!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the CirclePixelRegion, PixCoord, and compound.area example in the issue, then trace how the compound region is created and where its area currently raises NotImplementedError. Done means the shown intersection computes an area instead of raising that exception, with coverage for the compound-region case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.