Ignore:
Timestamp:
Apr 6, 2018 9:06:40 AM (5 years ago)
Author:
srkline
Message:

New dimensions added for the back detector. many functions neede to be updated to accomodate these changes. Beam center is handled in the same way (in cm, not pixels) as other panels even though this panel is like the 2D detectors on SANS.

Still missing is the real values for caibration, pixel size, dead time, etc. that are yet to be measured.

File:
1 edited

Legend:

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

    r1077 r1093  
    593593                 
    594594                //"B" is separate 
    595                 Wave w = V_getDetectorDataW(fname,"B") 
    596                 Wave cal_x = V_getDet_cal_x(fname,"B") 
    597                 Wave cal_y = V_getDet_cal_y(fname,"B") 
    598                 V_NonLinearCorrection_B(fname,w,cal_x,cal_y,"B",destPath) 
    599                 V_ConvertBeamCtr_to_mmB(fname,"B",destPath) 
    600                 V_Detector_CalcQVals(fname,"B",destPath) 
     595                detStr = "B" 
     596                Wave w = V_getDetectorDataW(fname,detStr) 
     597                Wave cal_x = V_getDet_cal_x(fname,detStr) 
     598                Wave cal_y = V_getDet_cal_y(fname,detStr) 
     599                 
     600                V_NonLinearCorrection_B(fname,w,cal_x,cal_y,detStr,destPath) 
     601                 
     602                if(kBCTR_CM) 
     603 
     604                        Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 
     605                        Make/O/D/N=1 $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 
     606                        WAVE x_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_x_mm") 
     607                        WAVE y_mm = $(destPath + ":entry:instrument:detector_"+detStr+":beam_center_y_mm") 
     608                        x_mm[0] = V_getDet_beam_center_x(fname,detStr) * 10             // convert cm to mm 
     609                        y_mm[0] = V_getDet_beam_center_y(fname,detStr) * 10             // convert cm to mm 
     610                         
     611                        // now I need to convert the beam center in mm to pixels 
     612                        // and have some rational place to look for it... 
     613                        V_ConvertBeamCtr_to_pixB(fname,detStr,destPath) 
     614                else 
     615                        // beam center is in pixels, so use the old routine 
     616                        V_ConvertBeamCtr_to_mmB(fname,detStr,destPath) 
     617 
     618                endif 
     619                V_Detector_CalcQVals(fname,detStr,destPath) 
    601620                 
    602621        else 
Note: See TracChangeset for help on using the changeset viewer.