Changeset 3e6aaad in sasmodels
- Timestamp:
- Aug 31, 2015 11:55:50 PM (9 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- cd8dde1
- Parents:
- 346bc88
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
compare.py
r346bc88 r3e6aaad 108 108 if smearer is not None: 109 109 smearer.model = model # because smear_selection has a bug 110 smearer.accuracy = data.accuracy 110 111 smearer.set_index(index) 111 112 value = smearer.get_value() … … 145 146 return value, average_time 146 147 147 def make_data(qmax, is2D, Nq=128, resolution=0.0, view='log'):148 def make_data(qmax, is2D, Nq=128, resolution=0.0, accuracy='Low', view='log'): 148 149 if is2D: 149 150 from sasmodels.bumps_model import empty_data2D, set_beam_stop 150 151 data = empty_data2D(np.linspace(-qmax, qmax, Nq), resolution=resolution) 152 data.accuracy = accuracy 151 153 set_beam_stop(data, 0.004) 152 154 index = ~data.mask … … 172 174 Nq = int(opt_values.get('-Nq', '128')) 173 175 res = float(opt_values.get('-res', '0')) 176 accuracy = opt_values.get('-accuracy', 'Low') 174 177 is2D = not "-1d" in opts 175 data, index = make_data(qmax, is2D, Nq, res, view=view)178 data, index = make_data(qmax, is2D, Nq, res, accuracy, view=view) 176 179 177 180 … … 296 299 -mono/-poly* force monodisperse/polydisperse 297 300 -ctypes/-sasview* whether cpu is tested using sasview or ctypes 298 -cutoff=1e-5* /value cutofffor including a point in polydispersity301 -cutoff=1e-5* cutoff value for including a point in polydispersity 299 302 -pars/-nopars* prints the parameter set or not 300 303 -abs/-rel* plot relative or absolute error … … 302 305 -hist/-nohist* plot histogram of relative error 303 306 -res=0 sets the resolution width dQ/Q if calculating with resolution 307 -accuracy=Low resolution accuracy Low, Mid, High, Xhigh 304 308 305 309 Key=value pairs allow you to set specific values to any of the model … … 326 330 VALUE_OPTIONS = [ 327 331 # Note: random is both a name option and a value option 328 'cutoff', 'random', 'Nq', 'res', 332 'cutoff', 'random', 'Nq', 'res', 'accuracy', 329 333 ] 330 334 -
sasmodels/bumps_model.py
r346bc88 r3e6aaad 399 399 qmin = getattr(data, 'qmin', 1e-16) 400 400 qmax = getattr(data, 'qmax', np.inf) 401 accuracy = getattr(data, 'accuracy', 'Low') 401 402 self.index = (~data.mask) & (~np.isnan(data.data)) \ 402 403 & (q >= qmin) & (q <= qmax) … … 404 405 self.dIq = data.err_data[self.index] 405 406 self.resolution = Pinhole2D(data=data, index=self.index, 406 nsigma=3.0, accuracy= 'Low')407 nsigma=3.0, accuracy=accuracy) 407 408 #self._theory = np.zeros_like(self.Iq) 408 409 if not partype['orientation'] and not partype['magnetic']: -
sasmodels/resolution2d.py
r346bc88 r3e6aaad 92 92 nbins = nr * nphi 93 93 # Number of bins in the dqr direction (polar coordinate of dqx and dqy) 94 bin_size = self.nsigma / /nr94 bin_size = self.nsigma / nr 95 95 # in dq_r-direction times # of bins in dq_phi-direction 96 96 # data length in the range of self.index
Note: See TracChangeset
for help on using the changeset viewer.