Ignore:
Timestamp:
Jul 3, 2018 2:30:41 PM (4 years ago)
Author:
srkline
Message:

Many changes:

Made the VCALC panel aware of all of the binning options
Corrected the behavior of the VCALC preset conditions
Adjusted how the Slit data is binned so that there are not duplicated q-values in the output

Made Absolute scaling aware of the back detector. Now the ABS String in the protocol has a second
set of scaling constants tagged with "_B" for the back detector. There is an added button
on the protocol panel to set the second set of constants. For the back detector, the read noise
is subtracted by reading it from the empty beam file (shifting over to the right by one box width)
All of the associated abs procedures are now aware of this.
More error checking needs to be added.

Back detector image is now shifted upon loading of the data. the default mask takes this into account
and masks out the padded (zero) regions.

in the protocol, DIV and MSK do not use grep any longer. it was just way too slow. Now it depends on

the file name having DIV or MASK respectively.



Raw data files can now be added together, in the usual way from the protocol panel.



File:
1 edited

Legend:

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

    r1108 r1109  
    482482        SVAR DLStr = root:Packages:NIST:VSANS:VCALC:gDeltaLambda 
    483483        DLStr = "0.12;" 
    484         PopupMenu VCALCCtrl_0d,mode=1,popvalue="0.12",value= root:Packages:NIST:VSANS:VCALC:gDeltaLambda 
     484//      PopupMenu VCALCCtrl_0d,mode=1,popvalue="0.12",value= root:Packages:NIST:VSANS:VCALC:gDeltaLambda 
     485        PopupMenu VCALCCtrl_0d,mode=1,popvalue="0.12" 
    485486         
    486487        // wavelength 
     
    497498        return(0) 
    498499End 
     500 
     501 
     502// White beam preset 
     503// - set monochromator (this sets lam, delLam) 
     504// - disregard the back detector (set as front/middle) 
     505// 
     506Function VC_WhiteBeamPreset() 
     507 
     508        VC_FrontMiddlePreset()          // moves Middle into contact (but w/ wrong lambda) 
     509        // monochromator 
     510        PopupMenu VCALCCtrl_0c,mode=1,popvalue="White Beam" 
     511         
     512        // wavelength spread 
     513        SVAR DLStr = root:Packages:NIST:VSANS:VCALC:gDeltaLambda 
     514        DLStr = "0.40;" 
     515//      PopupMenu VCALCCtrl_0d,mode=1,popvalue="0.40",value= root:Packages:NIST:VSANS:VCALC:gDeltaLambda 
     516        PopupMenu VCALCCtrl_0d,mode=1,popvalue="0.40" 
     517 
     518// wavelength 
     519        SetVariable VCALCCtrl_0b,value=_NUM:5.3,disable=0       ,noedit=0       // allow user editing again 
     520         
     521        return(0) 
     522end 
     523 
     524 
     525// Graphite - high resolution beam preset 
     526// - set monochromator (this sets lam, delLam) 
     527// - uses the back detector (set as front/middle) 
     528// 
     529Function VC_GraphiteMonoPreset() 
     530 
     531        // front carriage 
     532        SetVariable VCALCCtrl_2a,value=_NUM:-20         //Left offset 
     533        SetVariable VCALCCtrl_2aa,value=_NUM:20         //Right offset 
     534        SetVariable VCALCCtrl_2b,value=_NUM:4                   //Top offset 
     535        SetVariable VCALCCtrl_2bb,value=_NUM:-4         //Bottom offset 
     536 
     537        SetVariable VCALCCtrl_2d,value=_NUM:120         //SDD 
     538 
     539        // middle carriage 
     540        SetVariable VCALCCtrl_3a,value=_NUM:-8          //Left offset 
     541        SetVariable VCALCCtrl_3aa,value=_NUM:08 //Right offset 
     542        SetVariable VCALCCtrl_3b,value=_NUM:18                  //Top offset (doesn't matter) 
     543        SetVariable VCALCCtrl_3bb,value=_NUM:-18                //Bottom offset (doesn't matter) 
     544 
     545        SetVariable VCALCCtrl_3d,value=_NUM:1500                //SDD 
     546 
     547        // back carriage         
     548        SetVariable VCALCCtrl_4b,value=_NUM:2300                //SDD 
     549         
     550        // monochromator 
     551        PopupMenu VCALCCtrl_0c,mode=1,popvalue="Graphite" 
     552         
     553        // wavelength spread 
     554        SVAR DLStr = root:Packages:NIST:VSANS:VCALC:gDeltaLambda 
     555        DLStr = "0.01;" 
     556//      PopupMenu VCALCCtrl_0d,mode=1,popvalue="0.12",value= root:Packages:NIST:VSANS:VCALC:gDeltaLambda 
     557        PopupMenu VCALCCtrl_0d,mode=1,popvalue="0.01" 
     558         
     559        // wavelength 
     560        SetVariable VCALCCtrl_0b,value=_NUM:4.75,disable=0      ,noedit=0       // allow user editing again 
     561 
     562        //number of guides 
     563        Slider VCALCCtrl_0a,value= 0 
     564 
     565 
     566// binning mode 
     567        PopupMenu popup_b,mode=1,popValue="F4-M4-B" 
     568 
     569        return(0) 
     570end 
     571 
    499572 
    500573// 
     
    596669// other values are changed in the initialization routines 
    597670// 
    598 Function beamIntensity() 
     671Function V_beamIntensity() 
    599672 
    600673        Variable alpha,f,t,t4,t5,t6,as,solid_angle,l1,d2_phi 
     
    670743Function VC_figureOfMerit() 
    671744 
    672         Variable bi = beamIntensity() 
     745        Variable bi = V_beamIntensity() 
    673746        Variable lambda = VCALC_getWavelength() 
    674747         
Note: See TracChangeset for help on using the changeset viewer.