Changeset 83a25da in sasview for sansmodels/src
- Timestamp:
- Aug 6, 2009 4:49:24 PM (15 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:
- 9bd69098
- Parents:
- ba8f2c3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sansmodels/src/sans/models/BaseComponent.py
r138c139 r83a25da 6 6 # imports 7 7 import copy 8 import numpy 8 9 #TO DO: that about a way to make the parameter 9 10 #is self return if it is fittable or not … … 55 56 def run(self, x): return NotImplemented 56 57 def runXY(self, x): return NotImplemented 58 59 def evalDistribution(self, qdist): 60 """ 61 Evaluate a distribution of q-values. 62 A list of either scale q-values or [qx,qy] doublets 63 are assumed. The allowed data types for the doublets are 64 the same as for run() and runXY(). 65 66 Since the difference between scale and vector q-values 67 are dealt with in runXY(), we pass along the values 68 as-is. 69 70 @param qdist: list of scalar q-values or list of [qx,qy] doublets 71 """ 72 q_array = numpy.asarray(qdist) 73 iq_array = numpy.zeros(len(q_array)) 74 for i in len(q_array): 75 iq_array[i] = self.runXY(q_array[i]) 76 77 return iq_array 57 78 58 79 def clone(self):
Note: See TracChangeset
for help on using the changeset viewer.