Changeset 569


Ignore:
Timestamp:
10/09/09 12:55:13 (5 years ago)
Author:
srkline
Message:

Many changes to USANS to allow adding of raw bt5 files. Two sets can be added and used immediately (no save), or multiple data sets of the same range can be added and saved in bt5 format.

Still a first pass, needs checking and interface tweaks.

Location:
sans/Dev/trunk/NCNR_User_Procedures
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Analysis/Models/Models_2D/Sphere_2D_v40.ipf

    r515 r569  
    175175        Struct ResSmear_2D_AAOStruct &s 
    176176         
    177         Smear_2DModel_5(Sphere2D_noThread,s) 
     177//      Smear_2DModel_5(Sphere2D_noThread,s) 
     178        Smear_2DModel_20(Sphere2D_noThread,s) 
    178179        return(0) 
    179180end 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/BT5_Loader.ipf

    r540 r569  
    8383                        break                                                   // Hit blank line. End of data in the file. 
    8484                endif 
    85                 sscanf buffer,"%g%g%g",v1,v2,v3         //v2,v3 not used 
     85                sscanf buffer,"%g%g%g%g%g",v1,v2,v3,v4,v5               // 5 values here now 
    8686                angle[numlinesloaded] = v1              //[0] is the ANGLE 
    8787                 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/COR_Graph.ipf

    r564 r569  
    497497                fname = fpath + listw[ii] 
    498498                LoadBT5File(fname,"SWAP")       //overwrite what's in the SWAP folder 
    499                 Convert2Countrate("SWAP") 
     499                Convert2Countrate("SWAP",1) 
    500500                if(ii==0)       //first time, overwrite 
    501501                        NewDataWaves("SWAP",type) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/Main_USANS.ipf

    r564 r569  
    281281                 
    282282                LoadBT5File(fname,"SWAP")       //overwrite what's in the SWAP folder 
    283                 Convert2Countrate("SWAP") 
     283                Convert2Countrate("SWAP",1) 
    284284                if(ii==0)       //first time, overwrite 
    285285                        NewDataWaves("SWAP","EMP") 
     
    360360                                 
    361361                LoadBT5File(fname,"SWAP")       //overwrite what's in the SWAP folder 
    362                 Convert2Countrate("SWAP") 
     362                Convert2Countrate("SWAP",1) 
    363363                if(ii==0)       //first time, overwrite 
    364364                        NewDataWaves("SWAP","SAM") 
     
    418418// note that trans detector counts are NOT normalized to 1E6 mon cts (not necessary) 
    419419// 
    420 Function Convert2Countrate(type) 
     420Function Convert2Countrate(type,doNorm) 
    421421        String type 
     422        Variable doNorm 
    422423         
    423424        SVAR USANSFolder = root:Packages:NIST:USANS:Globals:gUSANSFolder 
     
    440441        //normalize to monitor countrate [=] counts/monitor 
    441442        //trans countrate does not need to be normalized 
    442         NVAR defaultMCR=$(USANSFolder+":Globals:MainPanel:gDefaultMCR")  
    443         DetCts /= monCts/defaultMCR 
    444         ErrDetCts /= MonCts/defaultMCR 
     443        if(doNorm) 
     444                NVAR defaultMCR=$(USANSFolder+":Globals:MainPanel:gDefaultMCR")  
     445                DetCts /= monCts/defaultMCR 
     446                ErrDetCts /= MonCts/defaultMCR 
     447        endif 
    445448         
    446449        //adjust the note (now on basis of 1 second) 
     
    821824// sorts the list to alphabetical order 
    822825// 
     826// modified to use the correct folder, switching on the control name (AddPanel added) 
     827// 
    823828Function RefreshListButtonProc(ctrlName) : ButtonControl 
    824829        String ctrlName 
     
    826831        SVAR USANSFolder = root:Packages:NIST:USANS:Globals:gUSANSFolder 
    827832 
    828         SVAR FilterStr = $(USANSFolder+":Globals:MainPanel:FilterStr") 
     833        String folderStr="" 
     834        if(cmpstr(ctrlName,"RefreshButton")==0) 
     835                //from MainUSANS panel 
     836                folderStr = "MainPanel" 
     837        else 
     838                folderStr = "AddPanel" 
     839        endif 
     840         
     841        SVAR FilterStr = $(USANSFolder+":Globals:"+folderStr+":FilterStr") 
    829842        print FilterStr 
    830843        String filter 
     
    860873        newList = SortList(newList,";",0)       //get them in order 
    861874        num=ItemsInList(newlist,";") 
    862         Wave/T fileWave = $(USANSFolder+":Globals:MainPanel:fileWave") 
    863         Wave selFileW = $(USANSFolder+":Globals:MainPanel:selFileW") 
     875        Wave/T fileWave = $(USANSFolder+":Globals:"+folderStr+":fileWave") 
     876        Wave selFileW = $(USANSFolder+":Globals:"+folderStr+":selFileW") 
    864877        Redimension/N=(num) fileWave 
    865878        Redimension/N=(num) selFileW 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/USANS_Includes.ipf

    r547 r569  
    2020#include "CheckVersionFTP"                              //added June 2008 
    2121#include "GaussUtils_v40"                               //added Oct 2008 for unified file loading 
     22#include "BT5_AddFiles"                                 //Oct 2009 to add raw data files 
    2223 
    2324// USANS simulation and required procedures 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/U_CALC.ipf

    r564 r569  
    5252Proc Show_UCALC() 
    5353 
    54         Init_UCALC() 
    5554        DoWindow/F UCALC 
    5655        if(V_Flag==0) 
     56                Init_UCALC() 
    5757                UCALC_Panel() 
    5858                CalcTotalCountTime() 
     
    444444        PopupMenu U_popup0,pos={left+20,205},size={165,20},proc=Sim_USANS_ModelPopMenuProc,title="Model" 
    445445        PopupMenu U_popup0,mode=1,value= #"U_FunctionPopupList()" 
    446         SetVariable setvar0,pos={left+20,279},size={120,15},title="Empty Level",disable=2 
    447         SetVariable setvar0,limits={0,10,0.01},value= root:Packages:NIST:USANS:Globals:U_Sim:g_EmptyLevel 
    448         SetVariable setvar0_1,pos={left+20,304},size={120,15},title="Bkg Level",disable=2 
    449         SetVariable setvar0_1,limits={0,10,0.01},value= root:Packages:NIST:USANS:Globals:U_Sim:g_BkgLevel 
     446         
     447        //unused as of yet, not sure I'll ever need these 
     448//      SetVariable setvar0,pos={left+20,279},size={120,15},title="Empty Level",disable=2 
     449//      SetVariable setvar0,limits={0,10,0.01},value= root:Packages:NIST:USANS:Globals:U_Sim:g_EmptyLevel 
     450//      SetVariable setvar0_1,pos={left+20,304},size={120,15},title="Bkg Level",disable=2 
     451//      SetVariable setvar0_1,limits={0,10,0.01},value= root:Packages:NIST:USANS:Globals:U_Sim:g_BkgLevel 
    450452         
    451453         
     
    807809                         
    808810                        // did not do this step 
    809                         //Convert2Countrate("SWAP") 
     811                        //Convert2Countrate("SWAP",1) 
    810812                        // 
    811813                         
Note: See TracChangeset for help on using the changeset viewer.