Changeset 496b252 in sasmodels for code_coreshellcyl.py


Ignore:
Timestamp:
Jul 11, 2014 3:09:57 PM (10 years ago)
Author:
HMP1 <helen.park@…>
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:
8a21ba3
Parents:
be5d7df
Message:

core shell cylinder is fixed; float converted to real so is interchangeable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code_coreshellcyl.py

    r2de9a5e r496b252  
    5757        size = len(axis_theta.weight) 
    5858 
     59        real = np.float32 if self.qx.dtype == np.dtype('float32') else np.float64 
    5960        for i in xrange(len(radius.weight)): 
    6061            for j in xrange(len(length.weight)): 
     
    6465 
    6566                            self.prg.CoreShellCylinderKernel(queue, self.qx.shape, None, self.qx_b, self.qy_b, self.res_b, 
    66                                     np.float32(axis_theta.value[k]), np.float32(axis_phi.value[l]), np.float32(thickness.value[f]), 
    67                                     np.float32(length.value[j]), np.float32(radius.value[i]), np.float32(pars['scale']), 
    68                                     np.float32(radius.weight[i]), np.float32(length.weight[j]), np.float32(thickness.weight[f]), 
    69                                     np.float32(axis_theta.weight[k]), np.float32(axis_phi.weight[l]), np.float32(pars['core_sld']), 
    70                                     np.float32(pars['shell_sld']), np.float32(pars['solvent_sld']),np.uint32(size), 
     67                                    real(axis_theta.value[k]), real(axis_phi.value[l]), real(thickness.value[f]), 
     68                                    real(length.value[j]), real(radius.value[i]), real(pars['scale']), 
     69                                    real(radius.weight[i]), real(length.weight[j]), real(thickness.weight[f]), 
     70                                    real(axis_theta.weight[k]), real(axis_phi.weight[l]), real(pars['core_sld']), 
     71                                    real(pars['shell_sld']), real(pars['solvent_sld']),np.uint32(size), 
    7172                                    np.uint32(self.qx.size)) 
    7273                            cl.enqueue_copy(queue, self.res, self.res_b) 
Note: See TracChangeset for help on using the changeset viewer.