astropy / astropy/specutils

Create classes/functions to replicate flux calibration a la IRAF standard/sensfunc tasks

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

Description

This is a follow-on from #165. That issue asked for several IRAF functions, most of which probably belong better in `specreduce`. But the one part that I think belongs in `specutils` on that list is flux-calibration. My thinking is that `specreduce` sort of "ends" when you have an extracted spectrum, and `standard`/`sensfunc` and related flux calibration tasks are generally done on the already-extracted spectra.

So this is issue is to create the relevant functionality in `specutils`. The *minimal* version of this functionality is just an example in the docs or tutorial that starts with 1) an uncalibrated (i.e. unit of "counts" or similar) spectrum and 2) an uncalibrated standard star with the same observation setup, and 3) a calibrated spectrum (i.e. in flux units). It would then just use the ratio of 3/2 to create a sensitivity "spectrum" that is "flux per counts", and then multiple that by 1.

One step further is to replicate some of the options in `sensfunc` that amount to a fancier version of "take the 3/2 ratio", including things like sigma clipping, specifying regions to ignore, or fitting a polynomial model instead of using the spectrum directly. That is probably best implemented as a `specutils.manipulation` class, although the surrounding steps would still need to be documented as described above.

The final piece would be to actually include some "standard" standard spectra, like what IRAF comes packaged with. That requires some data-management considerations, and some discussion about what the best standard are these days.

The above could/should be broken into several issues, but I'm starting this one now to prompt discussion on the broad plan here

cc @keflavich @crawfordsm @camipacifici @nmearl @jradavenport

Contributor guide

Open the contributing guide

Research direction

Start by separating the three scopes described in the issue: a documentation or tutorial example, enhanced sensitivity-function functionality in specutils.manipulation, and bundled standard spectra. Read the issue’s proposed ratio workflow and decide which scope can become a standalone task; done should be defined separately for that selected scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.