source: sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/KIST_USANS_Utils.ipf @ 910

Last change on this file since 910 was 903, checked in by srkline, 10 years ago

minor changes to the MC scripting, more examples of looping to generate long "runs"

Modified the NCNR loader (Macros menu) to include different facility packages, hopefully exclusive. Will need final tweaking once we settle on file names.

For the USANS procedures from KIST - changed the names to have "KIST_" prefix, and changed NCNR-specific to have "NCNR_" prefix, and I'll do the same with the SANS reduction procedures. Then all will be consistent, and each set of facility-specific files will be grouped in a directory listing.

  • Property svn:executable set to *
File size: 2.8 KB
Line 
1#pragma rtGlobals=1             // Use modern global access method.
2#pragma version=2.20
3#pragma IgorVersion=6.1
4
5// utilities and constants that are specific to the KIST USANS
6
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_H = 7.59e-6           //Horizontal Divergence mhk -- 08/21/2012       
13        Variable/G      root:Packages:NIST:USANS:Globals:MainPanel:gTheta_V = 0.014             //Vertical divergence   (pre- NOV 2004)
14        //Variable/G  root:Globals:MainPanel:gDomega = 2.7e-7           //Solid angle of detector (pre- NOV 2004)
15        Variable/G      root:Packages:NIST:USANS:Globals:MainPanel:gDomega = 7.1e-7             //Solid angle of detector (NOV 2004)
16        Variable/G      root:Packages:NIST:USANS:Globals:MainPanel:gDefaultMCR= 1e6             //factor for normalization
17       
18        //Variable/G  root:Globals:MainPanel:gDQv = 0.037               //divergence, in terms of Q (1/A) (pre- NOV 2004)
19        Variable/G      root:Packages:NIST:USANS:Globals:MainPanel:gDQv = 0.117         //divergence, in terms of Q (1/A)  (NOV 2004)
20
21        String/G root:Packages:NIST:gXMLLoader_Title=""
22       
23        //November 2010 - deadtime corrections -- see USANS_DetectorDeadtime() below
24        //Only used in BT5_Loader.ipf and dependent on date, so defined there on each file load.
25       
26       
27        // to convert from angle (in degrees) to Q (in 1/Angstrom)
28         // Variable/G root:Packages:NIST:USANS:Globals:MainPanel:deg2QConv=5.55e-5             //JGB -- 2/24/01
29             Variable/G root:Packages:NIST:USANS:Globals:MainPanel:deg2QConv=2.741557e-2         // *** for KIST-USANS, mhk -- 08/15/2012***   
30        // extension string for the raw data files
31        // -- not that the extension as specified here starts with "."
32        //String/G      root:Packages:NIST:USANS:Globals:MainPanel:gUExt = ".bt5"
33           String/G     root:Packages:NIST:USANS:Globals:MainPanel:gUExt = ".kusan"    // mhk -- 08/15/212     
34       
35       
36       
37        return(0)
38end
39
40
41// returns the detector dead time for the main detectors, and the transmission detector
42//
43// NCNR values switch based on a date when hardware was swapped out. other facilities can ignore the date
44//
45// also, if dead time is not known, zero can be returned to inactivate the dead time correction
46//
47//
48//Discovered significant deadtime on detectors in Oct 2010
49//JGB and AJJ changed pre-amps during shutdown Oct 27 - Nov 7 2010
50//Need different deadtime before and after 8th November 2010
51//
52Function USANS_DetectorDeadtime(filedt,MainDeadTime,TransDeadTime)
53        String filedt
54        Variable &MainDeadTime,&TransDeadTime
55       
56//      if (BT5Date2Secs(filedt) < date2secs(2010,11,7))
57//                      MainDeadTime = 4e-5
58//                      TransDeadTime = 1.26e-5
59//                      //print "Old Dead Times"
60//                      //MainDeadTime = 0
61//                      //TransDeadTime = 0
62//      else
63//                      MainDeadTime = 7e-6
64//                      TransDeadTime = 1.26e-5
65//                      //print "New Dead Times"
66//      endif
67       
68        MainDeadTime = 0
69        TransDeadTime = 0
70
71
72        return(0)
73end
Note: See TracBrowser for help on using the repository browser.