Changeset b5846a10 in sasview
- Timestamp:
- May 28, 2015 1:11:14 PM (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:
- b327dd7
- Parents:
- 63d314b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/perspectives/fitting/media/fitting_help.rst
r63d314b rb5846a10 132 132 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ 133 133 134 .. _Adding_your_own_models: 135 134 136 Adding your own models 135 137 ---------------------- … … 368 370 fit parameters between data sets (eg, to fix a background level, or radius, etc). 369 371 370 If the data to be fit are in multiple files, load each file, select it in the 371 *Data Explorer*, and *Send To Fitting*. 372 373 If multiple data sets are in one file, load that file, *Unselect All Data*, then 374 select each dataset one at a time and Send To Fitting. 375 376 The result should be that for 377 n 378 datsets you have 2 379 n 380 graphs ( 381 n 382 of the data & model fit and 383 n 384 residuals plots). 385 386 IMPORTANT! 387 If you need to create a n 388 ew model with the new model wizard, or use a 389 model which is the sum of two existing models, go Fitting 390 391 Edit Custom Model 392 before 393 sending the data to the fitting engine. 394 The model will be available under 395 396 Customised 397 Models 398 399 on 400 the FitPage. NB: the name will likely be abbreviated; eg, 401 402 Peak 403 Gauss 404 Model + Absolute Power Law Model 405 406 will appear as 407 408 PGM + APL 409 410 . 411 3. 412 Go to each Fit 413 Page in turn 414 and: 415 416 Select the required model. 417 418 Unselect all the model par 419 ameters. 420 421 Enter some starting guesses for the parameters (it may be helpful to remove the 422 residuals plots for clarity; go Graph 423 424 Show and untick graph windows as required). 425 426 Enter any parameter limits (recommended). 427 428 Select which parameters will refine (sele 429 cting all is probably a bad idea...). 430 4. 431 Select Fitting 432 433 Simultaneous Fit (this also selects the Complex Fit Engine). 434 5. 435 Go to the Simultaneous Fit page 436 and: 437 438 Select which datasets are to be fitted (which will probably be all of them or you wouldnt 439 have 440 loaded them in!). 441 442 It is possible to tie parameters between datasets with constraints; eg, make the 443 Background in FitPage1 the same as the Background in FitPage2, and so on. To do this, 444 answer yes to Add Constraints in the Fit Constraints box. 445 446 But note th 447 at SANSView only lets you constrain parameters that are refining. 448 6. 449 Click Fit 450 451 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. 452 407 453 408 Simultaneous Fits without Constraints 454 409 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 455 410 456 Assuming some FitPages are already set up, check the checkboxes of the 457 model_data rows to fit. And click the 'Fit' button. The results will return to 458 each FitPages. 459 460 Note that the chi2/Npts returned is the sum of the chi2/Npts of each fits. If 461 one needs the chi2 value only for a page, click the 'Compute' button in the 462 FitPage to recalculate. 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. 463 417 464 418 Simultaneous Fits with Constraints 465 419 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 466 420 467 Enter constraint in the text control next to *constraint fit* button. 468 Constraint should be of type model1 parameter name = f(model2 parameter name) 469 for example, M0.radius=2*M1.radius. Many constraints can be entered for a 470 single fit. Each of them should be separated by a newline charater or ";" 471 The easy setup can generate many constraint inputs easily when the selected 472 two models are the same type. 473 474 Note that the chi2/Npts returned is the sum of the chi2/Npts of each fits. 475 If one needs the chi2 value only for one fit, click the 'Compute' button in 476 the FitPage to recalculate. 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. 477 437 478 438 .. ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
Note: See TracChangeset
for help on using the changeset viewer.