Ignore:
Timestamp:
Apr 9, 2019 11:04:14 AM (4 years ago)
Author:
srkline
Message:

cosmetic changes to VCALC

changed the patch routine for guides to accept "CONV_BEAMS", etc. to properly fill in the collimation to be recognized for resolution calculations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_PatchFiles.ipf

    r1141 r1142  
    28612861                 
    28622862                // fake data 
    2863                         V_writeDetectorData(fname,detStr,tmpData) 
     2863//                      V_writeDetectorData(fname,detStr,tmpData) 
    28642864                         
    28652865                         
     
    29342934 
    29352935 
    2936 Proc V_Patch_Guide_SSD_Aperture(lo,hi,numGuides,sourceDiam_mm) 
    2937         Variable lo,hi,numGuides=0,sourceDiam_mm=30 
    2938          
    2939         V_fPatch_Guide_SSD_Aperture(lo,hi,numGuides,sourceDiam_mm) 
     2936Proc V_Patch_Guide_SSD_Aperture(lo,hi,numGuideStr,sourceDiam_mm) 
     2937        Variable lo,hi 
     2938        String numGuideStr="CONV_BEAMS" 
     2939        Variable sourceDiam_mm=30 
     2940         
     2941        V_fPatch_Guide_SSD_Aperture(lo,hi,numGuideStr,sourceDiam_mm) 
    29402942End 
    29412943 
     
    29562958// hi is the last file number (inclusive) 
    29572959// 
    2958 Function V_fPatch_Guide_SSD_Aperture(lo,hi,numGuides,sourceDiam_mm) 
    2959         Variable lo,hi,numGuides,sourceDiam_mm 
     2960Function V_fPatch_Guide_SSD_Aperture(lo,hi,numGuideStr,sourceDiam_mm) 
     2961        Variable lo,hi 
     2962        String numGuideStr 
     2963        Variable sourceDiam_mm 
    29602964 
    29612965         
     
    29632967        String fname,detStr 
    29642968 
    2965         switch(numGuides) 
    2966                 case 0: 
     2969        strswitch(numGuideStr) 
     2970                case "CONV_BEAMS": 
     2971                case "NARROW_SLITS": 
     2972                case "0": 
    29672973                                A1_to_GV = 2441 
    29682974                        break 
    2969                 case 1: 
     2975                case "1": 
    29702976                                A1_to_GV = 2157 
    29712977                        break 
    2972                 case 2: 
     2978                case "2": 
    29732979                                A1_to_GV = 1976 
    29742980                        break 
    2975                 case 3: 
     2981                case "3": 
    29762982                                A1_to_GV = 1782 
    29772983                        break                    
    2978                 case 4: 
     2984                case "4": 
    29792985                                A1_to_GV = 1582 
    29802986                        break                    
    2981                 case 5: 
     2987                case "5": 
    29822988                                A1_to_GV = 1381 
    29832989                        break                    
    2984                 case 6: 
     2990                case "6": 
    29852991                                A1_to_GV = 1181 
    29862992                        break                    
    2987                 case 7: 
     2993                case "7": 
    29882994                                A1_to_GV = 980 
    29892995                        break                    
    2990                 case 8: 
     2996                case "8": 
    29912997                                A1_to_GV = 780 
    29922998                        break                    
    2993                 case 9: 
     2999                case "9": 
    29943000                                A1_to_GV = 579 
    29953001                        break                    
     
    30063012                 
    30073013                // write values 
    3008                 V_writeNumberOfGuides(fname,num2str(numGuides)) 
     3014                V_writeNumberOfGuides(fname,numGuideStr) 
    30093015 
    30103016                V_writeSourceAp_distance(fname,A1_to_GV) 
Note: See TracChangeset for help on using the changeset viewer.