Changeset 51f14603 in sasview for src/sans/pr
- Timestamp:
- Apr 3, 2014 11:37:53 AM (11 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:
- 2f2d9d0
- Parents:
- eea3ffa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/pr/invertor.py
r5777106 r51f14603 61 61 62 62 In the following i refers to the ith base function coefficient. 63 The matrix has its entries j in its first Npts rows set to 63 The matrix has its entries j in its first Npts rows set to :: 64 64 65 A[j][i] = (Fourier transformed base function for point j) 65 66 66 67 We them choose a number of r-points, n_r, to evaluate the second 67 68 derivative of P(r) at. This is used as our regularization term. 68 For a vector r of length n_r, the following n_r rows are set to 69 For a vector r of length n_r, the following n_r rows are set to :: 70 69 71 A[j+Npts][i] = (2nd derivative of P(r), d**2(P(r))/d(r)**2, 70 72 evaluated at r[j]) 71 73 72 The vector b has its first Npts entries set to 74 The vector b has its first Npts entries set to :: 75 73 76 b[j] = (I(q) observed for point j) 74 77 … … 79 82 80 83 Methods inherited from Cinvertor: 81 - get_peaks(pars): returns the number of P(r) peaks 82 - oscillations(pars): returns the oscillation parameters for the output P(r) 83 - get_positive(pars): returns the fraction of P(r) that is above zero 84 - get_pos_err(pars): returns the fraction of P(r) that is 1-sigma above zero 84 85 * ``get_peaks(pars)``: returns the number of P(r) peaks 86 * ``oscillations(pars)``: returns the oscillation parameters for the output P(r) 87 * ``get_positive(pars)``: returns the fraction of P(r) that is above zero 88 * ``get_pos_err(pars)``: returns the fraction of P(r) that is 1-sigma above zero 85 89 """ 86 90 ## Chisqr of the last computation … … 252 256 253 257 In the following i refers to the ith base function coefficient. 254 The matrix has its entries j in its first Npts rows set to 258 The matrix has its entries j in its first Npts rows set to :: 259 255 260 A[i][j] = (Fourier transformed base function for point j) 256 261 257 262 We them choose a number of r-points, n_r, to evaluate the second 258 263 derivative of P(r) at. This is used as our regularization term. 259 For a vector r of length n_r, the following n_r rows are set to 264 For a vector r of length n_r, the following n_r rows are set to :: 265 260 266 A[i+Npts][j] = (2nd derivative of P(r), d**2(P(r))/d(r)**2, evaluated at r[j]) 261 267 262 The vector b has its first Npts entries set to 268 The vector b has its first Npts entries set to :: 269 263 270 b[j] = (I(q) observed for point j) 264 271 … … 271 278 :param nr: number of r points to evaluate the 2nd derivative at for the reg. term. 272 279 :return: c_out, c_cov - the coefficients with covariance matrix 273 274 280 """ 275 281 # Reset the background value before proceeding … … 395 401 396 402 In the following i refers to the ith base function coefficient. 397 The matrix has its entries j in its first Npts rows set to 403 The matrix has its entries j in its first Npts rows set to :: 404 398 405 A[i][j] = (Fourier transformed base function for point j) 399 406 400 407 We them choose a number of r-points, n_r, to evaluate the second 401 408 derivative of P(r) at. This is used as our regularization term. 402 For a vector r of length n_r, the following n_r rows are set to 409 For a vector r of length n_r, the following n_r rows are set to :: 410 403 411 A[i+Npts][j] = (2nd derivative of P(r), d**2(P(r))/d(r)**2, 404 412 evaluated at r[j]) 405 413 406 The vector b has its first Npts entries set to 414 The vector b has its first Npts entries set to :: 415 407 416 b[j] = (I(q) observed for point j) 408 417 … … 413 422 414 423 :param nfunc: number of base functions to use. 415 :param nr: number of r points to evaluate the 2nd derivative at 416 for the reg. term. 424 :param nr: number of r points to evaluate the 2nd derivative at for the reg. term. 417 425 418 426 If the result does not allow us to compute the covariance matrix, … … 512 520 number of terms 513 521 514 :param isquit_func: reference to thread function to call to515 516 522 :param isquit_func: 523 reference to thread function to call to check whether the computation needs to 524 be stopped. 517 525 518 526 :return: number of terms, alpha, message
Note: See TracChangeset
for help on using the changeset viewer.