FitModelThread

class specviz.core.threads.FitModelThread(parent=None)[source]

Bases: PyQt5.QtCore.QThread

Asynchronously fit a model to a layer

Parameters:
  • parent (QtWidget) – The parent widget or None
  • Call
  • ----
  • model_layer (Spectrum1DRefLayer) – The layer to fit to.
  • fitter_name (An modeling fitter) – The fitter to use
  • mask (numpy.ndarray) – The mask to apply
model_layer

Spectrum1DRefLayer – The layer to fit to.

fitter_name

An modeling fitter – The fitter to use

mask

numpy.ndarray – The mask to apply

Signals
-------
status(message, timeout)
State of the thread
message: The status message timeout: Time (msec) to display message
result(Spectrum1DRefModelLayer)

The fit

Attributes Summary

result
status

Methods Summary

__call__(model_layer, fitter_name[, mask])
fit_model(model_layer, fitter_name[, mask]) Fit the model
run() Start thread to fit the model

Attributes Documentation

result
status

Methods Documentation

__call__(model_layer, fitter_name, mask=None)[source]
fit_model(model_layer, fitter_name, mask=None)[source]

Fit the model

Parameters:
Returns:

(model_layer, fitter_message) – The model_layer.model is updated with the fit paramters. The message is from the fitter itself.

Return type:

Spectrum1DRefLayer, str

run()[source]

Start thread to fit the model