Changes in / [72a081d:f3d7abd] in sasmodels


Ignore:
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • example/sesansfit.py

    r4c1bfb3 rd459d4e  
    4242            dy = err_data 
    4343            sample = Sample() 
    44             needs_all_q = acceptance_angle is not None 
     44            has_no_finite_acceptance = acceptance_angle is not None 
    4545        data = SESANSData1D() 
    4646        data.acceptance_angle = acceptance_angle 
    4747 
    48     data.needs_all_q = acceptance_angle is not None 
     48    data.has_no_finite_acceptance = acceptance_angle is not None 
    4949    if "radius" in initial_vals: 
    5050        radius = initial_vals.get("radius") 
  • sasmodels/sesans.py

    ra06430c rd459d4e  
    11""" 
    2 Conversion of scattering cross section from SANS in absolute 
    3 units into SESANS using a Hankel transformation 
     2Conversion of scattering cross section from SANS (I(q), or rather, ds/dO) in absolute 
     3units (cm-1)into SESANS correlation function G using a Hankel transformation, then converting 
     4the SESANS correlation function into polarisation from the SESANS experiment 
    45 
    5 Everything is in units of metres except specified otherwise 
     6Everything is in units of metres except specified otherwise (NOT TRUE!!!) 
     7Everything is in conventional units (nm for spin echo length) 
    68 
    79Wim Bouwman (w.g.bouwman@tudelft.nl), June 2013 
     
    1820    r""" 
    1921    Return a $q$ vector suitable for SESANS covering from $2\pi/ (10 R_{\max})$ 
    20     to $q_max$. 
     22    to $q_max$. This is the integration range of the Hankel transform; bigger range and  
     23    more points makes a better numerical integration. 
     24    Smaller q_min will increase reliable spin echo length range.  
     25    Rmax is the "radius" of the largest expected object and can be set elsewhere. 
     26    q_max is determined by the acceptance angle of the SESANS instrument. 
    2127    """ 
    2228    q_min = dq = 0.1 * 2*pi / Rmax 
     
    2430     
    2531def make_all_q(data): 
    26     if not data.needs_all_q: 
     32    """ 
     33    Return a $q$ vector suitable for calculating the total scattering cross section for 
     34    calculating the effect of finite acceptance angles on Time of Flight SESANS instruments. 
     35    If no acceptance is given, or unwanted (set "unwanted" flag in paramfile), no all_q vector is needed. 
     36    If the instrument has a rectangular acceptance, 2 all_q vectors are needed. 
     37    If the instrument has a circular acceptance, 1 all_q vector is needed 
     38     
     39    """ 
     40    if not data.has_no_finite_acceptance: 
    2741        return [] 
    28     elif needs_Iqxy(data): 
     42    elif data.has_yz_acceptance(data): 
    2943        # compute qx, qy 
    3044        Qx, Qy = np.meshgrid(qx, qy) 
     
    3246    else: 
    3347        # else only need q 
     48        # data.has_z_acceptance 
    3449        return [q] 
    3550 
    3651def transform(data, q_calc, Iq_calc, qmono, Iq_mono): 
     52    """ 
     53    Decides which transform type is to be used, based on the experiment data file contents (header) 
     54    (2016-03-19: currently controlled from parameters script) 
     55    nqmono is the number of q vectors to be used for the detector integration 
     56    """ 
    3757    nqmono = len(qmono) 
    3858    if nqmono == 0: 
     
    6282                  q_calc, Iq_calc) 
    6383                   
    64 def Cosine2D(data, q_calc, Iq_calc, qx, qy, Iq_mono): 
     84def call_Cosine2D(data, q_calc, Iq_calc, qx, qy, Iq_mono): 
    6585    return hankel(data.x, data.y, data.lam * 1e-9, 
    6686                  data.sample.thickness / 10, 
Note: See TracChangeset for help on using the changeset viewer.