From 697f286a199724e38e651bf66c57095b47c6fce6 Mon Sep 17 00:00:00 2001 From: Matthew Hill Date: Fri, 31 Mar 2017 10:34:43 -0400 Subject: [PATCH] more updates to model fitting via Susan --- docs/source/model_fitting.rst | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/source/model_fitting.rst b/docs/source/model_fitting.rst index 3c72e386..ee6a6e7e 100644 --- a/docs/source/model_fitting.rst +++ b/docs/source/model_fitting.rst @@ -42,18 +42,18 @@ Simplex `~astropy.modeling.fitting.SimplexLSQFitter` SLSQP `~astropy.modeling.fitting.SLSQPLSQFitter` =================== ============================================ -To add a model: +To use a model: -#. Select the desired layer from ``Layers`` (left panel). For example, you can - choose the layer containing your emission or absorption line. - See :ref:`doc_viewer` on how to create a layer for ROI. -#. Select the desired model name from the ``Add Model`` drop-down box and click +#. Select the layer you wish to operate on from the LAYERS window in the upper left. +#. Create and position a region of interest (ROI) as described in the :ref:`doc_viewer` section of + the documentation.” +#. Select the desired model from the ``Add Model`` drop-down box and click ``Select`` to add it to ``Current Models``. #. If desired, repeat the above step to add additional models. #. A new model layer will be created under ``Layers`` (left panel) and it is attached to the selected data layer. -To fine-tune model parameters: +To edit model parameters or enter a better first estimate of the model parameters: #. Select the model layer under ``Layers`` (left panel) that contains the desired model. @@ -102,9 +102,9 @@ 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 re-defined by clicking on the default name and typing a new -name. Note that re-defining names will require that any eventual expression in -the ``Arithmetic`` text box should be edited accordingly. +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 +the ``Arithmetic`` text box be edited accordingly. For now, we are limited to only alphanumeric characters (and no white spaces) when re-naming models. @@ -116,15 +116,15 @@ Spline model Note that the Spline model is of an intrinsically different nature than the other models included in the drop down list of models. The Spline model, when added to a pre-existing list of models, or when added by itself to an empty -list, will immediately be fitted to the data within the currently defined -Regions Of Interest. That is, being a linear model, there is no need to iterate +list, will immediately be fit to the data within the currently defined +Regions Of Interest (ROIs). That is, being a linear model, there is no need to iterate in search of a "best fit" spline. It is just computed once and for all, and kept as part of the compound model that is built from the models in the list and the arithmetic behavior expression. This implies that, to change the regions of interest that define the spline, -one has no other way than removing the spline from the list of models. Then, -redefine the regions of interest, and add a new spline to the list. To change +one must remove the spline from the list of models. Then, the user must redefine +the ROIs and add a new spline to the list of models to be fit. To change a spline parameter, there is no need do discard the spline. Just do it in the same way as with other models: just type in the new value for the parameter. @@ -135,14 +135,14 @@ accessed, and varied, by the fitter. Thus, the spline parameters are not fitted, they are just a convenient mechanism that enables user access to the parameter's values. -The documentation for the spline model cane be seen here: +The documentation for the spline model can be seen here: http://docs.scipy.org/doc/scipy-0.16.0/reference/generated/scipy.interpolate.UnivariateSpline.html Note that SpecViz provides access, at this point, to just two of the parameters in the scipy implementation of th spline function. Pay special attention to the ``smooth`` parameter. SpecViz initializes it to a 'best guess' (``len(wavelength)``). -Too small of a value in here may cause the spline to enter an infinite loop. +Too small of a value may cause the spline to enter an infinite loop. Change the ``smooth`` value with care, trying to stay close to the default value. @@ -153,7 +153,7 @@ value. Saving and Exporting Models to File ------------------------------------ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Selecting a model layer under "Layers" will enable the :ref:`Save ` (the "floppy disk" icon) and