Changeset 632e2e8 in sasview for src/sas/sascalc/data_util


Ignore:
Timestamp:
Nov 20, 2016 5:54:54 AM (8 years ago)
Author:
jhbakker
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:
1cad8a4
Parents:
a5b8253 (diff), 4466a6a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'Jurrian1D_optSESclass' into Jurrian1D_opt

File:
1 edited

Legend:

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

    ra5b8253 r632e2e8  
    1414import sys 
    1515from sasmodels import sesans 
    16  
    1716import numpy as np  # type: ignore 
    1817from numpy import pi, exp  # type: ignore 
    19 #from scipy.special import jv as besselj 
    2018 
    21 from sasmodels.resolution import Slit1D, Pinhole1D, SESANS1D 
     19from sasmodels.resolution import Slit1D, Pinhole1D 
     20from sasmodels.sesans import SESANS1D 
    2221from sasmodels.resolution2d import Pinhole2D 
    2322from src.sas.sascalc.data_util.nxsunit import Converter 
     
    6059    # TODO: change other sanity checks to check for file loader instead of data structure? 
    6160    _found_sesans = False 
    62     if data.dx is not None and data.meta_data['loader']=='SESANS': 
     61    #if data.dx is not None and data.meta_data['loader']=='SESANS': 
     62    if data.dx is not None and data.isSesans: 
    6363        if data.dx[0] > 0.0: 
    6464            _found_sesans = True 
     
    6666    if _found_sesans == True: 
    6767        #Pre-compute the Hankel matrix (H) 
    68         H0,H, q_calc = sesans.Hankelconstructor(data) 
     68        qmax, qunits = data.sample.zacceptance 
     69        hankel=sesans.SesansTransform() 
     70        sesans.SesansTransform.set_transform(hankel, 
     71        SE = Converter(data._xunit)(data.x, "A"), 
     72        zaccept = Converter(qunits)(qmax, "1/A"), 
     73        Rmax = 1000000) 
    6974        # Then return the actual transform, as if it were a smearing function 
    70         return PySmear(SESANS1D(data, H0, H, q_calc), model) 
     75        return PySmear(SESANS1D(data, hankel._H0, hankel._H, hankel.q), model) 
    7176 
    7277    _found_resolution = False 
Note: See TracChangeset for help on using the changeset viewer.