Changeset 04b0b30 in sasmodels
- Timestamp:
- Feb 18, 2016 1:13:00 PM (9 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 3eb6b90
- Parents:
- 8dd6914
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/models/peak_lorentz.py
r14ba6f6 r04b0b30 11 11 I(q) = \frac{scale}{\bigl(1+\bigl(\frac{q-q_0}{B}\bigr)^2\bigr)} + background 12 12 13 with the peak having height of $I_0$ centered at $q_0$ and having a HWHM (half-width half-maximum) of B. 13 with the peak having height of $I_0$ centered at $q_0$ and having 14 a HWHM (half-width half-maximum) of B. 14 15 15 16 For 2D data the scattering intensity is calculated in the same way as 1D, … … 55 56 56 57 def Iq(q, peak_pos, peak_hwhm): 58 """ 59 Return I(q) 60 """ 57 61 inten = (1/(1+((q-peak_pos)/peak_hwhm)**2)) 58 62 return inten … … 60 64 61 65 def Iqxy(qx, qy, *args): 66 """ 67 Return I(qx, qy) 68 """ 62 69 return Iq(sqrt(qx ** 2 + qy ** 2), *args) 63 70 Iqxy.vectorized = True # Iqxy accepts an array of qx, qy values
Note: See TracChangeset
for help on using the changeset viewer.