Changeset 0550752 in sasview for sansview/perspectives/fitting/fitting.py
- Timestamp:
- Nov 7, 2008 11:50:03 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:
- 1f62278
- Parents:
- 35d1092
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansview/perspectives/fitting/fitting.py
r57668f8 r0550752 1 1 import os,os.path, re 2 2 import sys, wx, logging 3 import string, numpy, 3 import string, numpy, math 4 4 5 5 from copy import deepcopy … … 578 578 draw model with default data value 579 579 """ 580 x = pylab.arange(0.001, 0.1, 0.001)580 x = numpy.arange(0.001, 0.1, 0.001) 581 581 xlen = len(x) 582 dy = numpy.zeros(xlen)583 582 y = numpy.zeros(xlen) 584 583 585 584 for i in range(xlen): 586 585 y[i] = model.run(x[i]) 587 dy[i] = math.sqrt(math.fabs(y[i])) 586 588 587 try: 589 588 new_plot = Theory1D(x, y) … … 591 590 new_plot.xaxis("\\rm{Q}", 'A^{-1}') 592 591 new_plot.yaxis("\\rm{Intensity} ","cm^{-1}") 592 593 593 new_plot.group_id ="Fitness" 594 594 wx.PostEvent(self.parent, NewPlotEvent(plot=new_plot, title="Analytical model"))
Note: See TracChangeset
for help on using the changeset viewer.