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

Last change on this file since 1033 was 962, checked in by srkline, 8 years ago

Updated KIST USANS Utils file from ManHo? which has the latest instrument constants for their instrument.

  • Property svn:executable set to *
File size: 3.7 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// contains updated instrument constants (MHK) 2014-06-20
8// added to NCNR SVN 9/2015 (SRK)
9
10//facility-specific constants
11Function Init_USANS_Facility()
12
13        //INSTRUMENTAL CONSTANTS
14        //Variable/G    root:Packages:NIST:USANS:Globals:MainPanel:gTheta_H = 3.9e-6            //Darwin FWHM   (pre- NOV 2004)
15        Variable/G      root:Packages:NIST:USANS:Globals:MainPanel:gTheta_H = 7.59e-6           //Horizontal divergence of kist-usans,  mhk--08/2102012
16        //Variable/G    root:Packages:NIST:USANS:Globals:MainPanel:gTheta_V = 0.014             //Vertical divergence   (pre- NOV 2004)
17        Variable/G      root:Packages:NIST:USANS:Globals:MainPanel:gTheta_V = 0.057    // KIST-USANS Vertical divergence =0.057 radian (2013) * (ÇÑŒö°æ ³ëÆ®ºÏ¿¡¿¡ 2014-06-20  Àû¿ë)
18        //Variable/G  root:Globals:MainPanel:gDomega = 2.7e-7           //Solid angle of detector (pre- NOV 2004)
19        //Variable/G    root:Packages:NIST:USANS:Globals:MainPanel:gDomega = 7.1e-7             //Solid angle of detector (NOV 2004)
20        Variable/G      root:Packages:NIST:USANS:Globals:MainPanel:gDomega = 1.73e-6            //KIST-USANS Solid angle of detector (mhk----07/18/2013) **(2014-06-20  Àû¿ë)
21        Variable/G      root:Packages:NIST:USANS:Globals:MainPanel:gDefaultMCR= 1e6             //factor for normalization
22       
23        //Variable/G  root:Globals:MainPanel:gDQv = 0.037               //divergence, in terms of Q (1/A) (pre- NOV 2004)
24        //Variable/G    root:Packages:NIST:USANS:Globals:MainPanel:gDQv = 0.117         //divergence, in terms of Q (1/A)  (NOV 2004)
25           Variable/G   root:Packages:NIST:USANS:Globals:MainPanel:gDQv = 0.09          //detector divergence, in terms of Q (1/A), mhk --09-12-2012
26       
27
28        String/G root:Packages:NIST:gXMLLoader_Title=""
29       
30        //November 2010 - deadtime corrections -- see USANS_DetectorDeadtime() below
31        //Only used in BT5_Loader.ipf and dependent on date, so defined there on each file load.
32       
33       
34        // to convert from angle (in degrees) to Q (in 1/Angstrom)
35        //Variable/G root:Packages:NIST:USANS:Globals:MainPanel:deg2QConv=5.55e-5               //JGB -- 2/24/01
36        // Variable/G root:Packages:NIST:USANS:Globals:MainPanel:deg2QConv=2.741557e-2          //motor position in degree unit MHK for KIST ---08/15/2012
37        Variable/G root:Packages:NIST:USANS:Globals:MainPanel:deg2QConv=1.5707963e-4    // motor position in mm (x100) MHK for KIST ---07/19/2013
38        // Variable/G root:Packages:NIST:USANS:Globals:MainPanel:deg2QConv=1.5707963e-2 // motor position in mm  MHK for KIST ---07/19/2013
39
40               
41        // extension string for the raw data files
42        // -- not that the extension as specified here starts with "."
43        // String/G     root:Packages:NIST:USANS:Globals:MainPanel:gUExt = ".bt5"
44            String/G    root:Packages:NIST:USANS:Globals:MainPanel:gUExt = ".kusan"     //mhk--08/15/2012
45       
46       
47       
48       
49        return(0)
50end
51
52
53// returns the detector dead time for the main detectors, and the transmission detector
54//
55// NCNR values switch based on a date when hardware was swapped out. other facilities can ignore the date
56//
57// also, if dead time is not known, zero can be returned to inactivate the dead time correction
58//
59//
60//Discovered significant deadtime on detectors in Oct 2010
61//JGB and AJJ changed pre-amps during shutdown Oct 27 - Nov 7 2010
62//Need different deadtime before and after 8th November 2010
63//
64Function USANS_DetectorDeadtime(filedt,MainDeadTime,TransDeadTime)
65        String filedt
66        Variable &MainDeadTime,&TransDeadTime
67       
68//      if (BT5Date2Secs(filedt) < date2secs(2010,11,7))
69//                      MainDeadTime = 4e-5
70//                      TransDeadTime = 1.26e-5
71//                      //print "Old Dead Times"
72//                      //MainDeadTime = 0
73//                      //TransDeadTime = 0
74//      else
75//                      MainDeadTime = 7e-6
76//                      TransDeadTime = 1.26e-5
77//                      //print "New Dead Times"
78//      endif
79       
80        MainDeadTime = 0
81        TransDeadTime = 0
82
83
84        return(0)
85end
Note: See TracBrowser for help on using the repository browser.