Ignore:
Timestamp:
Nov 19, 2013 9:50:29 AM (9 years ago)
Author:
srkline
Message:

Adding changes to the real space modeling that allow calculation of the USANS (slit-smeared) intensity from an anisotropic structure that has been generated using a real-space construction. The detector plane from the FFT result is converted to USANS, on absolute scale. Will be extended as it gets some use, but it is functional and is found from the "3D Examples" Macros submenu. Documentation is on the way too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/PlotManager/PlotUtils2D_v40.ipf

    r857 r925  
    310310End 
    311311 
    312 Proc FakeQxQy(minQx,maxQx,minQy,maxQy,numPix,dataFolder) 
     312// if flag set, data folder will be overwritten (only if it exists) 
     313// otherwise, the user will be asked what to do if there is a name conflict 
     314// 
     315Proc FakeQxQy(minQx,maxQx,minQy,maxQy,numPix,dataFolder,forceOverwrite,doPlot) 
    313316        Variable minQx=-0.1,maxQx=0.1,minQy=-0.1,maxQy=0.1 
    314317        Variable numPix=64 
    315318        String dataFolder="fake2DData" 
     319        Variable forceOverwrite = 0 
     320        Variable doPlot = 1 
    316321 
    317322        String baseStr=dataFolder 
    318323         
    319  
    320         if(DataFolderExists("root:"+baseStr)) 
     324        if(DataFolderExists("root:"+baseStr) && forceOverwrite) 
     325                SetDataFolder $("root:"+baseStr) 
     326        else 
     327                if(DataFolderExists("root:"+baseStr)) 
    321328                        DoAlert 1,"Fake data "+baseStr+" has already been created. Do you want to overwrite this fake data set?" 
    322329                        if(V_flag==2)   //user selected No, don't load the data 
     
    325332                        endif 
    326333                        SetDataFolder $("root:"+baseStr) 
    327         else 
    328                 NewDataFolder/S $("root:"+baseStr) 
     334                else 
     335                        NewDataFolder/S $("root:"+baseStr) 
     336                endif 
    329337        endif 
     338         
    330339 
    331340        Make/O/D/N=(numPix*numPix) $(baseStr+"_qx"),$(baseStr+"_qy"),$(baseStr+"_i") 
     
    362371        ConvertQxQy2Mat($(baseStr+"_qx"),$(baseStr+"_qy"),$(baseStr+"_i"),baseStr+"_mat") 
    363372        Duplicate/O $(baseStr+"_mat"),$(baseStr+"_lin")                 //keep a linear-scaled version of the data 
    364          
    365         PlotQxQy(baseStr)               //this sets the data folder back to root:!! 
    366  
     373 
     374        if(doPlot)       
     375                PlotQxQy(baseStr)               //this sets the data folder back to root:, but may not be executed 
     376        endif 
    367377        //clean up               
    368378        SetDataFolder root: 
Note: See TracChangeset for help on using the changeset viewer.