Changeset 91a7c2b in sasmodels


Ignore:
Timestamp:
Dec 20, 2016 8:18:40 AM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
3a45c2c
Parents:
7e94989 (diff), 84f3398 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into ticket-811

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/resolution2d.py

    r40a87fa r7e94989  
    6464        # just need q_calc and weights 
    6565        self.data = data 
    66         self.index = index 
    67  
    68         self.qx_data = data.qx_data[index] 
    69         self.qy_data = data.qy_data[index] 
    70         self.q_data = data.q_data[index] 
     66        self.index = index if index is not None else slice(None) 
     67 
     68        self.qx_data = data.qx_data[self.index] 
     69        self.qy_data = data.qy_data[self.index] 
     70        self.q_data = data.q_data[self.index] 
    7171 
    7272        dqx = getattr(data, 'dqx_data', None) 
     
    7474        if dqx is not None and dqy is not None: 
    7575            # Here dqx and dqy mean dq_parr and dq_perp 
    76             self.dqx_data = dqx[index] 
    77             self.dqy_data = dqy[index] 
     76            self.dqx_data = dqx[self.index] 
     77            self.dqy_data = dqy[self.index] 
    7878            ## Remove singular points if exists 
    7979            self.dqx_data[self.dqx_data < SIGMA_ZERO] = SIGMA_ZERO 
     
    126126        # The angle (phi) of the original q point 
    127127        q_phi = np.arctan(q_phi).repeat(nbins)\ 
    128             .reshape(nq, nbins).transpose().flatten() 
     128            .reshape([nq, nbins]).transpose().flatten() 
    129129        ## Find Gaussian weight for each dq bins: The weight depends only 
    130130        #  on r-direction (The integration may not need) 
Note: See TracChangeset for help on using the changeset viewer.