Changeset fd877f5 in sasmodels


Ignore:
Timestamp:
Dec 21, 2016 9:31:59 AM (7 years ago)
Author:
GitHub <noreply@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
64614ad
Parents:
f1ec7002 (diff), 91a7c2b (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.
git-author:
Jeff Krzywon <krzywon@…> (12/21/16 09:31:59)
git-committer:
GitHub <noreply@…> (12/21/16 09:31:59)
Message:

Merge pull request #22 from SasView?/ticket-811

Ticket 811

Location:
sasmodels
Files:
2 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) 
  • sasmodels/kernel_header.c

    r218cdbc rf1ec7002  
    148148inline double sinc(double x) { return x==0 ? 1.0 : sin(x)/x; } 
    149149 
    150 #if 0 
     150#if 1 
    151151#define ORIENT_SYMMETRIC(qx, qy, theta, phi, q, sn, cn) do { \ 
    152152    SINCOS(phi*M_PI_180, sn, cn); \ 
Note: See TracChangeset for help on using the changeset viewer.