Changeset 1227


Ignore:
Timestamp:
Nov 22, 2019 10:42:40 AM (3 years ago)
Author:
srkline
Message:

updates to:
how the DIV file is generated. Options for normalization are transparent choices now. Normalizing individually is the correct option to use, others are for testing.

updated what files can be displayed for drawing a mask

updated how the beam stop in place is deciphered

updated which raw data corrections are shown and allowed to be turned on/off on the VSANS preferences.

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

Legend:

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

    r1178 r1227  
    194194        Variable first 
    195195 
     196        String topath = "root:Packages:NIST:VSANS:STO:entry:instrument:detector_" 
     197        String fromPath = "root:Packages:NIST:VSANS:COR:entry:instrument:detector_" 
     198        String detStrList,detStr 
     199        Variable num,ii 
     200         
     201         
    196202        if (cmpstr(carriageStr,"B")==0) 
    197                 V_NormalizeDIV_onePanel(reducedFolderType,"B") 
     203                if(first) 
     204                        V_CopyHDFToWorkFolder("COR","STO") 
     205                else 
     206                        detStr = "B" 
     207                        Duplicate/O $(fromPath+detStr+":data") $(toPath+detStr+":data") 
     208                        Duplicate/O $(fromPath+detStr+":linear_data_error") $(toPath+detStr+":linear_data_error") 
     209                endif 
     210//              V_NormalizeDIV_onePanel(reducedFolderType,"B") 
    198211        else 
    199212                // if it's the first one, copy the whole folder, otherwise just copy over what's needed 
     
    201214                        V_CopyHDFToWorkFolder("COR","STO") 
    202215                else 
    203                         String topath = "root:Packages:NIST:VSANS:STO:entry:instrument:detector_" 
    204                         String fromPath = "root:Packages:NIST:VSANS:COR:entry:instrument:detector_" 
    205                         String detStrList,detStr 
    206                         Variable num,ii 
    207216 
    208217                        if(cmpstr(carriageStr,"F")==0) 
     
    230239// this is called from the button 
    231240// 
    232 Proc V_NormalizeDIV_proc(reducedFolderType,carriageStr) 
    233         String reducedFolderType="COR",carriageStr="F" 
    234          
    235         Vf_NormalizeDIV_proc(reducedFolderType,carriageStr) 
     241Proc V_NormalizeDIV_proc(carriageStr) 
     242        String carriageStr="F" 
     243//      String reducedFolderType="COR",carriageStr="F" 
     244//      Prompt reducedFolderType, "reduced data folder" 
     245        Prompt carriageStr,"panels to group",popup,"All 8;All F All M;Individual;B;" 
     246                 
     247        Vf_NormalizeDIV_proc(carriageStr) 
    236248end 
    237249 
     
    243255// copying to the DIV folder for saving. 
    244256// 
    245 Function Vf_NormalizeDIV_proc(reducedFolderType,carriageStr) 
    246         String reducedFolderType,carriageStr 
     257Function Vf_NormalizeDIV_proc(carriageStr) 
     258        String carriageStr 
    247259 
    248260        if (cmpstr(carriageStr,"B")==0) 
    249                 V_NormalizeDIV_onePanel(reducedFolderType,"B") 
    250         else 
    251                 DoAlert 0,"data for both carriages must already be in STO" 
     261                V_NormalizeDIV_onePanel("STO","B") 
     262                return (0) 
     263        endif 
     264         
     265         
     266        if(cmpstr(carriageStr,"All 8")==0) 
     267//              DoAlert 0,"data for both carriages must already be in STO" 
    252268                V_NormalizeDIV_allEight("STO")                  //forces reduced folder type to STO 
    253         endif 
    254          
    255 //      if (cmpstr(carriageStr,"B")==0) 
    256 //              V_NormalizeDIV_onePanel(reducedFolderType,"B") 
    257 //      elseif (cmpstr(carriageStr,"F")==0) 
     269                return (0) 
     270        endif 
     271 
     272        if(cmpstr(carriageStr,"All F All M")==0) 
    258273//              DoAlert 0,"data for both carriages must already be in STO" 
    259 //              V_NormalizeDIV_allEight("STO")                  //forces reduced folder type to STO 
    260 //       
    261 ////            V_NormalizeDIV_oneCarriage(reducedFolderType,carriageStr) 
    262 // 
    263 ////            V_NormalizeDIV_onePanel(reducedFolderType,"FL") 
    264 ////            V_NormalizeDIV_onePanel(reducedFolderType,"FR") 
    265 ////            V_NormalizeDIV_onePanel(reducedFolderType,"FT") 
    266 ////            V_NormalizeDIV_onePanel(reducedFolderType,"FB") 
    267 //      else 
    268 //       
    269 ////            V_NormalizeDIV_oneCarriage(reducedFolderType,carriageStr) 
    270 //               
    271 ////            V_NormalizeDIV_onePanel(reducedFolderType,"ML") 
    272 ////            V_NormalizeDIV_onePanel(reducedFolderType,"MR") 
    273 ////            V_NormalizeDIV_onePanel(reducedFolderType,"MT") 
    274 ////            V_NormalizeDIV_onePanel(reducedFolderType,"MB")  
    275 //      endif 
     274                V_NormalizeDIV_oneCarriage("STO","F") 
     275                V_NormalizeDIV_oneCarriage("STO","M") 
     276                return (0) 
     277        endif 
     278 
     279        if(cmpstr(carriageStr,"Individual")==0)  
     280                V_NormalizeDIV_onePanel("STO","B") 
     281 
     282                V_NormalizeDIV_onePanel("STO","FL") 
     283                V_NormalizeDIV_onePanel("STO","FR") 
     284                V_NormalizeDIV_onePanel("STO","FT") 
     285                V_NormalizeDIV_onePanel("STO","FB") 
     286         
     287                V_NormalizeDIV_onePanel("STO","ML") 
     288                V_NormalizeDIV_onePanel("STO","MR") 
     289                V_NormalizeDIV_onePanel("STO","MT") 
     290                V_NormalizeDIV_onePanel("STO","MB")      
     291                return(0) 
     292        endif 
    276293         
    277294        return(0) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_MaskUtils.ipf

    r1209 r1227  
    127127        PopupMenu popup_0,mode=1,popvalue="FL",value= #"\"FL;FR;FT;FB;ML;MR;MT;MB;B;\"" 
    128128        PopupMenu popup_2,pos={18,10},size={109,20},title="Data Source"//,proc=SetFldrPopMenuProc 
    129         PopupMenu popup_2,mode=1,popvalue="RAW",value= #"\"RAW;SAM;VCALC;\"" 
     129        PopupMenu popup_2,mode=1,popvalue="RAW",value= #"\"RAW;SAM;ABS;VCALC;\"" 
    130130 
    131131        SetVariable setvar0,pos={226,32},size={112,23},title="tube number" 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Utilities_Comparisons.ipf

    r1222 r1227  
    468468 
    469469// returns the beamstop diameter [mm] 
    470 // if there is no beamtop in front of the specified detector, return 0.01mm 
     470// 
     471// checks the field num_beamstops. if this is 0, then there is no beam stop in place 
     472//      if there is no beamtop in front of the specified detector, return 0.01mm 
     473// 
     474// if the number is non-zero, then for the middle carriage, return the BS size, which 
     475//  will always be the diameter, since there are only circular beamstops present. 
     476// 
     477// TODO 
     478//  -- for the back carriage, the numbered beam stops are: 
     479// (1) = 6 mm x 300 mm (RECTANGLE) 
     480// (2) = 12 mm diameter (CIRCLE) 
     481// (3) = 12 mm x 300 mm (RECTANGLE) 
     482// 
     483//              -- currently this returns the diameter of the beam stop for # 2 
     484//    and the width ONLY if #1 or #3 (both are 300 mm high) 
    471485// 
    472486Function V_IdentifyBeamstopDiameter(folderStr,detStr) 
     
    495509                // back (3) 
    496510                num = V_getBeamStopC3num_beamstops(folderStr) 
    497                 if(num) 
     511                if(num==0) 
     512                        return(dummyVal) 
     513                endif 
     514                 
     515                if(num==2) 
     516                        //2 = circular beamstop 
    498517                        BS = V_getBeamStopC3_size(folderStr) 
    499518                else 
    500                         //num = 0, no beamstops on the back 
    501                         return(dummyVal) 
     519                        //1 or 3, these are rectangular -- return the width, since the height of both is 300 mm 
     520                        return(V_getBeamStopC3_width(folderStr)) 
    502521                endif 
    503522        endif    
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_VSANS_Preferences.ipf

    r1134 r1227  
    298298        CheckBox PrefCtrl_1k title="Do Solid Angle Correction?",size={140,14},proc=V_DoSolidAngleCorPref 
    299299        CheckBox PrefCtrl_1k value=root:Packages:NIST:VSANS:Globals:gDoSolidAngleCor,pos={255,160},help={"TURN OFF ONLY FOR DEBUGGING."} 
    300         CheckBox PrefCtrl_1l title="Do Non-linear Correction?",size={140,14},proc=V_DoNonLinearCorPref 
    301         CheckBox PrefCtrl_1l value=root:Packages:NIST:VSANS:Globals:gDoNonLinearCor,pos={255,180},help={"TURN OFF ONLY FOR DEBUGGING."} 
     300        CheckBox PrefCtrl_1l title="Do Non-linear Correction?",size={140,14},proc=V_DoNonLinearCorPref,disable=2 
     301        CheckBox PrefCtrl_1l value=root:Packages:NIST:VSANS:Globals:gDoNonLinearCor,pos={255,180},help={"Non-linear correction can't be turned off"} 
    302302        CheckBox PrefCtrl_1m title="Do Tube Shadow Correction?",size={140,14},proc=V_DoTubeShadowCorPref 
    303303        CheckBox PrefCtrl_1m value=root:Packages:NIST:VSANS:Globals:gDoTubeShadowCor,pos={255,200},help={"TURN OFF ONLY FOR DEBUGGING."} 
    304304//      CheckBox PrefCtrl_1n title="Do Tube Shadow Correction?",size={140,14},proc=V_DoMonitorNormPref 
    305305//      CheckBox PrefCtrl_1n value=root:Packages:NIST:VSANS:Globals:gDoMonitorNormalization,pos={255,220},help={"TURN OFF ONLY FOR DEBUGGING."} 
    306         CheckBox PrefCtrl_1m title="Ignore Back Detector?",size={140,14},proc=V_IgnoreDetBPref 
    307         CheckBox PrefCtrl_1m value=root:Packages:NIST:VSANS:Globals:gIgnoreDetB,pos={150,220},help={"Will prevent data from Back detector being written to data files."}                 
     306        CheckBox PrefCtrl_1o title="Ignore Back Detector?",size={140,14},proc=V_IgnoreDetBPref 
     307        CheckBox PrefCtrl_1o value=root:Packages:NIST:VSANS:Globals:gIgnoreDetB,pos={150,220},help={"Will prevent data from Back detector being written to data files."}                 
    308308         
    309309//      CheckBox PrefCtrl_1a,disable=1 
     
    315315//      CheckBox PrefCtrl_1g,disable=1 
    316316//      CheckBox PrefCtrl_1h,disable=1 
     317        CheckBox PrefCtrl_1g,value=0,disable=2          // angle dependent efficiency not done yet 
     318        CheckBox PrefCtrl_1m,value=0,disable=2          // tube shadowing correctionn not done yet 
    317319 
    318320//on tab(2) - Analysis 
Note: See TracChangeset for help on using the changeset viewer.