Changeset 961 for sans/Dev/trunk/NCNR_User_Procedures/Reduction
- Timestamp:
- Aug 18, 2015 11:14:00 AM (7 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/RectAnnulAvg.ipf
r902 r961 192 192 //and distance off-line (d_per) and if in forward direction 193 193 par = 0 //initialize the wave 194 forward = distance(dxx,dyy,phi_x,phi_y,par)194 forward = s_distance(dxx,dyy,phi_x,phi_y,par) 195 195 d_per = par[0] 196 196 d_pll = par[1] … … 407 407 // forward (truth) is the function return value 408 408 // 409 Function distance(dxx,dyy,phi_x,phi_y,par)409 Function s_distance(dxx,dyy,phi_x,phi_y,par) 410 410 Variable dxx,dyy,phi_x,phi_y 411 411 Wave par //par[0] = d_per -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/Nexus_VSANS_Write.ipf
r960 r961 25 25 26 26 27 // TODO 28 // get Paul K to write out 2D data sets, rather than 3D (not appropriate for SANS or VSANS) 29 // 30 31 ///// 32 /// to get "useable" data out of the 3D wave (incorrectly written) 33 // Redimension/N=(1,320,320) root:V_Nexus_Template:entry:entry1:instrument:detector_B:data 34 // root:V_Nexus_Template:entry:entry1:instrument:detector_B:data[0][][] = root:Packages:NIST:VSANS:VCALC:Back:det_B[q][r] 35 // root:V_Nexus_Template:entry:entry1:instrument:detector_B:distance = VCALC_getSDD("B") 36 37 27 38 28 39 // 29 40 // A "template" VSANS Nexus file has been loaded and is then filled in with 30 // the simulation results. Some of t eh file, will thereforbe garbage, but the41 // the simulation results. Some of the file, will therefore be garbage, but the 31 42 // overall structure and attributes should be correct. 32 43 // … … 47 58 Proc H_Fill_VSANS_Template_wSim() 48 59 49 // root:sans9:entry:entry1:instrument:beam:monochromator:wavelength 60 61 root:V_Nexus_Template:entry:entry1:instrument:beam:monochromator:wavelength = VCALC_getWavelength() 50 62 51 SetDataFolder root:VSANS_file:entry1:instrument52 SetDataFolder root:VSANS_file:entry1:instrument:monochromator53 wavelength = VCALC_getWavelength()54 SetDataFolder root:VSANS_file:entry1:instrument:monochromator:velocity_selector55 wavelength = VCALC_getWavelength()56 // table (wave)57 SetDataFolder root:VSANS_file:entry1:instrument:monochromator:crystal58 wavelength = VCALC_getWavelength()59 60 SetDataFolder root:VSANS_file:entry1:instrument:monochromator:white_beam61 wavelength = VCALC_getWavelength()62 // description_of_distribution63 // SetDataFolder root:VSANS_file:entry1:instrument 64 // SetDataFolder root:VSANS_file:entry1:instrument:monochromator 65 // wavelength = VCALC_getWavelength() 66 // SetDataFolder root:VSANS_file:entry1:instrument:monochromator:velocity_selector 67 // wavelength = VCALC_getWavelength() 68 // // table (wave) 69 // SetDataFolder root:VSANS_file:entry1:instrument:monochromator:crystal 70 // wavelength = VCALC_getWavelength() 71 // 72 // SetDataFolder root:VSANS_file:entry1:instrument:monochromator:white_beam 73 // wavelength = VCALC_getWavelength() 74 // // description_of_distribution 63 75 64 76 65 66 SetDataFolder root:VSANS_file:entry1:instrument:detector_B67 data = root:Packages:NIST:VSANS:VCALC:Back:det_B68 nx_distance = VCALC_getSDD("B") 69 70 SetDataFolder root:VSANS_file:entry1:instrument:detector_MR71 data = root:Packages:NIST:VSANS:VCALC:Middle:det_MR72 nx_distance = VCALC_getSDD("MR")73 separation = VCALC_getPanelSeparation("MR")74 spatial_calibration[0][] = 1.07275 spatial_calibration[1][] = -4.0e-576 77 SetDataFolder root:VSANS_file:entry1:instrument:detector_ML78 data = root:Packages:NIST:VSANS:VCALC:Middle:det_ML79 nx_distance = VCALC_getSDD("ML")80 separation = VCALC_getPanelSeparation("ML")81 spatial_calibration[0][] = 1.07282 spatial_calibration[1][] = -4.0e-583 84 SetDataFolder root:VSANS_file:entry1:instrument:detector_MT85 data = root:Packages:NIST:VSANS:VCALC:Middle:det_MT86 nx_distance = VCALC_getSDD("MT")87 sdd_offset = VCALC_getTopBottomSDDOffset("MT")88 separation = VCALC_getPanelSeparation("MT")89 spatial_calibration[0][] = 1.07290 spatial_calibration[1][] = -4.0e-591 92 SetDataFolder root:VSANS_file:entry1:instrument:detector_MB93 data = root:Packages:NIST:VSANS:VCALC:Middle:det_MB94 nx_distance = VCALC_getSDD("MB")95 sdd_offset = VCALC_getTopBottomSDDOffset("MB")96 separation = VCALC_getPanelSeparation("MB")97 spatial_calibration[0][] = 1.07298 spatial_calibration[1][] = -4.0e-599 100 SetDataFolder root:VSANS_file:entry1:instrument:detector_FR101 data = root:Packages:NIST:VSANS:VCALC:Front:det_FR102 nx_distance = VCALC_getSDD("FR")103 separation = VCALC_getPanelSeparation("FR")104 spatial_calibration[0][] = 1.072105 spatial_calibration[1][] = -4.0e-5106 107 SetDataFolder root:VSANS_file:entry1:instrument:detector_FL108 data = root:Packages:NIST:VSANS:VCALC:Front:det_FL109 nx_distance = VCALC_getSDD("FL")110 separation = VCALC_getPanelSeparation("FL")111 spatial_calibration[0][] = 1.072112 spatial_calibration[1][] = -4.0e-5113 114 SetDataFolder root:VSANS_file:entry1:instrument:detector_FT115 data = root:Packages:NIST:VSANS:VCALC:Front:det_FT116 nx_distance = VCALC_getSDD("FT")117 sdd_offset = VCALC_getTopBottomSDDOffset("FT")118 separation = VCALC_getPanelSeparation("FT")119 spatial_calibration[0][] = 1.072120 spatial_calibration[1][] = -4.0e-5121 122 SetDataFolder root:VSANS_file:entry1:instrument:detector_FB123 data = root:Packages:NIST:VSANS:VCALC:Front:det_FB124 nx_distance = VCALC_getSDD("FB")125 sdd_offset = VCALC_getTopBottomSDDOffset("FB")126 separation = VCALC_getPanelSeparation("FB")127 spatial_calibration[0][] = 1.072128 spatial_calibration[1][] = -4.0e-5129 130 131 // SRK -set the top level copies of the data132 SetDataFolder root:VSANS_file:entry1:data_B133 data = root:Packages:NIST:VSANS:VCALC:Back:det_B134 135 SetDataFolder root:VSANS_file:entry1:data_MR136 data = root:Packages:NIST:VSANS:VCALC:Middle:det_MR137 138 SetDataFolder root:VSANS_file:entry1:data_ML139 data = root:Packages:NIST:VSANS:VCALC:Middle:det_ML140 141 SetDataFolder root:VSANS_file:entry1:data_MT142 data = root:Packages:NIST:VSANS:VCALC:Middle:det_MT143 data = (data == 2147483647) ? 0 : data //the NaN "mask" in the sim data shows up as an ugly integer144 145 SetDataFolder root:VSANS_file:entry1:data_MB146 data = root:Packages:NIST:VSANS:VCALC:Middle:det_MB147 data = (data == 2147483647) ? 0 : data //the NaN "mask" in the sim data shows up as an ugly integer148 149 SetDataFolder root:VSANS_file:entry1:data_FR150 data = root:Packages:NIST:VSANS:VCALC:Front:det_FR151 152 SetDataFolder root:VSANS_file:entry1:data_FL153 data = root:Packages:NIST:VSANS:VCALC:Front:det_FL154 155 SetDataFolder root:VSANS_file:entry1:data_FT156 data = root:Packages:NIST:VSANS:VCALC:Front:det_FT157 data = (data == 2147483647) ? 0 : data //the NaN "mask" in the sim data shows up as an ugly integer158 159 SetDataFolder root:VSANS_file:entry1:data_FB160 data = root:Packages:NIST:VSANS:VCALC:Front:det_FB161 data = (data == 2147483647) ? 0 : data //the NaN "mask" in the sim data shows up as an ugly integer162 163 164 // SetDataFolder root:VSANS_file:entry1:reduction165 // intent = "SCATTER"166 // transmission_file_name = "SANSFile_TRN.h5"167 // empty_beam_file_name = "SANSFile_EB.h5"168 // background_file_name = "SANSFile_BKG.h5"169 // empty_file_name = "SANSFile_EMP.h5"170 // sensitivity_file_name = "SANSFile_DIV.h5"171 // mask_file_name = "SANSFile_MASK.h5"172 // sans_log_file_name = "SANSFile_log.txt"173 // whole_trans = 0.888174 // whole_trans_error = 0.008175 // box_count = 23232176 // box_count_error = 22177 // box_coordinates = {50,80,45,75}178 // comments = "extra data comments"179 // absolute_scaling = {1,1,1e5,1}180 // SetDataFolder root:VSANS_file:entry1:reduction:pol_sans181 // pol_sans_purpose = "name from the list"182 // cell_name = "Burgundy"183 // cell_parameters = {1,2,3,4,5}184 77 Redimension/N=(1,320,320) root:V_Nexus_Template:entry:entry1:instrument:detector_B:data 78 root:V_Nexus_Template:entry:entry1:instrument:detector_B:data[0][][] = root:Packages:NIST:VSANS:VCALC:Back:det_B[q][r] 79 root:V_Nexus_Template:entry:entry1:instrument:detector_B:distance = VCALC_getSDD("B") 80 81 // 82 // SetDataFolder root:VSANS_file:entry1:instrument:detector_MR 83 // data = root:Packages:NIST:VSANS:VCALC:Middle:det_MR 84 // nx_distance = VCALC_getSDD("MR") 85 // separation = VCALC_getPanelSeparation("MR") 86 // spatial_calibration[0][] = 1.072 87 // spatial_calibration[1][] = -4.0e-5 88 // 89 // SetDataFolder root:VSANS_file:entry1:instrument:detector_ML 90 // data = root:Packages:NIST:VSANS:VCALC:Middle:det_ML 91 // nx_distance = VCALC_getSDD("ML") 92 // separation = VCALC_getPanelSeparation("ML") 93 // spatial_calibration[0][] = 1.072 94 // spatial_calibration[1][] = -4.0e-5 95 // 96 // SetDataFolder root:VSANS_file:entry1:instrument:detector_MT 97 // data = root:Packages:NIST:VSANS:VCALC:Middle:det_MT 98 // nx_distance = VCALC_getSDD("MT") 99 // sdd_offset = VCALC_getTopBottomSDDOffset("MT") 100 // separation = VCALC_getPanelSeparation("MT") 101 // spatial_calibration[0][] = 1.072 102 // spatial_calibration[1][] = -4.0e-5 103 // 104 // SetDataFolder root:VSANS_file:entry1:instrument:detector_MB 105 // data = root:Packages:NIST:VSANS:VCALC:Middle:det_MB 106 // nx_distance = VCALC_getSDD("MB") 107 // sdd_offset = VCALC_getTopBottomSDDOffset("MB") 108 // separation = VCALC_getPanelSeparation("MB") 109 // spatial_calibration[0][] = 1.072 110 // spatial_calibration[1][] = -4.0e-5 111 // 112 // SetDataFolder root:VSANS_file:entry1:instrument:detector_FR 113 // data = root:Packages:NIST:VSANS:VCALC:Front:det_FR 114 // nx_distance = VCALC_getSDD("FR") 115 // separation = VCALC_getPanelSeparation("FR") 116 // spatial_calibration[0][] = 1.072 117 // spatial_calibration[1][] = -4.0e-5 118 // 119 // SetDataFolder root:VSANS_file:entry1:instrument:detector_FL 120 // data = root:Packages:NIST:VSANS:VCALC:Front:det_FL 121 // nx_distance = VCALC_getSDD("FL") 122 // separation = VCALC_getPanelSeparation("FL") 123 // spatial_calibration[0][] = 1.072 124 // spatial_calibration[1][] = -4.0e-5 125 // 126 // SetDataFolder root:VSANS_file:entry1:instrument:detector_FT 127 // data = root:Packages:NIST:VSANS:VCALC:Front:det_FT 128 // nx_distance = VCALC_getSDD("FT") 129 // sdd_offset = VCALC_getTopBottomSDDOffset("FT") 130 // separation = VCALC_getPanelSeparation("FT") 131 // spatial_calibration[0][] = 1.072 132 // spatial_calibration[1][] = -4.0e-5 133 // 134 // SetDataFolder root:VSANS_file:entry1:instrument:detector_FB 135 // data = root:Packages:NIST:VSANS:VCALC:Front:det_FB 136 // nx_distance = VCALC_getSDD("FB") 137 // sdd_offset = VCALC_getTopBottomSDDOffset("FB") 138 // separation = VCALC_getPanelSeparation("FB") 139 // spatial_calibration[0][] = 1.072 140 // spatial_calibration[1][] = -4.0e-5 141 // 142 // 143 //// SRK -set the top level copies of the data 144 // SetDataFolder root:VSANS_file:entry1:data_B 145 // data = root:Packages:NIST:VSANS:VCALC:Back:det_B 146 // 147 // SetDataFolder root:VSANS_file:entry1:data_MR 148 // data = root:Packages:NIST:VSANS:VCALC:Middle:det_MR 149 // 150 // SetDataFolder root:VSANS_file:entry1:data_ML 151 // data = root:Packages:NIST:VSANS:VCALC:Middle:det_ML 152 // 153 // SetDataFolder root:VSANS_file:entry1:data_MT 154 // data = root:Packages:NIST:VSANS:VCALC:Middle:det_MT 155 // data = (data == 2147483647) ? 0 : data //the NaN "mask" in the sim data shows up as an ugly integer 156 // 157 // SetDataFolder root:VSANS_file:entry1:data_MB 158 // data = root:Packages:NIST:VSANS:VCALC:Middle:det_MB 159 // data = (data == 2147483647) ? 0 : data //the NaN "mask" in the sim data shows up as an ugly integer 160 // 161 // SetDataFolder root:VSANS_file:entry1:data_FR 162 // data = root:Packages:NIST:VSANS:VCALC:Front:det_FR 163 // 164 // SetDataFolder root:VSANS_file:entry1:data_FL 165 // data = root:Packages:NIST:VSANS:VCALC:Front:det_FL 166 // 167 // SetDataFolder root:VSANS_file:entry1:data_FT 168 // data = root:Packages:NIST:VSANS:VCALC:Front:det_FT 169 // data = (data == 2147483647) ? 0 : data //the NaN "mask" in the sim data shows up as an ugly integer 170 // 171 // SetDataFolder root:VSANS_file:entry1:data_FB 172 // data = root:Packages:NIST:VSANS:VCALC:Front:det_FB 173 // data = (data == 2147483647) ? 0 : data //the NaN "mask" in the sim data shows up as an ugly integer 174 // 175 // 176 //// SetDataFolder root:VSANS_file:entry1:reduction 177 //// intent = "SCATTER" 178 //// transmission_file_name = "SANSFile_TRN.h5" 179 //// empty_beam_file_name = "SANSFile_EB.h5" 180 //// background_file_name = "SANSFile_BKG.h5" 181 //// empty_file_name = "SANSFile_EMP.h5" 182 //// sensitivity_file_name = "SANSFile_DIV.h5" 183 //// mask_file_name = "SANSFile_MASK.h5" 184 //// sans_log_file_name = "SANSFile_log.txt" 185 //// whole_trans = 0.888 186 //// whole_trans_error = 0.008 187 //// box_count = 23232 188 //// box_count_error = 22 189 //// box_coordinates = {50,80,45,75} 190 //// comments = "extra data comments" 191 //// absolute_scaling = {1,1,1e5,1} 192 //// SetDataFolder root:VSANS_file:entry1:reduction:pol_sans 193 //// pol_sans_purpose = "name from the list" 194 //// cell_name = "Burgundy" 195 //// cell_parameters = {1,2,3,4,5} 196 // 185 197 186 198 SetDataFolder root: -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_HDF5_VSANS_Utils.ipf
r960 r961 47 47 Macro Load_Nexus_V_Template() 48 48 H_HDF5Gate_Read_Raw("") 49 String tmpStr=root:file_name //SRK - so I can get the file name 49 String tmpStr=root:file_name //SRK - so I can get the file name that was loaded 50 50 51 51 // this is the folder name 52 52 String base_name = StringFromList(0,File_Name,".") 53 // Print base_name54 53 RenameDataFolder $("root:"+base_name), V_Nexus_Template 55 54 End … … 57 56 58 57 Macro Fill_Nexus_V_Template() 59 58 H_Fill_VSANS_Template_wSim() 60 59 End 61 60 62 61 63 62 Macro Save_Nexus_V_Template() 64 H_HDF5Gate_Write_Raw( )63 H_HDF5Gate_Write_Raw("root:V_Nexus_Template:","") 65 64 End 66 65
Note: See TracChangeset
for help on using the changeset viewer.