Changeset bc7ad41 in sasmodels


Ignore:
Timestamp:
Feb 2, 2017 8:13:52 AM (8 years ago)
Author:
jhbakker
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
94d13f1
Parents:
2f8ee5f
Message:

Moved test data, Hankel matrices no longer private variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/sesans.py

    r54f1d96 rbc7ad41  
    2828 
    2929    # transform arrays 
    30     _H = None  # type: np.ndarray 
    31     _H0 = None # type: np.ndarray 
     30    H = None  # type: np.ndarray 
     31    H0 = None # type: np.ndarray 
    3232 
    33     def set_transform(self, SE, zaccept, Rmax): 
     33    def __init__(self, SE, zaccept, Rmax): 
    3434        if self.SE is None or len(SE) != len(self.SE) or np.any(SE != self.SE) or zaccept != self.zaccept or Rmax != self.Rmax: 
    3535            self.SE, self.zaccept, self.Rmax = SE, zaccept, Rmax 
     
    3838 
    3939    def apply(self, Iq): 
    40         G0 = np.dot(self._H0, Iq) 
    41         G = np.dot(self._H.T, Iq) 
     40        G0 = np.dot(self.H0, Iq) 
     41        G = np.dot(self.H.T, Iq) 
    4242        P = G - G0 
    4343        return P 
     
    7676        #H = dq / (2 * pi) * j0(repSE*repq)*repq 
    7777 
    78         self._H, self._H0 = H, H0 
     78        self.H, self.H0 = H, H0 
    7979 
    8080class SESANS1D(SesansTransform): 
    81     def __init__(self, data, _H0, _H, q_calc): 
     81    def __init__(self, data, H0, H, q_calc): 
    8282        # x values of the data (Sasview requires these to be named "q") 
    8383        self.q = data.x 
    84         self._H0 = _H0 
    85         self._H = _H 
     84        self.H0 = H0 
     85        self.H = H 
    8686        # Pysmear does some checks on the smearer object, these checks require the "data" object... 
    8787        self.data=data 
Note: See TracChangeset for help on using the changeset viewer.