Ignore:
Timestamp:
Sep 23, 2009 12:56:57 PM (13 years ago)
Author:
srkline
Message:

Added UCALC window to list of windows is package loader

Box Sum (from the marquee) asks for normalized (SAM) or RAW data

SASCALC uses real beamstop size rather than projected sizewhen doing simulation

Fake1DDataFolder() in MultiScatter_MonteCarlo ipf bug fixed where a bogus beamstop diameter (not 1"-4") would cause oddities in the resolution wave, and an (obviously) incorrect smearing of the simulation.

Fixed range 7 defaults in UCALC panel.

File:
1 edited

Legend:

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

    r551 r558  
    982982// data, to appear as if it was loaded from a real data file. 
    983983// 
    984 // currently only works with SANS data, but can later be expanded to generate fake USANS data sets 
    985 // ---- use FakeUSANSDataFolder() instead---- 
     984// ---- use FakeUSANSDataFolder() if you want to fake a 1D USANS data set ---- 
    986985// 
    987986Function        Fake1DDataFolder(qval,aveint,sigave,sigmaQ,qbar,fSubs,dataFolder) 
     
    1000999        Duplicate/O aveint, $(baseStr+"_i") 
    10011000        Duplicate/O sigave, $(baseStr+"_s") 
    1002 //      Duplicate/O sigmaQ, $(baseStr+"sq") 
    1003 //      Duplicate/O qbar, $(baseStr+"qb") 
    1004 //      Duplicate/O fSubS, $(baseStr+"fs") 
    1005  
    1006         // need to switch based on SANS/USANS 
    1007         if (isSANSResolution(sigave[0]))                //checks to see if the first point of the wave is <0] 
    1008                 // make a resolution matrix for SANS data 
    1009                 Variable np=numpnts(qval) 
    1010                 Make/D/O/N=(np,4) $(baseStr+"_res") 
    1011                 Wave res=$(baseStr+"_res") 
    1012                  
    1013                 res[][0] = sigmaQ[p]            //sigQ 
    1014                 res[][1] = qBar[p]              //qBar 
    1015                 res[][2] = fSubS[p]             //fShad 
    1016                 res[][3] = qval[p]              //Qvalues 
    1017                  
    1018                 // keep a copy of everything in SAS too... the smearing wrapper function looks for  
    1019                 // data in folders based on waves it is passed - an I lose control of that 
    1020                 Duplicate/O res, $("root:Packages:NIST:SAS:"+baseStr+"_res") 
    1021                 Duplicate/O qval,  $("root:Packages:NIST:SAS:"+baseStr+"_q") 
    1022                 Duplicate/O aveint,  $("root:Packages:NIST:SAS:"+baseStr+"_i") 
    1023                 Duplicate/O sigave,  $("root:Packages:NIST:SAS:"+baseStr+"_s") 
    1024         else 
    1025                 //the data is USANS data 
    1026                 // nothing done here yet 
    1027 //              dQv = -$w3[0] 
    1028                  
    1029 //              USANS_CalcWeights(baseStr,dQv) 
    1030                  
    1031         endif 
    1032  
     1001 
     1002 
     1003        // make a resolution matrix for SANS data 
     1004        Variable np=numpnts(qval) 
     1005        Make/D/O/N=(np,4) $(baseStr+"_res") 
     1006        Wave res=$(baseStr+"_res") 
     1007         
     1008        res[][0] = sigmaQ[p]            //sigQ 
     1009        res[][1] = qBar[p]              //qBar 
     1010        res[][2] = fSubS[p]             //fShad 
     1011        res[][3] = qval[p]              //Qvalues 
     1012         
     1013        // keep a copy of everything in SAS too... the smearing wrapper function looks for  
     1014        // data in folders based on waves it is passed - an I lose control of that 
     1015        Duplicate/O res, $("root:Packages:NIST:SAS:"+baseStr+"_res") 
     1016        Duplicate/O qval,  $("root:Packages:NIST:SAS:"+baseStr+"_q") 
     1017        Duplicate/O aveint,  $("root:Packages:NIST:SAS:"+baseStr+"_i") 
     1018        Duplicate/O sigave,  $("root:Packages:NIST:SAS:"+baseStr+"_s") 
     1019         
    10331020        //clean up               
    10341021        SetDataFolder root: 
Note: See TracChangeset for help on using the changeset viewer.