spacetelescope / cubeviz

Data analysis package for cubes. https://cubeviz.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
15 stars 25 forks source link

Fitting stopped working after canceling fit spaxels #580

Closed hcferguson closed 3 years ago

hcferguson commented 5 years ago

I tried fit spaxels with a linear model that worked in the specviz viewer on the bjames SINFONI data. After about 2 minutes I gave up waiting and aborted, then selected cancel. I then replaced the linear model with a polynomial in specviz and tried to fit and it didn't respond. I then tried to delete the polynomial model, and that didn't respond either. Seems like the modeling interface itself hung.

hcferguson commented 5 years ago

There's a possible clue in the stack trace when I exited, but I'm not sure when it appeared:

Traceback (most recent call last):
  File "/Users/hcferguson/anaconda3/envs/cubeviz-v0.3b1/lib/python3.6/site-packages/specviz/plugins/model_editor/model_editor.py", line 347, in _redraw_model
    model_plot_data_item.set_data()
  File "/Users/hcferguson/anaconda3/envs/cubeviz-v0.3b1/lib/python3.6/site-packages/specviz/core/items.py", line 383, in set_data
    self.setData(spectral_axis, self.flux, connect="finite")
  File "/Users/hcferguson/anaconda3/envs/cubeviz-v0.3b1/lib/python3.6/site-packages/specviz/core/items.py", line 287, in flux
    return self.data_item.flux.to(self.data_unit,
  File "/Users/hcferguson/anaconda3/envs/cubeviz-v0.3b1/lib/python3.6/site-packages/specviz/plugins/model_editor/items.py", line 34, in flux
    result = self.model_editor_model.evaluate()
  File "/Users/hcferguson/anaconda3/envs/cubeviz-v0.3b1/lib/python3.6/site-packages/specviz/plugins/model_editor/models.py", line 209, in evaluate
    fittable_models = self.compose_fittable_models()
  File "/Users/hcferguson/anaconda3/envs/cubeviz-v0.3b1/lib/python3.6/site-packages/specviz/plugins/model_editor/models.py", line 92, in compose_fittable_models
    new_model = model.__class__(*model_args, **model_kwargs)
TypeError: __init__() missing 1 required positional argument: 'degree'
brechmos-stsci commented 5 years ago

This is probably not strictly a "cubeviz" issue, but is a specviz issue. Someone should test the same type of thing there and open a ticket in specviz (then link back here). It might be a specutils issue, but my guess specviz.