Changeset 65ceb7d in sasmodels for sasmodels/sesans.py


Ignore:
Timestamp:
Sep 18, 2017 2:53:23 PM (7 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
costrafo411
Children:
3a45c2c
Parents:
2f9f1ec (diff), 058460c (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 costrafo411

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/sesans.py

    r2cdc35b r65ceb7d  
    4141    _H0 = None # type: np.ndarray 
    4242 
    43     def __init__(self, z, SElength, zaccept, Rmax): 
     43    def __init__(self, z, SElength, lam, zaccept, Rmax): 
    4444        # type: (np.ndarray, float, float) -> None 
    4545        #import logging; logging.info("creating SESANS transform") 
    4646        self.q = z 
    47         self._set_hankel(SElength, zaccept, Rmax) 
     47        self._set_hankel(SElength, lam, zaccept, Rmax) 
    4848 
    4949    def apply(self, Iq): 
     
    5353        return P 
    5454 
    55     def _set_hankel(self, SElength, zaccept, Rmax): 
     55    def _set_hankel(self, SElength, lam, zaccept, Rmax): 
    5656        # type: (np.ndarray, float, float) -> None 
    5757        # Force float32 arrays, otherwise run into memory problems on some machines 
     
    6969        repSE = np.tile(SElength, (q.size, 1)) 
    7070        H = np.float32(dq/(2*pi)) * j0(repSE*repq) * repq 
     71 
     72        replam = np.tile(lam, (q.size, 1)) 
     73        reptheta = np.arcsin(repq*replam/2*np.pi) 
     74        mask = reptheta > zaccept 
     75        H[mask] = 0 
    7176 
    7277        self.q_calc = q 
Note: See TracChangeset for help on using the changeset viewer.