Astropy Models and
to fit models to its spectra. For example, you can fit one model to the
continuum, another to an emission line of interest, and yet another to an
Currently, the following models are available:
|SpecViz Model Name||Astropy Model Class|
The models can be fitted with the following fitters:
|SpecViz Fitter Name||Astropy Fitter Class|
To use a model:
- Create a new
model data itemby clicking on the
New Modelbutton on the WorkSpace toolbar.
- Select the layer you wish to operate on from the combination box at the bottom of the fitting window. For example, you can choose the layer containing your emission or absorption line.
- Create and position a region of interest (ROI). Multiple ROIs can be used. SpecViz fits the data under all the ROIs.
- Select the desired model from the green
Add Modeldrop-down box to add it to
- If desired, repeat the above step to add additional models.
To edit model parameters or enter a better first estimate of the model parameters:
- If desired, double-click on the model name to rename it. When you see a blinking cursor, enter its new name and press “Enter”.
- Expand the model listing under the model name.
- Double-click on the desired model parameter value in the listing.
When you see a blinking cursor, enter the new value and press
To fit a model:
- Select the layer you wish to operate on from the combination box at the bottom of the fitting window.
- Adjust model parameter values to approximate fit.
- Click the lock icon next to any parameter to choose whether it should be kept fixed (closed lock) or allowed to vary (open lock) during fitting.
- Click on the settings icon at the bottom of the model fitting window select options such as the desired fitter and maximum iterations.
- Check the model’s
Equation Editorby clicking the calculator button. It will pop up with the current model arithmetic. Review. edit and press ok when done.
- Click the blue
Fit Modelbutton at the bottom of the fitting window.
- The associated model parameters will be adjusted accordingly.
Equation Editor text box is used to define the relationship between
different models for the same
model data item. The editor can be launched by clicking the calculator Botton at the bottom of the model fitting window. If nothing is defined, the default is to
add all the models together. To describe a non-default model relationship,
adjust the math operators, as shown in the examples below and
Enter to produce the compound model:
Linear1 + Gaussian1
Linear1 * Gaussian1
Gaussian1 - Gaussian2
The entity that results from lumping together all the models, and combining them either using the arithmetic behavior expression, or just adding them all together, is called a “compound model”.
When added to the
Current Models list, a model will receive a default name
that is generated from the model type (as listed in the drop down model selector)
plus a running numerical suffix.
These names can be changed by clicking on the default name and entering a new
name. Note that changing model names will require that any expression in
Equation Editor text box be edited accordingly.