astropy / astropy/specutils

Decide on whether SpectralRegion.extract_from or similar should exist

Open
#351 1 comment 1 reaction 0 assignees View on GitHub
discussion
Dominant language
Python
Stars
204
Forks
134
Avg merge
12h 55m
Merged PRs (30d)
1

Description

Most of the context is here: https://github.com/astropy/specutils/pull/289#issuecomment-419257644 - for 0.4 we decided to implement the `extract_region function, but we should decide if the public API should be the method-style or the function-style.

My vote is for `region.extract_from(spectrum)`, as I think that's easier to work with and gives the possibility of specialized regions that do specialized forms of extraction (a functional approach doesn't allow that because there's only one function), among other reasons. Other thoughts?

Contributor guide

Open the contributing guide

Research direction

Read the context in pull request #289, especially the referenced issue comment, and compare the existing extract_region function with the proposed SpectralRegion.extract_from(spectrum) method style. The work is done when the project has reached and recorded a decision about the public API.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.