Changeset ae7d639 in sasmodels
- Timestamp:
- Aug 8, 2014 2:55:23 PM (10 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:
- a953943
- Parents:
- 1726b21
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
Kernel/Kernel-Ellipse.cpp
ra42fec0 rae7d639 1 __kernel void EllipsoidKernel(const real radius_a_weight, const real radius_b_weight, const real axis_theta_weight, 2 const real axis_phi_weight, const real scale, const real radius_a, const real radius_b, const real sub, const real axis_theta, const real axis_phi, __global const real *qx, 1 __kernel void EllipsoidKernel(const real radius_a_weight, const real radius_b_weight, 2 const real axis_theta_weight, 3 const real axis_phi_weight, const real scale, const real radius_a, const real radius_b, 4 const real sub, const real axis_theta, const real axis_phi, __global const real *qx, 3 5 __global const real *qy, __global real *_ptvalue, const int length, const int size) 4 6 { -
Models/code_cylinder_f.py
r1726b21 rae7d639 2 2 # -*- coding: utf-8 -*- 3 3 4 import sys 4 5 5 import ctypes 6 6 from ctypes import c_int, c_double, c_void_p … … 45 45 loops_b = cl.Buffer(ctx, mf.READ_ONLY | mf.COPY_HOST_PTR, hostbuf=loops) 46 46 loops_l = cl.LocalMemory(len(loops.data)) 47 47 48 self.prg.CylinderKernel(queue, self.qx.shape, None, 48 49 self.qx_b, self.qy_b, self.res_b, … … 51 52 real(pars['sldCyl']-pars['sldSolv']), 52 53 *[np.uint32(pn) for pn in loop_lengths]) 54 53 55 cl.enqueue_copy(queue, self.res, self.res_b) 54 56 print toc()*1000, self.qx.shape[0] … … 85 87 length.get_weights(pars['length'], 0, 10000, True), 86 88 theta.get_weights(pars['cyl_theta'], -np.inf, np.inf, False), 87 theta.get_weights(pars['cyl_phi'], -np.inf, np.inf, False),89 phi.get_weights(pars['cyl_phi'], -np.inf, np.inf, False), 88 90 ] 89 91 # Make sure that weights are normalized to peaks at 1 so that -
fit.py
r1726b21 rae7d639 8 8 from Models.code_cylinder_f import GpuCylinder 9 9 #from Models.code_cylinder import GpuCylinder, OneDGpuCylinder 10 from Models.code_ellipse import GpuEllipse10 from Models.code_ellipse_f import GpuEllipse 11 11 from Models.code_lamellar import GpuLamellar 12 12 from Models.code_triaxialellipse import GpuTriEllipse … … 31 31 32 32 33 if 0:33 if 1: 34 34 model = SasModel(data, GpuEllipse, 35 35 scale=0.08, … … 41 41 radius_a_pd=0.222296, radius_a_pd_n=1, radius_a_pd_nsigma=0, 42 42 radius_b_pd=.000128, radius_b_pd_n=1, radius_b_pd_nsigma=0, 43 axis_phi_pd=2.63698e-05, axis_phi_pd_n=20, axis_phi_pd_nsigma= 0,43 axis_phi_pd=2.63698e-05, axis_phi_pd_n=20, axis_phi_pd_nsigma=3, 44 44 dtype='float32') 45 45 46 46 47 47 # SET THE FITTING PARAMETERS 48 model.radius_a.range(15, 1000)49 model.radius_b.range(15, 1000)48 #model.radius_a.range(15, 1000) 49 #model.radius_b.range(15, 1000) 50 50 #model.axis_theta_pd.range(0, 360) 51 51 #model.background.range(0,1000) 52 #model.scale.range(0, 1)52 model.scale.range(0, 1) 53 53 54 54 … … 70 70 71 71 72 if 1:72 if 0: 73 73 """ 74 74 pars = dict(scale=0.0023, radius=92.5, length=798.3,
Note: See TracChangeset
for help on using the changeset viewer.