Changeset 1726b21 in sasmodels for Models/code_ellipse.py


Ignore:
Timestamp:
Aug 8, 2014 11:45:51 AM (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:
ae7d639
Parents:
8cdb9f1
Message:

cylinder now MUCH faster!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Models/code_ellipse.py

    ra42fec0 r1726b21  
    5353            for j in xrange(len(radius_b.weight)): 
    5454                #Average over theta distribution 
     55                vol += radius_a.weight[i]*radius_b.weight[j]*pow(radius_b.value[j], 2)*radius_a.value[i] 
     56                norm_vol += radius_a.weight[i]*radius_b.weight[j] 
     57 
    5558                for k in xrange(len(axis_theta.weight)): 
    5659                    #Average over phi distribution 
     
    6467                                        np.uint32(self.qx.size), np.uint32(len(axis_theta.weight))) 
    6568 
    66                         vol += radius_a.weight[i]*radius_b.weight[j]*pow(radius_b.value[j], 2)*radius_a.value[i] 
    67                         norm_vol += radius_a.weight[i]*radius_b.weight[j] 
    6869                        norm += radius_a.weight[i]*radius_b.weight[j]*axis_theta.weight[k]*axis_phi.weight[l] 
     70 
    6971        # Averaging in theta needs an extra normalization 
    7072        # factor to account for the sin(theta) term in the 
Note: See TracChangeset for help on using the changeset viewer.