Changeset 896abb3 in sasview for pr_inversion/invertor.py
- Timestamp:
- May 23, 2008 2:31:50 PM (16 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:
- ffca8f2
- Parents:
- a1718df
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pr_inversion/invertor.py
r43c0a8e r896abb3 1 """ 2 Module to perform P(r) inversion. 3 The module contains the Invertor class. 4 """ 1 5 from sans.pr.core.pr_inversion import Cinvertor 2 6 import numpy … … 35 39 36 40 Methods inherited from Cinvertor: 37 - get_peaks: returns the number of P(r) peaks 41 - get_peaks(pars): returns the number of P(r) peaks 42 - oscillations(pars): returns the oscillation parameters for the output P(r) 43 - get_positive(pars): returns the fraction of P(r) that is above zero 44 - get_pos_err(pars): returns the fraction of P(r) that is 1-sigma above zero 38 45 """ 39 46 ## Chisqr of the last computation … … 57 64 Set the value of an attribute. 58 65 Access the parent class methods for 59 x, y, err and d_max.66 x, y, err, d_max, q_min, q_max and alpha 60 67 """ 61 68 if name=='x': … … 194 201 195 202 def pr_err(self, c, c_cov, r): 196 #import math 197 #c_err = numpy.zeros(len(c)) 198 #for i in range(len(c)): 199 # try: 200 # c_err[i] = math.sqrt(math.fabs(c_cov[i][i])) 201 # except: 202 # import sys 203 # print sys.exc_value 204 # print "oups", c_cov[i][i] 205 # c_err[i] = c[i] 206 203 """ 204 Returns the value of P(r) for a given r, and base function 205 coefficients, with error. 206 207 @param c: base function coefficients 208 @param c_cov: covariance matrice of the base function coefficients 209 @param r: r-value to evaluate P(r) at 210 @return: P(r) 211 212 """ 207 213 return self.get_pr_err(c, c_cov, r) 208 214
Note: See TracChangeset
for help on using the changeset viewer.