Ignore:
Timestamp:
Nov 13, 2007 7:39:05 AM (17 years ago)
Author:
Mathieu Doucet <doucetm@…>
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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
883a2ef
Parents:
5a2070e
Message:

Updated testing of 2D sim (made sure orientation was right)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansrealspace/src/realspace/test/early_test.py

    ra2c1196 rf980d4a  
    209209     
    210210    # Along Y 
    211     #ana.setParam('cyl_theta', 1.57) 
    212     #ana.setParam('cyl_phi', 1.57) 
     211    ana.setParam('cyl_theta', 1.57) 
     212    ana.setParam('cyl_phi', 1.57) 
    213213     
    214214    # Along Z 
    215     ana.setParam('cyl_theta', 0) 
    216     ana.setParam('cyl_phi', 0) 
     215    #ana.setParam('cyl_theta', 0) 
     216    #ana.setParam('cyl_phi', 0) 
    217217     
    218218    model = VolumeCanvas.VolumeCanvas()     
     
    226226     
    227227    # Along Y 
    228     #model.setParam('%s.orientation' % handle, [0,0,0]) 
     228    model.setParam('%s.orientation' % handle, [0,0,0]) 
    229229     
    230230    # Along Z 
    231     model.setParam('%s.orientation' % handle, [1.57,0,0]) 
    232      
    233      
    234     ana = ana.runXY([0.1, 0.01]) 
    235     sim = model.getIq2D(0.1, 0.01) 
     231    #model.setParam('%s.orientation' % handle, [1.57,0,0]) 
     232     
     233     
    236234    print model.npts 
    237     print ana, sim, sim/ana, ana/sim 
     235    for i in range(40): 
     236        qmax = 0.5 
     237        anaX = ana.runXY([qmax*i/40.0, 0.0]) 
     238        simX = model.getIq2D(qmax*i/40.0, 0.0) 
     239         
     240        anaY = ana.runXY([0, qmax*i/40.0]) 
     241        simY = model.getIq2D(0, qmax*i/40.0) 
     242        print anaX, simX, simX/anaX, '|', anaY, simY, simY/anaY 
    238243     
    239244def test_7(): 
     
    284289        print ana_val, sim_val, sim_val/ana_val, err, (sim_val-ana_val)/err 
    285290     
    286  
    287291     
    288292     
    289293if __name__ == "__main__": 
    290     test_7() 
     294    test_6() 
Note: See TracChangeset for help on using the changeset viewer.