Changeset 44c0746 in sasview


Ignore:
Timestamp:
Oct 5, 2016 7:05:24 PM (8 years ago)
Author:
ajj
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
87b9447
Parents:
b9c94fa
Message:

interim commit to deal with git annoyance

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/data_util/qsmearing.py

    rf8aa738 r44c0746  
    55#This software was developed by the University of Tennessee as part of the 
    66#Distributed Data Analysis of Neutron Scattering Experiments (DANSE) 
    7 #project funded by the US National Science Foundation.  
     7#project funded by the US National Science Foundation. 
    88#See the license text in license.txt 
    99#copyright 2008, University of Tennessee 
     
    1616from sasmodels.resolution import Slit1D, Pinhole1D 
    1717from sasmodels.resolution2d import Pinhole2D 
     18from sasmodels import sesans 
    1819 
    1920def smear_selection(data, model = None): 
     
    8283    if _found_slit == True: 
    8384        return slit_smear(data, model) 
     85 
     86    # Look for sesans 
     87    _found_sesans = False 
     88    if data.hasattr(lam): 
     89        _found_sesans = True 
     90        logging.info("Found SESANS data!!") 
     91 
     92    # If we found sesans data, do the necessary jiggery pokery 
     93    if _found_sesans == True: 
     94        return sesans_smear(data, model) 
     95 
    8496    return None 
     97 
     98def sesans_smear(data, model=None): 
     99    q = sesans.make_q(data.sample.zacceptance, data.Rmax) 
     100    index = slice(None, None) 
     101    res = None 
     102    if data.y is not None: 
     103        Iq, dIq = data.y, data.dy 
     104    else: 
     105        Iq, dIq = None, None 
     106    #self._theory = np.zeros_like(q) 
     107    q_vectors = [q] 
     108    q_mono = sesans.make_all_q(data) 
     109    Iq = model.evalDistribution(q_mono) 
     110 
     111    return sesans.transform(data, q, Iq, 0, 0) 
    85112 
    86113 
Note: See TracChangeset for help on using the changeset viewer.