Ignore:
Timestamp:
Jun 10, 2011 2:21:46 PM (12 years ago)
Author:
srkline
Message:

partially complete version of the U_KIST_Utils.ipf. ManHo? will fill in the rest as needed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/U_KIST_Utils.ipf

    r807 r809  
    33#pragma IgorVersion=6.1 
    44 
     5// utilities and constants that are specific to the KIST USANS 
    56 
    6 ///point to the current version, so I can recognize old experiments 
    7 #include "USANS_Includes_v230" 
     7//facility-specific constants 
     8Function Init_USANS_Facility() 
     9 
     10        //INSTRUMENTAL CONSTANTS  
     11        Variable/G      root:Packages:NIST:USANS:Globals:MainPanel:gTheta_H = 3.9e-6            //Darwin FWHM   (pre- NOV 2004) 
     12        Variable/G      root:Packages:NIST:USANS:Globals:MainPanel:gTheta_V = 0.014             //Vertical divergence   (pre- NOV 2004) 
     13        //Variable/G  root:Globals:MainPanel:gDomega = 2.7e-7           //Solid angle of detector (pre- NOV 2004) 
     14        Variable/G      root:Packages:NIST:USANS:Globals:MainPanel:gDomega = 7.1e-7             //Solid angle of detector (NOV 2004) 
     15        Variable/G      root:Packages:NIST:USANS:Globals:MainPanel:gDefaultMCR= 1e6             //factor for normalization 
     16         
     17        //Variable/G  root:Globals:MainPanel:gDQv = 0.037               //divergence, in terms of Q (1/A) (pre- NOV 2004) 
     18        Variable/G      root:Packages:NIST:USANS:Globals:MainPanel:gDQv = 0.117         //divergence, in terms of Q (1/A)  (NOV 2004) 
     19 
     20        String/G root:Packages:NIST:gXMLLoader_Title="" 
     21         
     22        //November 2010 - deadtime corrections -- see USANS_DetectorDeadtime() below 
     23        //Only used in BT5_Loader.ipf and dependent on date, so defined there on each file load. 
     24         
     25         
     26        // to convert from angle (in degrees) to Q (in 1/Angstrom) 
     27        Variable/G root:Packages:NIST:USANS:Globals:MainPanel:deg2QConv=5.55e-5         //JGB -- 2/24/01 
     28         
     29        // extension string for the raw data files 
     30        // -- not that the extension as specified here starts with "." 
     31        String/G        root:Packages:NIST:USANS:Globals:MainPanel:gUExt = ".bt5" 
     32         
     33         
     34         
     35        return(0) 
     36end 
    837 
    938 
    10 ////************* 
    11 //// the list of files to include in the USANS reduction experiment 
    12 ////  - files must be located somewhere in the User Procedures folder 
    13 //// or sub-folders 
    14 //// 
     39// returns the detector dead time for the main detectors, and the transmission detector 
    1540// 
    16 //#include "BT5_Loader",version >= 2.20  
    17 //#include "COR_Graph",version >= 2.20                   
    18 //#include "Main_USANS",version >= 2.20  
    19 //#include "PlotUtilsMacro_v40",version >= 2.20 
    20 //#include "NIST_XML_v40" 
    21 //#include "USANS_SlitSmearing_v40"      
    22 //#include "WriteUSANSData",version >= 2.20      
    23 //#include "LakeDesmearing_JB",version >= 2.20   
    24 //#include "USANSCatNotebook",version >= 2.20    
    25 //#include "CheckVersionFTP"                            //added June 2008 
    26 //#include "GaussUtils_v40"                             //added Oct 2008 for unified file loading 
    27 //#include "BT5_AddFiles"                                       //Oct 2009 to add raw data files 
     41// NCNR values switch based on a date when hardware was swapped out. other facilities can ignore the date 
    2842// 
    29 //// USANS simulation and required procedures 
    30 //#include "U_CALC" 
    31 //#include "USANS_EmptyWaves" 
    32 //#include "MultScatter_MonteCarlo_2D" 
    33 //#include "SASCALC" 
    34 //#include "NCNR_DataReadWrite" 
    35 //#include "SANS_Utilities" 
    36 //#include "NCNR_Utils" 
    37 //#include "MultipleReduce" 
     43// also, if dead time is not known, zero can be returned to inactivate the dead time correction 
    3844// 
    39 ////AJJ for data set output? 
    40 ////#include "DataSetHandling" 
    41 ////#Include "WriteModelData_v40" 
     45// 
     46//Discovered significant deadtime on detectors in Oct 2010 
     47//JGB and AJJ changed pre-amps during shutdown Oct 27 - Nov 7 2010 
     48//Need different deadtime before and after 8th November 2010 
     49// 
     50Function USANS_DetectorDeadtime(filedt,MainDeadTime,TransDeadTime) 
     51        String filedt 
     52        Variable &MainDeadTime,&TransDeadTime 
     53         
     54//      if (BT5Date2Secs(filedt) < date2secs(2010,11,7)) 
     55//                      MainDeadTime = 4e-5 
     56//                      TransDeadTime = 1.26e-5 
     57//                      //print "Old Dead Times" 
     58//                      //MainDeadTime = 0 
     59//                      //TransDeadTime = 0 
     60//      else 
     61//                      MainDeadTime = 7e-6 
     62//                      TransDeadTime = 1.26e-5 
     63//                      //print "New Dead Times" 
     64//      endif 
     65         
     66        MainDeadTime = 0 
     67        TransDeadTime = 0 
     68 
     69 
     70        return(0) 
     71end 
Note: See TracChangeset for help on using the changeset viewer.