Closed hcferguson closed 3 years ago
Could you add a stack trace to this? Is this really a specviz issue?
Does it happen consistently? Is this the same crashing you experience in #539?
Consistently when fitting a linear model over a wide wavelength region in this spectrum. No stack trace -- just a segmentation fault. The issue in #539 seems different in that it had a stack trace.
@hcferguson, I would suggest you try it in standalone specviz. If it crashes there, open up a specviz ticket and link back to here.
There's no way to 'fit spaxels' in standalone specviz.
It should be possible to write a script using specutils to do the same thing. I agree, the problem is likely in the model fitting, so issue is best on the specutils repo.
@hcferguson please try with the current master in my fork (pip install git+https://github.com/nmearl/specviz --upgrade
) and let me know if you experience the same issue.
I got a 1D fit to work. When I tried fit spaxels
, I got the same QTextCursor
error and crash that I'm seeing now on #576.
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
WARNING: Model is linear in parameters; consider using linear fitting methods. [astropy.modeling.fitting]
WARNING:astropy:Model is linear in parameters; consider using linear fitting methods.
[1] 79942 segmentation fault cubeviz
@hcferguson Can you update with the latest changes in my fork and give it another shot?
Tried to fit the linear model in specviz before doing fit spaxels
. Worked the first time. The second time, I got the QTextCursor error and segfault.
warnings.warn('Data.visible_components is deprecated', UserWarning)
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
WARNING: Model is linear in parameters; consider using linear fitting methods. [astropy.modeling.fitting]
WARNING:astropy:Model is linear in parameters; consider using linear fitting methods.
[1] 72030 segmentation fault cubeviz
Fired it up again and tried fit spaxels
. In prior attempts, this was getting close to finished within 10 seconds before it crashed. Now I assume you have turned off threading, so we don't get the progress bar. I've given it 5 minutes and it's still sitting there with no response, which seems implausibly long for this dataset if it's actually working.
Very strange. Threading has not been turned off. There are no error messages in the terminal?
Possibly:
WARNING: Model is linear in parameters; consider using linear fitting methods. [astropy.modeling.fitting]
WARNING:astropy:Model is linear in parameters; consider using linear fitting methods.
Traceback (most recent call last):
File "/Users/hcferguson/anaconda3/envs/cubeviz-v0.3b1/lib/python3.6/site-packages/specviz/third_party/glue/workers.py", line 30, in run
new_data, unit = self._function(self._data, self._tracker)
File "/Users/hcferguson/anaconda3/envs/cubeviz-v0.3b1/lib/python3.6/site-packages/specviz/third_party/glue/operations.py", line 158, in <lambda>
*args, model=model, spectral_axis=spectral_axis, mask=mask),
File "/Users/hcferguson/anaconda3/envs/cubeviz-v0.3b1/lib/python3.6/site-packages/specviz/third_party/glue/operations.py", line 142, in threadable_function
out[:, x, y] = new_data
ValueError: could not broadcast input array from shape (1762) into shape (2040)
@hcferguson Can you try again with the latest?
@nmearl Alas still fails with
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
WARNING: Model is linear in parameters; consider using linear fitting methods. [astropy.modeling.fitting]
WARNING:astropy:Model is linear in parameters; consider using linear fitting methods.
[1] 2483 segmentation fault cubeviz
Did a fresh install. It worked once, then failed when I changed the ROI and tried again. A few warnings issued in addition to the QTextCursor.
QObject::connect: Cannot queue arguments of type 'QTextCursor'
(Make sure 'QTextCursor' is registered using qRegisterMetaType().)
WARNING: Model is linear in parameters; consider using linear fitting methods. [astropy.modeling.fitting]
WARNING:astropy:Model is linear in parameters; consider using linear fitting methods.
WARNING: Model is linear in parameters; consider using linear fitting methods. [astropy.modeling.fitting]
WARNING:astropy:Model is linear in parameters; consider using linear fitting methods.
[1] 3683 segmentation fault cubeviz
fit spaxels
crashes with a segmentation fault and no stack trace on AGN_outflow/ngc4151_hband