Changeset a42fec0 in sasmodels for multi-fit.py


Ignore:
Timestamp:
Aug 4, 2014 3:20:07 PM (10 years ago)
Author:
HMP1 <helen.park@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
8cdb9f1
Parents:
099e053
Message:

Speed-up of 3X, compare.py working

File:
1 edited

Legend:

Unmodified
Added
Removed
  • multi-fit.py

    rd772f5d ra42fec0  
    33 
    44from bumps.names import * 
    5 from code_lamellar import GpuLamellar 
    6 from code_ellipse import GpuEllipse 
     5from Models.code_lamellar import GpuLamellar 
     6from Models.code_ellipse import GpuEllipse 
     7from Models.code_cylinder import GpuCylinder 
    78from multisasmodels import SasModel, load_data, set_beam_stop, set_half 
    89import numpy as np 
    910 
    10 data = load_data('DEC07282.DAT') 
     11data = load_data('December/DEC07238.DAT') 
    1112set_beam_stop(data, 0.0052)#, outer=0.025) 
    1213#set_half(data, 'left') 
    1314 
    14 truth = SasModel(data, GpuEllipse, 
    15                 scale=.0011, radius_a=45.265, radius_b=600.8, sldEll=.291e-6, sldSolv=7.105e-6, 
    16                  background=8.30161, axis_theta=0, axis_phi=0, 
    17                  radius_a_pd=0.222296, radius_a_pd_n=1, radius_a_pd_nsigma=0, 
    18                  radius_b_pd=.000128, radius_b_pd_n=1, radius_b_pd_nsigma=0, 
    19                  axis_theta_pd=20, axis_theta_pd_n=40, axis_theta_pd_nsigma=3, 
    20                  axis_phi_pd=2.63698e-05, axis_phi_pd_n=20, axis_phi_pd_nsigma=0, 
    21                  dtype='float') 
     15truth = SasModel(data, GpuCylinder, 
     16scale=0.08, radius=46, length=719, 
     17sldCyl=.291e-6, sldSolv=5.77e-6, background=0, 
     18cyl_theta=90, cyl_phi=0, 
     19cyl_theta_pd=23, cyl_theta_pd_n=40, cyl_theta_pd_nsigma=3, 
     20radius_pd=0.1, radius_pd_n=10, radius_pd_nsigma=3, 
     21length_pd=0.1, length_pd_n=10, length_pd_nsigma=3, 
     22cyl_phi_pd=0.1, cyl_phi_pd_n=10, cyl_phi_pd_nsigma=3, 
     23dtype='float') 
     24 
    2225 
    2326#model.radius_a.range(15, 1000) 
     
    3033 
    3134 
    32 lies = SasModel(data, GpuLamellar, scale=0, bi_thick=5, sld_bi=.291e-6, sld_sol=5.77e-6, background=85.23, 
    33                  bi_thick_pd= 0.0013, bi_thick_pd_n=5, bi_thick_pd_nsigma=3, dtype='float') 
     35lies = SasModel(data, GpuCylinder, 
     36scale=0.08, radius=46, length=719, 
     37sldCyl=.291e-6, sldSolv=5.77e-6, background=0, 
     38cyl_theta=90, cyl_phi=0, 
     39cyl_theta_pd=23, cyl_theta_pd_n=40, cyl_theta_pd_nsigma=3, 
     40radius_pd=0.1, radius_pd_n=10, radius_pd_nsigma=3, 
     41length_pd=0.1, length_pd_n=10, length_pd_nsigma=3, 
     42cyl_phi_pd=0.1, cyl_phi_pd_n=10, cyl_phi_pd_nsigma=3, 
     43dtype='float') 
     44 
    3445 
    3546 
     
    4354 
    4455 
    45 a = np.add(np.multiply(arrayone, .5), np.multiply(arraytwo, 0)) 
     56a = np.add(np.multiply(arrayone, .08), np.multiply(arraytwo, .08)) 
    4657truth.set_result(a) 
    4758 
Note: See TracChangeset for help on using the changeset viewer.