Changeset 5f8fc78 in sasview for src/sas/pr/num_term.py
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.