Changeset ae047f2 in sasview for src


Ignore:
Timestamp:
Jun 2, 2015 10:27:12 AM (9 years ago)
Author:
krzywon
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
422e7e8
Parents:
5276eeb (diff), b327dd7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of https://github.com/SasView/sasview

Location:
src/sas
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/perspectives/fitting/media/fitting_help.rst

    r8570246 rb5846a10  
    132132.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
    133133 
     134.. _Adding_your_own_models: 
     135 
    134136Adding your own models 
    135137---------------------- 
     
    314316*the Data Explorer is checked (see the section* :ref:`Loading_data` *).* 
    315317 
     318This mode fits one data set. 
     319 
    316320When data is sent to the fitting perspective it is plotted in a graph window as 
    317321markers. 
     
    359363--------------------- 
    360364 
    361 This fitting option enables to set a number of the constraints between the  
    362 parameters of fitting(s). It requires one or more FitPages with a data and a  
    363 model set for the fitting, and performs multiple fittings given by the  
    364 FitPage(s). The Complex (ParkMC) FitEngine will be used automatically. 
    365  
    366 Simultaneous Fit without Constraint 
    367  
    368 Assuming some FitPages are already set up, check the checkboxes of the  
    369 model_data rows to fit. And click the 'Fit' button. The results will return to  
    370 each FitPages. 
    371  
    372 Note that the chi2/Npts returned is the sum of the chi2/Npts of each fits. If  
    373 one needs the chi2 value only for a page, click the 'Compute' button in the  
    374 FitPage to recalculate. 
    375  
    376 Simultaneous Fit with Constraint 
    377  
    378 Enter constraint in the text control next to *constraint fit*  button.  
    379 Constraint should be of type model1 parameter name = f(model2 parameter name)  
    380 for example, M0.radius=2*M1.radius. Many constraints can be entered for a  
    381 single fit. Each of them should be separated by a newline charater or ";"  
    382 The easy setup can generate many constraint inputs easily when the selected  
    383 two models are the same type. 
    384  
    385 Note that the chi2/Npts returned is the sum of the chi2/Npts of each fits.  
    386 If one needs the chi2 value only for one fit, click the 'Compute' button in  
    387 the FitPage to recalculate. 
     365*NB: Before proceeding, ensure that the Single Mode radio button at the bottom of* 
     366*the Data Explorer is checked (see the section* :ref:`Loading_data` *).* 
     367 
     368This mode is an extension of the :ref:`Single Fit Mode` that fits two or more data  
     369sets *to the same model* simultaneously. If necessary it is possible to constrain  
     370fit parameters between data sets (eg, to fix a background level, or radius, etc). 
     371 
     372If the data to be fit are in multiple files, load each file, then select each file 
     373in the *Data Explorer*, and *Send To Fitting*. If multiple data sets are in one file, 
     374load that file, *Unselect All Data*, select just those data sets to be fitted, and 
     375*Send To Fitting*. Either way, the result should be that for *n* data sets you have 
     3762*n* graphs (*n* of the data and model fit, and *n* of the resulting residuals). But 
     377it may be helpful to minimise the residuals plots for clarity. 
     378 
     379*NB: If you need to use a customized model, you must ensure that model is available* 
     380*first (see* :ref:`Adding_your_own_models` *).* 
     381 
     382Now go to each *FitPage* in turn and: 
     383 
     384  Select the required category and model; 
     385 
     386  Unselect all the model parameters; 
     387 
     388  Enter some starting guesses for the parameters; 
     389 
     390  Enter any parameter limits (recommended); 
     391 
     392  Select which parameters will refine (selecting all is generally a bad idea...); 
     393 
     394When done, select *Constrained or Simultaneous Fit* under *Fitting* in the menu bar. 
     395 
     396In the *Const & Simul Fit* page that appears, select which data sets are to be 
     397simultaneously fitted (this will probably be all of them or you would not have loaded 
     398them in the first place!). 
     399 
     400To tie parameters between the data sets with constraints, check the 'yes' radio button 
     401next to *Add Constraint?* in the *Fit Constraints* box. 
     402 
     403*NB: You can only constrain parameters that are set to refine.* 
     404 
     405When ready, click the *Fit* button on the *Const & Simul Fit* page, NOT the *Fit* 
     406button on the individual *FitPage*'s. 
     407 
     408Simultaneous Fits without Constraints 
     409^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
     410 
     411The results of the model-fitting will be returned to each of the individual 
     412*FitPage*'s. 
     413 
     414Note that the chi2/Npts value returned is the SUM of the chi2/Npts of each fit. To 
     415the chi2/Npts value for a specific *FitPage*, click the *Compute* button at the 
     416bottom of that *FitPage* to recalculate. 
     417 
     418Simultaneous Fits with Constraints 
     419^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
     420 
     421Use the *Easy Setup* drop-down buttons in the *Const & Simul Fit* page to set 
     422up constraints between *FitPage*'s. 
     423 
     424Constraints will generally be of the form Mi Parameter1 = Mj.Parameter1, however 
     425the text box after the '=' sign can be used to adjust this relationship; for 
     426example Mi Parameter1 = scalar*Mj.Parameter1. A 'free-form' constraint box is 
     427also provided. 
     428 
     429Many constraints can be entered for a single fit. 
     430 
     431The results of the model-fitting will be returned to each of the individual 
     432*FitPage*'s. 
     433 
     434Note that the chi2/Npts value returned is the SUM of the chi2/Npts of each fit. To 
     435the chi2/Npts value for a specific *FitPage*, click the *Compute* button at the 
     436bottom of that *FitPage* to recalculate. 
    388437 
    389438.. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 
     
    391440Batch Fit Mode 
    392441-------------- 
     442 
     443*NB: Before proceeding, ensure that the Batch Mode radio button at the bottom of* 
     444*the Data Explorer is checked (see the section* :ref:`Loading_data` *).* 
    393445 
    394446Batch Fit 
  • src/sas/guiframe/gui_manager.py

    rac7be54 r5276eeb  
    19601960                msg += "and model selected. " 
    19611961                msg += "No project was saved to %s" % (str(path)) 
    1962                 logging.error(msg) 
    1963                 wx.PostEvent(self, StatusEvent(status=msg)) 
     1962                logging.warning(msg) 
     1963                wx.PostEvent(self, StatusEvent(status=msg, info="error")) 
    19641964        except: 
    19651965            msg = "Error occurred while saving: " 
    19661966            msg += "To save, at least one application panel " 
    19671967            msg += "should have a data set.." 
    1968             wx.PostEvent(self, StatusEvent(status=msg)) 
     1968            wx.PostEvent(self, StatusEvent(status=msg, info="error")) 
    19691969 
    19701970    def on_save_helper(self, doc, reader, panel, path): 
Note: See TracChangeset for help on using the changeset viewer.