Changeset 8a21ba3 in sasmodels for code_capcyl.py


Ignore:
Timestamp:
Jul 11, 2014 1:40:30 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:
09e15be
Parents:
496b252
Message:

Fixed Ellipse code, update comparison file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code_capcyl.py

    r2de9a5e r8a21ba3  
    6666        sum, norm, norm_vol, vol = 0.0, 0.0, 0.0, 0.0 
    6767        size = len(theta.weight) 
    68         sub = pars['sld_capcyl']-np.float32(['sld_solv']) 
     68        sub = pars['sld_capcyl']-pars['sld_solv'] 
     69        real = np.float32 if self.qx.dtype == np.dtype('float32') else np.float64 
    6970 
    7071        for i in xrange(len(rad_cyl.weight)): 
     
    7576 
    7677                            self.prg.CapCylinderKernel(queue, self.qx.shape, None, self.qx_b, self.qy_b, self.res_b, 
    77                                         self.vol_b, np.float32(rad_cyl.value[i]), np.float32(rad_cap.value[m]), np.float32(length.value[j]), 
    78                                         np.float32(theta.value[k]), np.float32(phi.value[l]), np.float32(sub), np.float32(pars['scale']), 
    79                                         np.float32(phi.weight[l]), np.float32(theta.weight[k]), np.float32(rad_cap.weight[m]), 
    80                                         np.float32(rad_cyl.weight[i]), np.float32(length.weight[j]), np.uint32(self.qx.size), np.uint32(size), 
     78                                        self.vol_b, real(rad_cyl.value[i]), real(rad_cap.value[m]), real(length.value[j]), 
     79                                        real(theta.value[k]), real(phi.value[l]), real(sub), real(pars['scale']), 
     80                                        real(phi.weight[l]), real(theta.weight[k]), real(rad_cap.weight[m]), 
     81                                        real(rad_cyl.weight[i]), real(length.weight[j]), np.uint32(self.qx.size), np.uint32(size), 
    8182                                        self.Gauss76W_b, self.Gauss76Z_b) 
    8283 
Note: See TracChangeset for help on using the changeset viewer.