Changeset 1249 for sans/Dev/trunk/NCNR_User_Procedures/Reduction
- Timestamp:
- Apr 1, 2020 11:54:01 AM (3 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_DetectorBinning_Q.ipf
r1247 r1249 188 188 V_putDet_beam_center_y("VCALC","FL",yCtr) 189 189 190 SDD = VC_getSDD("FL") // SDD [cm] - INCLUDES offset for TB190 SDD = VC_getSDD("FL") // SDD [cm] - does not include setback 191 191 192 192 // VC_Detector_2Q(det_FL,qTot_FL,qx_FL,qy_FL,qz_FL,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) … … 245 245 V_putDet_beam_center_y("VCALC","FR",yCtr) 246 246 247 SDD = VC_getSDD("FR") // SDD [cm] - INCLUDES offset for TB247 SDD = VC_getSDD("FR") // SDD [cm] - does not include setback 248 248 249 249 // VC_Detector_2Q(det_FR,qTot_FR,qx_FR,qy_FR,qz_FR,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) … … 299 299 V_putDet_beam_center_y("VCALC","FT",yCtr) 300 300 301 SDD = VC_getSDD("FT") // SDD [cm] - INCLUDES offset for TB 301 SDD = VC_getSDD("FT") // SDD [cm] - does not include setback 302 SDD += VCALC_getTopBottomSDDSetback("FT") 302 303 303 304 // global sdd_offset is in (mm), convert to meters here for the Q-calculation … … 353 354 V_putDet_beam_center_y("VCALC","FB",yCtr) 354 355 355 SDD = VC_getSDD("FB") // SDD [cm] - INCLUDES offset for TB 356 SDD = VC_getSDD("FB") // SDD [cm] - does not include setback 357 SDD += VCALC_getTopBottomSDDSetback("FB") 356 358 357 359 // global sdd_offset is in (mm), convert to meters here for the Q-calculation … … 694 696 V_putDet_beam_center_y("VCALC","ML",yCtr) 695 697 696 SDD = VC_getSDD("ML") //SDD [cm] - INCLUDES offset for TB698 SDD = VC_getSDD("ML") //SDD [cm] - does not include setback 697 699 698 700 // VC_Detector_2Q(det_ML,qTot_ML,qx_ML,qy_ML,qz_ML,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) … … 755 757 V_putDet_beam_center_y("VCALC","MR",yCtr) 756 758 757 SDD = VC_getSDD("MR") //SDD [cm] - INCLUDES offset for TB759 SDD = VC_getSDD("MR") //SDD [cm] does not include setback 758 760 759 761 // VC_Detector_2Q(det_MR,qTot_MR,qx_MR,qy_MR,qz_MR,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) … … 809 811 V_putDet_beam_center_y("VCALC","MT",yCtr) 810 812 811 SDD = VC_getSDD("MT") //SDD [cm] - INCLUDES offset for TB 813 SDD = VC_getSDD("MT") //SDD [cm] - does not include setback 814 SDD += VCALC_getTopBottomSDDSetback("MT") 812 815 813 816 // global sdd_offset is in (mm), convert to meters here for the Q-calculation … … 863 866 V_putDet_beam_center_y("VCALC","MB",yCtr) 864 867 865 SDD = VC_getSDD("MB") //SDD [cm] - INCLUDES offset for TB 868 SDD = VC_getSDD("MB") //SDD [cm] - does not include setback 869 SDD += VCALC_getTopBottomSDDSetback("MB") 866 870 867 871 // global sdd_offset is in (mm), convert to meters here for the Q-calculation -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_DetectorBinning_Utils.ipf
r1242 r1249 39 39 // nominal sdd in cm, offset in cm, want result in cm ! 40 40 41 sdd = VC_getSDD(type) // setback is already included VCALC_getTopBottomSDDSetback(type) // result is sdd in [cm] 41 sdd = VC_getSDD(type) // setback is NOT included VCALC_getTopBottomSDDSetback(type) // result is sdd in [cm] 42 sdd += VCALC_getTopBottomSDDSetback(type) 42 43 43 44 pixSizeX = VCALC_getPixSizeX(type) // cm … … 802 803 // - each pixel QxQyQz has been calculated beforehand 803 804 // - if multiple panels are selected to be combined, it is done here during the binning 804 // - the setting of deltaQ step is still a little suspect (TODO) 805 // - the setting of deltaQ step is still a little suspect in that it can be the 806 // cause of "sawtooth" in the I(q) - if the step is too fine. There is now a preference 807 // set so that the deltaQ is by default 1.2 * the minumum q from the first tube. 805 808 // 806 809 // -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_UtilityProcedures.ipf
r1242 r1249 622 622 Variable a2_to_GV,sam_to_GV,sdd,l2 623 623 sdd = VC_getSDD(detStr) //sample pos to detector 624 sdd += VCALC_getTopBottomSDDSetback(detStr) //returns zero for L/R 624 625 ControlInfo/W=VCALC VCALCCtrl_1d 625 626 a2_to_GV = V_Value … … 661 662 Variable a2_to_GV,sam_to_GV,sdd 662 663 sdd = VC_getSDD(detStr) //sample pos to detector 664 sdd += VCALC_getTopBottomSDDSetback(detStr) //returns zero for L/R 663 665 ControlInfo/W=VCALC VCALCCtrl_1d 664 666 a2_to_GV = V_Value … … 736 738 sdd = V_Value 737 739 738 sdd += VCALC_getTopBottomSDDSetback(detStr) 740 // MAR 2020 -- don't add in the setback, ask for it when needed 741 // sdd += VCALC_getTopBottomSDDSetback(detStr) 739 742 740 743 // VCALCCtrl_1e is Sample Pos to Gate Valve (cm) … … 791 794 break 792 795 default: 793 Print "no case matched in VC_get SDD()"796 Print "no case matched in VC_getGateValveToDetDistance()" 794 797 endswitch 795 798 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_VCALCPanel_MockUp.ipf
r1248 r1249 1747 1747 BSDiam = VC_beamstopDiam(detStr) 1748 1748 SDD = VC_getSDD(detStr) 1749 SDD += VCALC_getTopBottomSDDSetback(detStr) 1749 1750 lambda = VCALC_getWavelength() 1750 1751 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Initialize.ipf
r1242 r1249 251 251 else 252 252 //either Windows or Windows NT 253 String/G root:Packages:NIST:VSANS:Globals:gAngstStr = num2char(-59) 254 String/G root:Packages:NIST:gAngstStr = num2char(-59) 253 // String/G root:Packages:NIST:VSANS:Globals:gAngstStr = num2char(-59) 254 // String/G root:Packages:NIST:gAngstStr = num2char(-59) 255 String/G root:Packages:NIST:VSANS:Globals:gAngstStr = num2char(197) 256 String/G root:Packages:NIST:gAngstStr = num2char(197) 255 257 Variable/G root:Packages:NIST:VSANS:Globals:gIsMac = 0 256 258 //SetIgorOption to keep some PC's (graphics cards?) from smoothing the 2D image -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Menu.ipf
r1247 r1249 16 16 "VCALC",VCALC_Panel() 17 17 "VSANS Preferences",Show_VSANSPreferences_Panel() 18 "Turn Laptop Mode ON",V_SetLaptopMode() 18 19 "-" 19 20 Submenu "Find Windows" … … 67 68 "Load High Res Read Noise Data" 68 69 "-" 69 "Copy_VCALC_to_VSANS File",Copy_VCALC_to_VSANSFile()70 "Copy_VCALC_to_VSANS_File",Copy_VCALC_to_VSANSFile() 70 71 "-" 71 72 "Read_Nexus with attributes",Read_Nexus_Xref() //this will read with attributes -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Protocol_Reduction.ipf
r1247 r1249 2376 2376 // 2377 2377 // V_Proto_SaveFile(avgStr,activeType,samFileLoaded,av_type,binType,detGroup,trimBegStr,trimEndStr) 2378 // 2379 // this step does more than save... 2380 // - trims the selected points from the data set 2381 // - concatenates the data sets 2382 // - removes NaN points and removes duplicate q-values by averaging q-values that are within 0.1% of each other 2383 // 2378 2384 2379 2385 prot[9] = collimationStr … … 3389 3395 V_ConcatenateForSave("root:Packages:NIST:VSANS:",activeType,"",binType) // this removes q=0 point, concatenates, sorts 3390 3396 3397 // RemoveDuplicateQvals -- this step: 3398 // --removes NaN values 3399 // -- averages intensity from q-values that are within 0.1% of each other 3391 3400 V_RemoveDuplicateQvals("root:Packages:NIST:VSANS:",activeType) // works with the "tmp_x" waves from concatenateForSave 3392 3401 // prot[9] = collimationStr -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Testing_Data_Procs.ipf
r1242 r1249 7 7 //////// function to take VCALC information and 8 8 // fill in the simulated information as needed to make a "fake" data file 9 // 10 // - to make fake data: 11 // - copy several existing raw VSANS files to a new folder 12 // - renumber them 13 // - open a new experiment, get a file catalog (catPathName must be set) 14 // - then open VCALC and set the desired conditions 15 // - then use the Macro "Copy_VCALC_to_VSANSFile() 16 // 17 // 18 19 9 20 // 10 21 // TODO: … … 53 64 54 65 55 val = VC_getSDD(detStr) // make sure value is in cm 66 val = VC_getSDD(detStr) // make sure value is in cm. This does not include the setback 56 67 print val 57 68 V_writeDet_distance(fileName,detStr,val) -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Utilities_General.ipf
r1246 r1249 380 380 endif 381 381 //if(V_flag==2) do nothing, let it go around again 382 else 383 // length is OK, set the output path, exit loop and return 384 outputPath = testStr 382 385 endif 383 386 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_VSANS_Preferences.ipf
r1248 r1249 128 128 129 129 130 DoAlert 1,"Do you want small panels? (this can be changed later in preferences)" 131 if(V_flag == 1) 132 // yes 133 Variable/G root:Packages:NIST:VSANS:Globals:gLaptopMode = 1 134 endif 130 // this is now a VSANS menu item rather than a question at startup 131 // DoAlert 1,"Do you want small panels? (this can be changed later in preferences)" 132 // if(V_flag == 1) 133 // // yes 134 // Variable/G root:Packages:NIST:VSANS:Globals:gLaptopMode = 1 135 // endif 136 137 135 138 // flag to allow adding raw data files with different attenuation (normally not done) 136 139 // val = NumVarOrDefault("root:Packages:NIST:VSANS:Globals:gDoAdjustRAW_Atten",0) … … 292 295 293 296 297 Proc V_SetLaptopMode() 298 299 root:Packages:NIST:VSANS:Globals:gLaptopMode = 1 300 301 DoWindow/K Main_VSANS_Panel 302 Initialize_VSANS() 303 DoAlert 0,"Laptop Mode is ON, go to VSANS preferences to turn mode off" 304 305 End 294 306 295 307
Note: See TracChangeset
for help on using the changeset viewer.