Changeset ae047f2 in sasview
- Timestamp:
- Jun 2, 2015 10:27:12 AM (9 years ago)
- 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. - Location:
- src/sas
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/perspectives/fitting/media/fitting_help.rst
r8570246 rb5846a10 132 132 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 133 133 134 .. _Adding_your_own_models: 135 134 136 Adding your own models 135 137 ---------------------- … … 314 316 *the Data Explorer is checked (see the section* :ref:`Loading_data` *).* 315 317 318 This mode fits one data set. 319 316 320 When data is sent to the fitting perspective it is plotted in a graph window as 317 321 markers. … … 359 363 --------------------- 360 364 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 368 This mode is an extension of the :ref:`Single Fit Mode` that fits two or more data 369 sets *to the same model* simultaneously. If necessary it is possible to constrain 370 fit parameters between data sets (eg, to fix a background level, or radius, etc). 371 372 If the data to be fit are in multiple files, load each file, then select each file 373 in the *Data Explorer*, and *Send To Fitting*. If multiple data sets are in one file, 374 load 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 376 2*n* graphs (*n* of the data and model fit, and *n* of the resulting residuals). But 377 it 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 382 Now 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 394 When done, select *Constrained or Simultaneous Fit* under *Fitting* in the menu bar. 395 396 In the *Const & Simul Fit* page that appears, select which data sets are to be 397 simultaneously fitted (this will probably be all of them or you would not have loaded 398 them in the first place!). 399 400 To tie parameters between the data sets with constraints, check the 'yes' radio button 401 next to *Add Constraint?* in the *Fit Constraints* box. 402 403 *NB: You can only constrain parameters that are set to refine.* 404 405 When ready, click the *Fit* button on the *Const & Simul Fit* page, NOT the *Fit* 406 button on the individual *FitPage*'s. 407 408 Simultaneous Fits without Constraints 409 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 410 411 The results of the model-fitting will be returned to each of the individual 412 *FitPage*'s. 413 414 Note that the chi2/Npts value returned is the SUM of the chi2/Npts of each fit. To 415 the chi2/Npts value for a specific *FitPage*, click the *Compute* button at the 416 bottom of that *FitPage* to recalculate. 417 418 Simultaneous Fits with Constraints 419 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 420 421 Use the *Easy Setup* drop-down buttons in the *Const & Simul Fit* page to set 422 up constraints between *FitPage*'s. 423 424 Constraints will generally be of the form Mi Parameter1 = Mj.Parameter1, however 425 the text box after the '=' sign can be used to adjust this relationship; for 426 example Mi Parameter1 = scalar*Mj.Parameter1. A 'free-form' constraint box is 427 also provided. 428 429 Many constraints can be entered for a single fit. 430 431 The results of the model-fitting will be returned to each of the individual 432 *FitPage*'s. 433 434 Note that the chi2/Npts value returned is the SUM of the chi2/Npts of each fit. To 435 the chi2/Npts value for a specific *FitPage*, click the *Compute* button at the 436 bottom of that *FitPage* to recalculate. 388 437 389 438 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ … … 391 440 Batch Fit Mode 392 441 -------------- 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` *).* 393 445 394 446 Batch Fit -
src/sas/guiframe/gui_manager.py
rac7be54 r5276eeb 1960 1960 msg += "and model selected. " 1961 1961 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")) 1964 1964 except: 1965 1965 msg = "Error occurred while saving: " 1966 1966 msg += "To save, at least one application panel " 1967 1967 msg += "should have a data set.." 1968 wx.PostEvent(self, StatusEvent(status=msg ))1968 wx.PostEvent(self, StatusEvent(status=msg, info="error")) 1969 1969 1970 1970 def on_save_helper(self, doc, reader, panel, path):
Note: See TracChangeset
for help on using the changeset viewer.