Changeset 2cdc35b in sasmodels for sasmodels/sesans.py


Ignore:
Timestamp:
Apr 11, 2017 9:44:18 AM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
costrafo411
Children:
2f9f1ec
Parents:
7c1cce3
Message:

provide working oriented/unoriented sesans examples

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/sesans.py

    r7c1cce3 r2cdc35b  
    4545        #import logging; logging.info("creating SESANS transform") 
    4646        self.q = z 
    47         # isoriented flag determines whether data is from an oriented sample or 
    48         # not, should be a selection variable upon entering SESANS data. 
    4947        self._set_hankel(SElength, zaccept, Rmax) 
    5048 
     
    105103        #import logging; logging.info("creating SESANS transform") 
    106104        self.q = z 
    107         # isoriented flag determines whether data is from an oriented sample or 
    108         # not, should be a selection variable upon entering SESANS data. 
    109105        self._set_cosmat(SElength, zaccept, Rmax) 
    110106 
     
    113109        Iq = np.reshape(Iq, self._Iq_shape) 
    114110        G0 = self._cos0 * np.sum(Iq) * dq 
    115         G = np.sum(np.dot(Iq, self._cosmat.T), axis=1) * dq 
     111        G = np.sum(np.dot(Iq, self._cosmat), axis=0) * dq 
    116112        P = G - G0 
    117113        return P 
     
    125121        q_max = 2 * pi / (SElength[1] - SElength[0]) 
    126122        q_min = 0.1 * 2 * pi / (np.size(SElength) * SElength[-1]) 
     123        q_min *= 100 
    127124 
    128125        q = np.arange(q_min, q_max, q_min, dtype='float32') 
     
    130127 
    131128        cos0 = np.float32(dq / (2 * pi)) 
    132         cosmat = np.float32(dq / (2 * pi)) * np.cos(q[:, None] * SE[None, :]) 
     129        cosmat = np.float32(dq / (2 * pi)) * np.cos(q[:, None] * SElength[None, :]) 
    133130 
    134131        qx, qy = np.meshgrid(q, q) 
Note: See TracChangeset for help on using the changeset viewer.