Changeset 43c0a8e in sasview for pr_inversion/invertor.py
- Timestamp:
- May 23, 2008 10:55:39 AM (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:
- dfb58f8
- Parents:
- eb06cbe
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pr_inversion/invertor.py
r9a11937 r43c0a8e 6 6 """ 7 7 Provide general online help text 8 Future work: extend this function to allow topic selection 8 9 """ 9 10 info_txt = "The inversion approach is based on Moore, J. Appl. Cryst. (1980) 13, 168-175.\n\n" … … 31 32 32 33 TODO: explain the maths 34 35 36 Methods inherited from Cinvertor: 37 - get_peaks: returns the number of P(r) peaks 33 38 """ 34 39 ## Chisqr of the last computation … … 189 194 190 195 def pr_err(self, c, c_cov, r): 191 import math192 c_err = numpy.zeros(len(c))193 for i in range(len(c)):194 try:195 c_err[i] = math.sqrt(math.fabs(c_cov[i][i]))196 except:197 import sys198 print sys.exc_value199 print "oups", c_cov[i][i]200 c_err[i] = c[i]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] 201 206 202 return self.get_pr_err(c, c_ err, r)207 return self.get_pr_err(c, c_cov, r) 203 208 204 209 def _accept_q(self, q):
Note: See TracChangeset
for help on using the changeset viewer.