Changeset 1249


Ignore:
Timestamp:
Apr 1, 2020 11:54:01 AM (21 months ago)
Author:
srkline
Message:

minor changes - can't find the diff command in TortoiseSVN...

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  
    188188        V_putDet_beam_center_y("VCALC","FL",yCtr) 
    189189 
    190         SDD = VC_getSDD("FL")           // SDD [cm] - INCLUDES offset for TB 
     190        SDD = VC_getSDD("FL")           // SDD [cm] - does not include setback 
    191191                 
    192192//      VC_Detector_2Q(det_FL,qTot_FL,qx_FL,qy_FL,qz_FL,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) 
     
    245245        V_putDet_beam_center_y("VCALC","FR",yCtr)        
    246246         
    247         SDD = VC_getSDD("FR")           // SDD [cm] - INCLUDES offset for TB 
     247        SDD = VC_getSDD("FR")           // SDD [cm] - does not include setback 
    248248         
    249249//      VC_Detector_2Q(det_FR,qTot_FR,qx_FR,qy_FR,qz_FR,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) 
     
    299299        V_putDet_beam_center_y("VCALC","FT",yCtr) 
    300300 
    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") 
    302303                   
    303304        // global sdd_offset is in (mm), convert to meters here for the Q-calculation 
     
    353354        V_putDet_beam_center_y("VCALC","FB",yCtr) 
    354355 
    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") 
    356358                 
    357359        // global sdd_offset is in (mm), convert to meters here for the Q-calculation 
     
    694696        V_putDet_beam_center_y("VCALC","ML",yCtr) 
    695697 
    696         SDD = VC_getSDD("ML")           //SDD [cm] - INCLUDES offset for TB 
     698        SDD = VC_getSDD("ML")           //SDD [cm] - does not include setback 
    697699         
    698700//      VC_Detector_2Q(det_ML,qTot_ML,qx_ML,qy_ML,qz_ML,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) 
     
    755757        V_putDet_beam_center_y("VCALC","MR",yCtr) 
    756758 
    757         SDD = VC_getSDD("MR")           //SDD [cm] - INCLUDES offset for TB 
     759        SDD = VC_getSDD("MR")           //SDD [cm] does not include setback 
    758760         
    759761//      VC_Detector_2Q(det_MR,qTot_MR,qx_MR,qy_MR,qz_MR,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) 
     
    809811        V_putDet_beam_center_y("VCALC","MT",yCtr) 
    810812 
    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") 
    812815         
    813816        // global sdd_offset is in (mm), convert to meters here for the Q-calculation   
     
    863866        V_putDet_beam_center_y("VCALC","MB",yCtr) 
    864867 
    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") 
    866870         
    867871                // 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  
    3939        // nominal sdd in cm, offset in cm, want result in cm ! 
    4040 
    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) 
    4243 
    4344        pixSizeX = VCALC_getPixSizeX(type)              // cm 
     
    802803//              - each pixel QxQyQz has been calculated beforehand 
    803804//              - 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. 
    805808// 
    806809// 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_UtilityProcedures.ipf

    r1242 r1249  
    622622        Variable a2_to_GV,sam_to_GV,sdd,l2 
    623623        sdd = VC_getSDD(detStr)                 //sample pos to detector 
     624        sdd += VCALC_getTopBottomSDDSetback(detStr)             //returns zero for L/R 
    624625        ControlInfo/W=VCALC VCALCCtrl_1d 
    625626        a2_to_GV = V_Value 
     
    661662        Variable a2_to_GV,sam_to_GV,sdd 
    662663        sdd = VC_getSDD(detStr)                 //sample pos to detector 
     664        sdd += VCALC_getTopBottomSDDSetback(detStr)             //returns zero for L/R 
    663665        ControlInfo/W=VCALC VCALCCtrl_1d 
    664666        a2_to_GV = V_Value 
     
    736738        sdd = V_Value 
    737739         
    738         sdd += VCALC_getTopBottomSDDSetback(detStr) 
     740        // MAR 2020 -- don't add in the setback, ask for it when needed 
     741//      sdd += VCALC_getTopBottomSDDSetback(detStr) 
    739742         
    740743        // VCALCCtrl_1e is Sample Pos to Gate Valve (cm) 
     
    791794                        break            
    792795                default: 
    793                         Print "no case matched in VC_getSDD()" 
     796                        Print "no case matched in VC_getGateValveToDetDistance()" 
    794797        endswitch 
    795798 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_VCALCPanel_MockUp.ipf

    r1248 r1249  
    17471747        BSDiam = VC_beamstopDiam(detStr) 
    17481748        SDD = VC_getSDD(detStr) 
     1749        SDD += VCALC_getTopBottomSDDSetback(detStr) 
    17491750        lambda = VCALC_getWavelength() 
    17501751         
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Initialize.ipf

    r1242 r1249  
    251251        else 
    252252                //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) 
    255257                Variable/G root:Packages:NIST:VSANS:Globals:gIsMac = 0 
    256258                //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  
    1616        "VCALC",VCALC_Panel() 
    1717        "VSANS Preferences",Show_VSANSPreferences_Panel() 
     18        "Turn Laptop Mode ON",V_SetLaptopMode() 
    1819        "-" 
    1920        Submenu "Find Windows" 
     
    6768                "Load High Res Read Noise Data" 
    6869                "-" 
    69                 "Copy_VCALC_to_VSANSFile",Copy_VCALC_to_VSANSFile() 
     70                "Copy_VCALC_to_VSANS_File",Copy_VCALC_to_VSANSFile() 
    7071                "-" 
    7172                "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  
    23762376// 
    23772377// 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// 
    23782384 
    23792385        prot[9] = collimationStr 
     
    33893395                                        V_ConcatenateForSave("root:Packages:NIST:VSANS:",activeType,"",binType)         // this removes q=0 point, concatenates, sorts 
    33903396                                 
     3397                                // RemoveDuplicateQvals -- this step: 
     3398                                // --removes NaN values 
     3399                                // -- averages intensity from q-values that are within 0.1% of each other 
    33913400                                        V_RemoveDuplicateQvals("root:Packages:NIST:VSANS:",activeType)          // works with the "tmp_x" waves from concatenateForSave 
    33923401//                                      prot[9] = collimationStr 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Testing_Data_Procs.ipf

    r1242 r1249  
    77//////// function to take VCALC information and  
    88// 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 
    920// 
    1021// TODO: 
     
    5364                 
    5465         
    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 
    5667                print val 
    5768                V_writeDet_distance(fileName,detStr,val) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Utilities_General.ipf

    r1246 r1249  
    380380                        endif 
    381381                        //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 
    382385                endif 
    383386                 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_VSANS_Preferences.ipf

    r1248 r1249  
    128128 
    129129 
    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 
    135138// flag to allow adding raw data files with different attenuation (normally not done)    
    136139//      val = NumVarOrDefault("root:Packages:NIST:VSANS:Globals:gDoAdjustRAW_Atten",0) 
     
    292295 
    293296 
     297Proc 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         
     305End 
    294306 
    295307 
Note: See TracChangeset for help on using the changeset viewer.