Changeset f5e226c9 in sasview for src/sas/sascalc


Ignore:
Timestamp:
Nov 10, 2016 10:40:33 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:
a01af35
Parents:
4581ac9
Message:

Correct implementation of fast SESANS fitting

File:
1 edited

Legend:

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

    r4581ac9 rf5e226c9  
    1313import logging 
    1414import sys 
     15import time 
    1516from sasmodels import sesans 
    1617 
     
    6566 
    6667    if _found_sesans == True: 
    67         #Pre-computing the Hankel matrix 
     68        #Pre-computing the Hankel matrix (H) 
     69 
    6870        Rmax = 1000000 
    6971        q_calc = sesans.make_q(data.sample.zacceptance, Rmax) 
     
    7173        dq = q_calc[1] - q_calc[0] 
    7274        H0 = dq / (2 * pi) * q_calc 
    73         H = dq / (2 * pi) * besselj(0, np.outer(q_calc, SElength)) 
    74  
     75        repSE, repq = np.meshgrid(SElength,q_calc) 
     76        hankelt=time.time() 
     77        H = dq / (2 * pi) * besselj(0, np.outer(q_calc, SElength))*repq 
     78        hankelt=time.time()-hankelt 
     79        print("Hankel transform took "+str(hankelt)+" s") 
    7580        return PySmear(SESANS1D(data, H0, H, q_calc), model) 
    7681 
Note: See TracChangeset for help on using the changeset viewer.