spacetelescope / specviz

An interactive astronomical 1D spectra analysis tool.
http://specviz.readthedocs.io
BSD 3-Clause "New" or "Revised" License
43 stars 31 forks source link

Cube operation request: Fit every spaxel #692

Closed hcferguson closed 5 years ago

hcferguson commented 5 years ago

We desperately need a Cube Operation to fit every spaxel with the model and ROI's that are selected in the specviz window. This will allow for continuum fitting, for example, which right now doesn't appear possible in the cubeviz workflow.

The result of this operation would be a 3D cube that is the best-fit model for each spaxel (as opposed to the linemaps, where the result is a 2D image). The user can then either subtract this model cube or divide by it depending on what they want to measure next, using the cubeviz arithmetic.

nmearl commented 5 years ago

This is (incidentally) the current behavior for the fitted linemap function, which takes a region of the spectrum and fits a user-defined model to it for each spaxel, and returns the cube composed of the results of the evaluated model.

hcferguson commented 5 years ago

Yeah, I thought it might be. It was hard to tell by eyeballing the result. (We'll need a way to inspect the fits spaxel by spaxel, eventually).