Changes in / [cfd27dd:7b15990] in sasview


Ignore:
File:
1 edited

Legend:

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

    r235f514 rba91f71  
    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 
     
    1717 
    1818from sasmodels.resolution import Slit1D, Pinhole1D 
    19 from sasmodels.sesans import SesansTransform 
     19from sasmodels.sesans import SesansTransform, OrientedSesansTransform 
    2020from sasmodels.resolution2d import Pinhole2D 
    2121from .nxsunit import Converter 
     
    7474 
    7575        Rmax = 10000000 
    76         hankel = SesansTransform(data.x, SElength, 
    77                                  data.source.wavelength, 
    78                                  zaccept, Rmax) 
    7976        # Then return the actual transform, as if it were a smearing function 
    80         return PySmear(hankel, model, offset=0) 
     77        # data must have the isoriented flag here! 
     78        if getattr(data, 'isoriented', False): 
     79            costransform = OrientedSesansTransform(data.x, SElength, zaccept, Rmax) 
     80            return PySmear(costransform, model, offset=0) 
     81        else: 
     82            hankel = SesansTransform(data.x, SElength, 
     83                                     data.source.wavelength, zaccept, Rmax) 
     84            return PySmear(hankel, model, offset=0) 
    8185 
    8286    _found_resolution = False 
     
    138142        first_bin:last_bin set to the resolution smeared values. 
    139143        """ 
    140         if last_bin is None: last_bin = len(iq_in) 
    141         start, end = first_bin + self.offset, last_bin + self.offset 
    142144        q_calc = self.resolution.q_calc 
    143145        iq_calc = np.empty_like(q_calc) 
     
    251253            val = self.model.evalDistribution(q_calc) 
    252254            return val 
    253  
Note: See TracChangeset for help on using the changeset viewer.