Changeset 1142


Ignore:
Timestamp:
Apr 9, 2019 11:04:14 AM (3 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.

Location:
sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS
Files:
2 edited

Legend:

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

    r1134 r1142  
    216216        PopupMenu VCALCCtrl_1c,pos={270,310-50},size={132,20},title="Aperture Diam (cm)",disable=1 
    217217        PopupMenu VCALCCtrl_1c,mode=1,popvalue="1.27",value= root:Packages:NIST:VSANS:VCALC:gSampleApertureDiam 
    218         SetVariable VCALCCtrl_1d,pos={25,280-50},size={200,15},title="Sample Aperture to Gate Valve (cm)" 
     218        SetVariable VCALCCtrl_1d,pos={25,280-50},size={210,15},title="Sample Aper. to Gate Valve (cm)"//,bodywidth=50 
    219219        SetVariable VCALCCtrl_1d,limits={4,40,0.1},value=_NUM:22,proc=VC_A2_to_GV_SetVarProc,disable=1 
    220         SetVariable VCALCCtrl_1e,pos={25,310-50},size={200,15},title="Sample Pos to Gate Valve (cm)" 
     220        SetVariable VCALCCtrl_1e,pos={25,310-50},size={210,15},title="Sample Pos to Gate Valve (cm)" 
    221221        SetVariable VCALCCtrl_1e,limits={4,40,0.1},value=_NUM:11,proc=VC_Sam_to_GV_SetVarProc,disable=1  
    222222 
    223223// tab(2) - Front detector panels, initially not visible 
    224         SetVariable VCALCCtrl_2a,pos={30,260-50},size={150,15},title="LEFT Offset (cm)",proc=VC_FDet_LR_SetVarProc 
     224        SetVariable VCALCCtrl_2a,pos={30,260-50},size={160,15},title="LEFT Offset (cm)",proc=VC_FDet_LR_SetVarProc 
    225225        SetVariable VCALCCtrl_2a,limits={-20,19,0.1},disable=1,value=_NUM:-10 
    226         SetVariable VCALCCtrl_2aa,pos={30,290-50},size={150,15},title="RIGHT Offset (cm)",proc=VC_FDet_LR_SetVarProc 
     226        SetVariable VCALCCtrl_2aa,pos={30,290-50},size={160,15},title="RIGHT Offset (cm)",proc=VC_FDet_LR_SetVarProc 
    227227        SetVariable VCALCCtrl_2aa,limits={-19,20,0.1},disable=1,value=_NUM:10 
    228228         
    229         SetVariable VCALCCtrl_2b,pos={30,330-50},size={150,15},title="TOP Offset (cm)",proc=VC_FDet_LR_SetVarProc 
     229        SetVariable VCALCCtrl_2b,pos={30,330-50},size={160,15},title="TOP Offset (cm)",proc=VC_FDet_LR_SetVarProc 
    230230        SetVariable VCALCCtrl_2b,limits={0,18,0.1},disable=1,value=_NUM:10 
    231         SetVariable VCALCCtrl_2bb,pos={30,360-50},size={150,15},title="BOTTOM Offset (cm)",proc=VC_FDet_LR_SetVarProc 
     231        SetVariable VCALCCtrl_2bb,pos={30,360-50},size={160,15},title="BOTTOM Offset (cm)",proc=VC_FDet_LR_SetVarProc 
    232232        SetVariable VCALCCtrl_2bb,limits={-18,0,0.1},disable=1,value=_NUM:-10 
    233233         
    234         SetVariable VCALCCtrl_2d,pos={205,260-50},size={230,15},title="Gate Valve to Detector Distance (cm)",proc=VC_FDet_SDD_SetVarProc 
     234        SetVariable VCALCCtrl_2d,pos={205,260-50},size={235,15},title="Gate Valve to Detector Dist (cm)",proc=VC_FDet_SDD_SetVarProc 
    235235        SetVariable VCALCCtrl_2d,limits={70,800,1},disable=1    ,value=_NUM:150 
    236236         
    237237 
    238238// tab(3) - Middle detector panels, initially not visible 
    239         SetVariable VCALCCtrl_3a,pos={30,260-50},size={150,15},title="LEFT Offset (cm)",proc=VC_MDet_LR_SetVarProc 
     239        SetVariable VCALCCtrl_3a,pos={30,260-50},size={160,15},title="LEFT Offset (cm)",proc=VC_MDet_LR_SetVarProc 
    240240        SetVariable VCALCCtrl_3a,limits={-20,19,0.1},disable=1,value=_NUM:-7 
    241         SetVariable VCALCCtrl_3aa,pos={30,290-50},size={150,15},title="RIGHT Offset (cm)",proc=VC_MDet_LR_SetVarProc 
     241        SetVariable VCALCCtrl_3aa,pos={30,290-50},size={160,15},title="RIGHT Offset (cm)",proc=VC_MDet_LR_SetVarProc 
    242242        SetVariable VCALCCtrl_3aa,limits={-19,20,0.1},disable=1,value=_NUM:7 
    243243                 
    244         SetVariable VCALCCtrl_3b,pos={30,330-50},size={150,15},title="TOP Offset (cm)",proc=VC_MDet_LR_SetVarProc 
     244        SetVariable VCALCCtrl_3b,pos={30,330-50},size={160,15},title="TOP Offset (cm)",proc=VC_MDet_LR_SetVarProc 
    245245        SetVariable VCALCCtrl_3b,limits={0,18,0.1},disable=1,value=_NUM:14 
    246         SetVariable VCALCCtrl_3bb,pos={30,360-50},size={150,15},title="BOTTOM Offset (cm)",proc=VC_MDet_LR_SetVarProc 
     246        SetVariable VCALCCtrl_3bb,pos={30,360-50},size={160,15},title="BOTTOM Offset (cm)",proc=VC_MDet_LR_SetVarProc 
    247247        SetVariable VCALCCtrl_3bb,limits={-18,0,0.1},disable=1,value=_NUM:-14 
    248248 
    249         SetVariable VCALCCtrl_3d,pos={205,260-50},size={230,15},title="Gate Valve to Detector Distance (cm)",proc=VC_MDet_SDD_SetVarProc 
     249        SetVariable VCALCCtrl_3d,pos={205,260-50},size={235,15},title="Gate Valve to Detector Dist (cm)",proc=VC_MDet_SDD_SetVarProc 
    250250        SetVariable VCALCCtrl_3d,limits={250,2000,1},disable=1,value=_NUM:1000 
    251251 
    252252         
    253253// tab(4) - Back detector panel 
    254         SetVariable VCALCCtrl_4a,pos={188,290-50},size={150,15},title="Lateral Offset (cm)" 
     254        SetVariable VCALCCtrl_4a,pos={168,290-50},size={160,15},title="Lateral Offset (cm)" 
    255255        SetVariable VCALCCtrl_4a,limits={0,20,0.1},disable=1,value=_NUM:0 
    256         SetVariable VCALCCtrl_4b,pos={188,260-50},size={230,15},title="Gate Valve to Detector Distance (cm)",proc=VC_BDet_SDD_SetVarProc 
     256        SetVariable VCALCCtrl_4b,pos={168,260-50},size={250,15},title="Gate Valve to Detector Dist (cm)",proc=VC_BDet_SDD_SetVarProc 
    257257        SetVariable VCALCCtrl_4b,limits={2000,2500,1},disable=1,value=_NUM:2200 
    258258//      PopupMenu VCALCCtrl_4c,pos={40,260},size={180,20},title="Detector type",disable=1 
     
    260260 
    261261// tab(5) - Simulation setup 
    262         SetVariable VCALCCtrl_5a,pos={40,290-50},size={200,15},title="Neutrons on Sample (imon)" 
     262        SetVariable VCALCCtrl_5a,pos={40,290-50},size={220,15},title="Neutrons on Sample (imon)" 
    263263        SetVariable VCALCCtrl_5a,limits={1e7,1e15,1e7},disable=1,value=_NUM:1e11,proc=VC_SimImon_SetVarProc 
    264         PopupMenu VCALCCtrl_5b,pos={40,260-50},size={180,20},title="Model Function",disable=1 
     264        PopupMenu VCALCCtrl_5b,pos={40,260-50},size={200,20},title="Model Function",disable=1 
    265265        PopupMenu VCALCCtrl_5b,mode=1,popvalue="Debye",value= root:Packages:NIST:VSANS:VCALC:gModelFunctionType,proc=VC_SimModelFunc_PopProc 
    266266         
  • 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.