- Timestamp:
- Mar 4, 2015 10:09:19 AM (10 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:
- c76bdc3
- Parents:
- 3350ad6
- Location:
- src/sas/pr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/pr/invertor.py
r3350ad6 r5f8fc78 107 107 ## Information dictionary for application use 108 108 info = {} 109 ## Slit information 110 slit_height = None 111 slit_width = None 109 112 110 113 def __init__(self): 111 114 Cinvertor.__init__(self) 112 self.slit_height = None113 self.slit_width = None114 115 self.err = None 115 116 self.d_max = None … … 537 538 538 539 """ 539 from num_term import N um_terms540 estimator = N um_terms(self.clone())540 from num_term import NTermEstimator 541 estimator = NTermEstimator(self.clone()) 541 542 try: 542 543 return estimator.num_terms(isquit_func) -
src/sas/pr/num_term.py
r038c00cf r5f8fc78 2 2 import numpy 3 3 import copy 4 import sys 5 import logging 4 6 from sas.pr.invertor import Invertor 5 7 6 7 class Num_terms(): 8 class NTermEstimator(object): 8 9 """ 9 10 """ … … 177 178 data_err = numpy.append(data_err, err) 178 179 except: 179 pass180 logging.error(sys.exc_value) 180 181 181 182 return data_x, data_y, data_err … … 183 184 184 185 if __name__ == "__main__": 185 i = Invertor()186 invert = Invertor() 186 187 x, y, erro = load("test/Cyl_A_D102.txt") 187 i.d_max = 102.0 188 i.nfunc = 10 189 #i.q_max = 0.4 190 #i.q_min = 0.07 191 i.x = x 192 i.y = y 193 i.err = erro 194 #i.out, i.cov = i.lstsq(10) 188 invert.d_max = 102.0 189 invert.nfunc = 10 190 invert.x = x 191 invert.y = y 192 invert.err = erro 195 193 # Testing estimator 196 est = N um_terms(i)194 est = NTermEstimator(invert) 197 195 print est.num_terms()
Note: See TracChangeset
for help on using the changeset viewer.