source: sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Testing_Data_Procs.ipf @ 993

Last change on this file since 993 was 993, checked in by srkline, 7 years ago

lots of changes to plotting of q-values, generating fake data with non-linear corrections, masking of data, etc.

File size: 2.2 KB
Line 
1#pragma TextEncoding = "MacRoman"
2#pragma rtGlobals=3             // Use modern global access method and strict wave access.
3
4
5// writes out "perfect" detector calibration constants for all 8 tube banks
6Function V_WritePerfectCalibration()
7
8        Make/O/D/N=(3,48) tmpCalib
9        // for the "tall" L/R banks
10        tmpCalib[0][] = -512
11        tmpCalib[1][] = 8
12        tmpCalib[2][] = 0
13       
14        V_writeDetTube_spatialCalib("","FR",tmpCalib)
15        V_writeDetTube_spatialCalib("","FL",tmpCalib)
16        V_writeDetTube_spatialCalib("","MR",tmpCalib)
17        V_writeDetTube_spatialCalib("","ML",tmpCalib)
18
19        // for the "short" T/B banks
20        tmpCalib[0][] = -256
21        tmpCalib[1][] = 4
22        tmpCalib[2][] = 0
23       
24        V_writeDetTube_spatialCalib("","FT",tmpCalib)
25        V_writeDetTube_spatialCalib("","FB",tmpCalib)
26        V_writeDetTube_spatialCalib("","MT",tmpCalib)
27        V_writeDetTube_spatialCalib("","MB",tmpCalib)
28       
29        KillWaves tmpCalib
30        return(0)
31end
32
33// TODO -- need a function to write out "bad" and "perfect" dead time values
34// to the HDF file
35//V_writeDetector_deadtime(fname,detStr,inW)
36//V_writeDetector_deadtime_B(fname,detStr,val)
37
38
39Function V_FakeBeamCenters()
40// fake beam center values
41        V_putDet_beam_center_x("RAW","B",75)
42        V_putDet_beam_center_y("RAW","B",75)
43
44        V_putDet_beam_center_x("RAW","MB",64)
45        V_putDet_beam_center_y("RAW","MB",55)
46        V_putDet_beam_center_x("RAW","MT",64)
47        V_putDet_beam_center_y("RAW","MT",-8.1)
48        V_putDet_beam_center_x("RAW","MR",-8.1)
49        V_putDet_beam_center_y("RAW","MR",64)
50        V_putDet_beam_center_x("RAW","ML",55)
51        V_putDet_beam_center_y("RAW","ML",64)
52
53        V_putDet_beam_center_x("RAW","FB",64)
54        V_putDet_beam_center_y("RAW","FB",55)
55        V_putDet_beam_center_x("RAW","FT",64)
56        V_putDet_beam_center_y("RAW","FT",-8.7)
57        V_putDet_beam_center_x("RAW","FR",-8.1)
58        V_putDet_beam_center_y("RAW","FR",64)
59        V_putDet_beam_center_x("RAW","FL",55)
60        V_putDet_beam_center_y("RAW","FL",64)
61       
62        return(0)
63end
64
65Function V_FakeScaleToCenter()
66
67        V_RescaleToBeamCenter("RAW","MB",64,55)
68        V_RescaleToBeamCenter("RAW","MT",64,-8.7)
69        V_RescaleToBeamCenter("RAW","MR",-8.1,64)
70        V_RescaleToBeamCenter("RAW","ML",55,64)
71        V_RescaleToBeamCenter("RAW","FL",55,64)
72        V_RescaleToBeamCenter("RAW","FR",-8.1,64)
73        V_RescaleToBeamCenter("RAW","FT",64,-8.7)
74        V_RescaleToBeamCenter("RAW","FB",64,55)
75       
76        return(0)
77End
Note: See TracBrowser for help on using the repository browser.