Ignore:
Timestamp:
Sep 27, 2013 4:59:01 PM (9 years ago)
Author:
srkline
Message:

Better colorization of Gizmo plots when real-space structures are generated with more than one SLD. Up to 5 different SLDs are colored (this is a voxelgram limit on Gizmo)

Simulation scripting was tweaked so that the examples can be configured and run from the menu once it is enabled.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/MC_SimulationScripting.ipf

    r921 r924  
    66//************ 
    77// un-comment the Macros menu declaration to provide easier access to the functions 
     8// -- remove the "x" from "xMenu" in the section following these comments.  The macros menu 
     9//    will then have easier access to the scripting functions. 
     10// 
     11// **To write your own scripts, follow the examples in: 
     12//              Example_1DSim() 
     13//              Example_2DSim() 
     14// 
     15// and also the instructions below in the "basic cycle" 
     16// 
    817//************ 
    918 
     
    112121// 
    113122// -- scattering from an empty cell is NOT provided in 2D 
    114  
     123// 
     124 
     125 
     126 
     127/// un-comment this by removing the "x" from the word xMenu. Then compile. 
    115128xMenu "Macros" 
    116129        Submenu "Simulation Scripting - Beta" 
     
    118131                "Move to Configuration",Sim_moveConfProc() 
    119132                "List Configurations",ListSASCALCConfigs() 
    120                 "Setup Sim Example",Setup_Sim_Example() 
    121133                "1D Count Rates",DryRunProc_1D() 
    122134                "2D Dry Run",DryRunProc_2D() 
     
    125137                "Combine by Name",DoCombineFiles_byName(lowQfile,medQfile,hiQfile,saveName) 
    126138                "Turn Off Dead Time Correction",Sim_SetDeadTimeTiny() 
     139                "-" 
     140                "Setup Sim Example",Setup_Sim_Example() 
     141                "Run 1D Sim Example",Example_1DSim() 
     142                "Run 2D Sim Example",Example_2DSim() 
    127143        End 
    128144End 
    129145 
    130 // run this before the examples to make sure that the proper named configurations exist. 
    131 // this function will overwrite any same-named waves 
     146 
     147////////// --- START OF EXAMPLE SCRIPTS ---  //////////////// 
     148 
     149// 
     150// run this before the examples to make sure that the proper named configurations and function exist. 
     151// this function will overwrite any same-named configurations 
     152// 
    132153Function Setup_Sim_Example() 
    133154 
     
    139160        Config_13m = {"checkNG7","1","5.08 cm","6","0.115","checkChamber","1/2\"","0","1300","0","","","","","","","","","",""} 
    140161   
     162// include the model and plot it, so that it will exist. Post to queue so they execute in order 
     163        Execute/P "INSERTINCLUDE \"SchulzSpheres_Sq_v40\"" 
     164        Execute/P "COMPILEPROCEDURES "  
     165        Execute/P "PlotSchulzSpheres_SC(256,0.001,0.7)" 
     166         
     167        Execute/P "SASCALC()" 
     168                                 
    141169        SetDataFolder root: 
    142170 
     
    305333        return(0)        
    306334End 
     335 
     336 
     337//////////////// ---- END OF EXAMPLE SCRIPTS --- //////////////////// 
    307338 
    308339 
Note: See TracChangeset for help on using the changeset viewer.