Changeset d522352 in sasmodels


Ignore:
Timestamp:
Mar 28, 2019 6:29:49 AM (5 years ago)
Author:
awashington
Branches:
master
Children:
0c7b8d8
Parents:
298d2d4
Message:

Divide by 2π, not multiply.

Also, the average of a and b is ½(a+b), not a+b. Hence (2 π)² is
about 39.2, the constant fact that I was off by.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/sesans.py

    r298d2d4 rd522352  
    7373        q = np.hstack([[0], q]) 
    7474 
    75         H0 = np.pi * (q[1:]**2 - q[:-1]**2) 
     75        H0 = (q[1:]**2 - q[:-1]**2) / (2 * np.pi) / 2 
    7676 
    7777        # repq = np.tile(q, (SElength.size, 1)).T 
     
    8080        H *= q.reshape((-1, 1)) 
    8181        H = H[1:] - H[:-1] 
    82         H *= 2 * np.pi / SElength 
     82        H /= 2 * np.pi * SElength 
    8383 
    8484        lam = np.asarray(lam, dtype=np.float32) 
Note: See TracChangeset for help on using the changeset viewer.