- Timestamp:
- Oct 4, 2019 8:56:43 AM (3 years ago)
- Location:
- sans/Dev/trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_Igor_Procedures/NCNR_Package_Loader.ipf
r1215 r1219 165 165 strswitch(itemStr) // string switch 166 166 167 case "Load NCNR SANS Reduction Macros": 167 case "Load NCNR SANS Reduction Macros": 168 168 Execute/P "INSERTINCLUDE \"Includes_v520\"" 169 169 Execute/P "COMPILEPROCEDURES " -
sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/LinearizedFits/LinearizedFits_v40.ipf
r888 r1219 524 524 // ShortFileNameString is the currently selected data set, so make the user find the right data set 525 525 // 526 Variable maxLength=25 526 Variable maxLength 527 if(IgorVersion() < 8) 528 maxLength = 25 529 else 530 maxLength = 40 531 endif 532 527 533 if(strlen(partialName) > maxLength) 528 534 // get user input, from a list of all of the data folder names -
sans/Dev/trunk/NCNR_User_Procedures/Common/Packages/PlotManager/PlotUtilsMacro_v40.ipf
r1164 r1219 1086 1086 // returns a shortened file name (26 characters max) so that the loader 1087 1087 // won't try to create Igor objects that have names that are longer than 31 1088 // 1088 // 1089 // if Igor 8+, use longer names (within reason) 1090 // 1089 1091 Function/S ShortFileNameString(inStr) 1090 1092 String inStr 1091 1093 1092 1094 String outStr="" 1093 Variable maxLength=25 1095 Variable maxLength 1096 1097 if(IgorVersion() < 8) 1098 maxLength = 25 1099 else 1100 maxLength = 40 1101 endif 1102 1103 1094 1104 Variable nameTooLong=0 1095 1105 String/G root:Packages:NIST:gShortNameStr = inStr[0,maxLength-1] -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_Utils.ipf
r1217 r1219 1442 1442 // new calibration done June 2007, John Barker 1443 1443 // new calibration for 3A only -- September 2019, John Barker 1444 // -- corrected values for att #9 and att #10 27SEP2019 1444 1445 // 1445 1446 Proc MakeNG3AttenTable() … … 1476 1477 1477 1478 1478 //each wave has 1 0elements, the transmission of att# at the wavelengths1479 //each wave has 11 elements, the transmission of att# at the wavelengths 1479 1480 //lambda = 4,5,6,7,8,10,12,14,17,20 (4 A and 20 A are extrapolated values) 1480 1481 Make/O/N=(num) root:myGlobals:Attenuators:ng3lambda={3,4,5,6,7,8,10,12,14,17,20} … … 1491 1492 root:myGlobals:Attenuators:ng3att7 = {0.0041106,0.00170757,0.001084,0.0006469,0.0004142,0.0002607,0.0001201,7.664e-05,4.06624e-05,1.77379e-05,7.30624e-06} 1492 1493 root:myGlobals:Attenuators:ng3att8 = {0.001029,0.000320057,0.0001918,0.0001025,6.085e-05,3.681e-05,1.835e-05,6.74002e-06,3.25288e-06,1.15321e-06,3.98173e-07} 1493 root:myGlobals:Attenuators:ng3att9 = {0.00026462, 6.27682e-05,3.69e-05,1.908e-05,1.196e-05,8.738e-06,6.996e-06,6.2901e-07,2.60221e-07,7.49748e-08,2.08029e-08}1494 root:myGlobals:Attenuators:ng3att10 = { 0.00015214,1.40323e-05,8.51e-06,5.161e-06,4.4e-06,4.273e-06,1.88799e-07,5.87021e-08,2.08169e-08,4.8744e-09,1.08687e-09}1494 root:myGlobals:Attenuators:ng3att9 = {0.00026462,5.999e-05,3.3937e-05,1.6241e-05,8.9395e-06,5.1975e-06,2.0337e-06,5.9274e-07,2.6022e-07,7.4975e-08,2.1699e-08} 1495 root:myGlobals:Attenuators:ng3att10 = {6.9169e-05,1.1244e-05,6.0046e-06,2.5733e-06,1.3133e-06,7.3386e-07,2.3137e-07,5.2128e-08,2.0817e-08,4.8744e-09,1.1826e-09} 1495 1496 1496 1497 // percent errors as measured, May 2007 values -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VSANS_Includes.ipf
r1209 r1219 18 18 #include "NIST_XML_v40" 19 19 #include "USANS_SlitSmearing_v40" 20 21 #include "V_PlotUtils2D_VSANS" // basic loaders for the QxQyASCII exported VSANS data 20 22 21 23 // … … 129 131 #include "V_SWB_GaussSpheres" 130 132 #include "V_WB_Beaucage" 133 #include "V_SWB_Beaucage" 131 134 132 135 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Attenuation.ipf
r1203 r1219 183 183 // set a fake wavelength for the interpolation or get out 184 184 strswitch(monoType) // string switch 185 case "super_white_beam": // TODO: this is not written into NICE 186 lambda = 6.2e6 //just for the interpolation 187 break 185 188 case "velocity_selector": // execute if case matches expression 186 189 // use lambda as-is … … 246 249 // set a fake wavelength for the interpolation or get out 247 250 strswitch(monoType) // string switch 251 case "super_white_beam": // TODO: this is not written into NICE 252 lambda = 6.2e6 //just for the interpolation 253 break 248 254 case "velocity_selector": // execute if case matches expression 249 255 // use lambda as-is -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_HDF5_Read.ipf
r1203 r1219 1982 1982 End 1983 1983 1984 // 1984 1985 // this returns REAL, DIFFERENT than SampleAp1 1986 // see the note above. after the hard-coded date, the values in the header 1987 // are values appear to be in [mm]. before that date, the values are in [cm] 1988 // 1989 // This function returns a value in [cm] 1990 // 1985 1991 Function V_getSampleAp2_size(fname) 1986 1992 String fname 1987 1993 1988 1994 String path = "entry:instrument:sample_aperture_2:shape:size" 1989 return(V_getRealValueFromHDF5(fname,path)) 1995 1996 Variable val = V_Compare_ISO_Dates("2019-05-10T13:36:54.200-04:00",V_getDataStartTime(fname)) 1997 1998 if(val == 2) // more "current" data, mm in the header 1999 return(V_getRealValueFromHDF5(fname,path)/10) 2000 else 2001 // "older" data, cm in the header 2002 return(V_getRealValueFromHDF5(fname,path)) 2003 endif 2004 2005 // return(V_getRealValueFromHDF5(fname,path)) 2006 1990 2007 End 1991 2008 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Instrument_Resolution.ipf
r1203 r1219 172 172 S2 = VC_sampleApertureDiam()*10 // convert cm to mm 173 173 else 174 // I'm trusting [cm] is in the RAW data file 174 // I'm trusting [cm] is in the RAW data file, or returned from the function if the date is prior to 5/22/19 175 175 S2 = V_getSampleAp2_size(folderStr)*10 // sample ap 1 or 2? 2 = the "external", convert to [mm] 176 176 endif … … 260 260 // narrowSlit_whiteBeam 261 261 262 // TODO: this is a messy way to identify the super white beam condition, and it needs to be 263 // done in a cleaner fashion (through IdentityCollimation) once NICE catches up 264 265 String monoType = V_IdentifyMonochromatorType(folderStr) 266 262 267 263 268 if(cmpstr(collimationStr,"pinhole") == 0) 264 //nothing to change 269 if(cmpstr(monoType,"super_white_beam")==0) 270 lambdaWidth = 0 271 endif 272 //otherwise, nothing to change 265 273 endif 266 274 … … 321 329 //Start resolution calculation 322 330 a2 = S1*L2/L1 + S2*(L1+L2)/L1 323 q_small = 2.0*Pi*(BS-a2)*(1.0-lambdaWidth)/(lambda*L2)331 // q_small = 2.0*Pi*(BS-a2)*(1.0-lambdaWidth)/(lambda*L2) 324 332 lp = 1.0/( 1.0/L1 + 1.0/L2) 325 333 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Utilities_Comparisons.ipf
r1203 r1219 428 428 String typeStr="" 429 429 430 // TODO: if unidentified (all are OUT), then it may be super_white_beam 431 // 432 typeStr = "super_white_beam" 433 434 430 435 if(cmpstr(V_getVelSelStatus(fname),"IN") == 0) 431 436 typeStr = "velocity_selector" … … 439 444 typeStr = "crystal" 440 445 endif 446 447 441 448 442 449 return(typeStr) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_WhiteBeamDistribution.ipf
r1209 r1219 26 26 // Integral = 30955 (cts*A) for middle fit 27 27 // 28 // 29 28 30 29 31 // White Beam: 30 32 // mean wavelength = 5.29687 31 // sqrt(mean wavelength^2) = 5.4051333 // 3rd moment/2nd moment = 5.741 32 34 // 33 35 // Super White Beam: 34 36 // mean wavelength = 6.2033 35 // sqrt(mean wavelength^2) = 6.5627736 37 // 3rd moment/2nd moment = 7.93267 38 // 37 39 38 40 … … 151 153 Proc V_WB_Stats() 152 154 153 duplicate/O counts_white cts_W, intg_W 154 duplicate/O counts_super_white cts_SW intg_SW 155 duplicate/O counts_white cts_W, intg_W,intg_W3 156 duplicate/O counts_super_white cts_SW intg_SW,intg_SW3 155 157 156 158 Print "White Beam:" … … 158 160 printf "mean wavelength = %g\r",sum(intg_W)/sum(cts_W) 159 161 intg_W = cts_W*white_wavelength^2 160 printf "sqrt(mean wavelength^2) = %g\r",sqrt( sum(intg_W)/sum(cts_W) ) 162 // printf "sqrt(wavelength^2)/N = %g\r",sqrt( sum(intg_W)/sum(cts_W) ) 163 intg_W3 = cts_W*white_wavelength^3 164 printf "3rd moment/2nd moment = %g\r",sum(intg_W3)/sum(intg_W) 161 165 162 166 Print … … 165 169 printf "mean wavelength = %g\r",sum(intg_SW)/sum(cts_SW) 166 170 intg_SW = cts_SW*super_white_wavelength^2 167 printf "sqrt(mean wavelength^2) = %g\r",sqrt( sum(intg_SW)/sum(cts_SW) ) 171 // printf "sqrt(wavelength^2)/N = %g\r",sqrt( sum(intg_SW)/sum(cts_SW) ) 172 intg_SW3 = cts_SW*super_white_wavelength^3 173 printf "3rd moment/2nd moment = %g\r",sum(intg_SW3)/sum(intg_SW) 168 174 169 175 End
Note: See TracChangeset
for help on using the changeset viewer.