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 Operations Fitted Linemap not working? #691

Closed hcferguson closed 5 years ago

hcferguson commented 5 years ago

I'm not sure I understand the intended output of fitted linemap, but I'm not getting what I expected.

What I expected to see was the equivalent of simple linemap, but based on a model fit to each spaxel rather than a sum over the pixels within the ROI. So the output would be a 2D image rather than a 3D cube. I'm getting a 3D cube.

If the fit to the line creates a dataset called new_data, and the spectral axis is axis 0, then the fitted linemap would be (new_data*mask).sum(axis=0). What I'm seeing in the source code in viewer.py is that it is just returning new_data.

nmearl commented 5 years ago

Ah, you're right. We're missing the summation in this function.