Changeset b297ba9 in sasmodels for sasmodels/models/line.py
- Timestamp:
- Mar 20, 2019 7:03:50 PM (5 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 4e28511
- Parents:
- 0d362b7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/line.py
r108e70e rb297ba9 58 58 59 59 60 def Iqxy(qx, qy, *args):60 def Iqxy(qx, qy, intercept, slope): 61 61 """ 62 62 :param qx: Input q_x-value 63 63 :param qy: Input q_y-value 64 :param args: Remaining arguments 64 :param intercept: Intrecept in linear model 65 :param slope: Slope in linear model 65 66 :return: 2D-Intensity 66 67 """ 67 68 # TODO: SasView documents 2D intensity as Iq(qx)*Iq(qy), but returns Iq(qy) 68 69 # Note: SasView.run([r, theta]) does return Iq(qx)*Iq(qy) 69 return Iq(qx, *args)*Iq(qy, *args)70 return Iq(qx, intercept, slope)*Iq(qy, intercept, slope) 70 71 71 72 Iqxy.vectorized = True # Iqxy accepts an array of qx qy values … … 80 81 81 82 def random(): 83 """Return a random parameter set for the model.""" 82 84 scale = 10**np.random.uniform(0, 3) 83 85 slope = np.random.uniform(-1, 1)*1e2
Note: See TracChangeset
for help on using the changeset viewer.