Changeset 1229


Ignore:
Timestamp:
Dec 9, 2019 2:09:56 PM (3 years ago)
Author:
srkline
Message:

adding procedures to correct the XY pixel dimensions for the high-res detector after calibration with a grid of pinholes.

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

Legend:

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

    r1222 r1229  
    4949//              "Read Detetcor Panel Gap",V_ReadDet_Gap() 
    5050                "Patch Detector Distance",V_PatchDet_Distance() 
    51                 "Patch XY Pixel Size",V_Patch_XYPixelSize() 
     51                "Patch XY Pixel Size (M,F)",V_Patch_XYPixelSize() 
     52                "Patch XY Pixel Size (B)",V_Patch_Back_XYPixelSize() 
    5253                "Patch Wavelength",V_Patch_Wavelength() 
    5354                "Patch Monochromator Type",V_Patch_MonochromatorType() 
    5455                "-" 
    55                 "Patch Back Detector Values",V_Patch_Back_Detector() 
     56//              "Patch Back Detector Values",V_Patch_Back_Detector() 
    5657                "Patch NumberOfGuides_SSD_Aperture ",V_Patch_Guide_SSD_Aperture() 
    5758                "Patch Beam Stop",V_Patch_BeamStop() 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_PatchFiles.ipf

    r1222 r1229  
    25232523End 
    25242524 
     2525Proc V_Patch_Back_XYPixelSize(lo,hi) 
     2526        Variable lo,hi 
     2527         
     2528        V_fPatch_BackDetectorPixel(lo,hi) 
     2529end 
    25252530 
    25262531Proc V_Patch_XYPixelSize(lo,hi) 
     
    28522857// simple utility to patch all of the values associated with the back detector 
    28532858// 
    2854 // 
    2855 // 
     2859// as of Dec 2019, this is not used any longer as these values are all written correctly, 
     2860// except for patching old data with the XY pixel dimensions (separate macro) 
    28562861// 
    28572862// 
     
    29202925        return(0) 
    29212926End 
     2927 
     2928 
     2929// 
     2930// simple utility to patch the X and Y Pixel dimensions for the back detector 
     2931// the cal_x(y) values are what is actually used to calculate the real space distance 
     2932// and then ultimately the q-values. 
     2933// 
     2934// **this updated value for the pixel size is from a measurement of a grid of pinholes 
     2935// as a mask in front of the detector (done in Sept 2019,  run 43550 - calculations 
     2936// done in Dec 2019) 
     2937// 
     2938// 
     2939// lo is the first file number 
     2940// hi is the last file number (inclusive) 
     2941// 
     2942Function V_fPatch_BackDetectorPixel(lo,hi) 
     2943        Variable lo,hi 
     2944 
     2945         
     2946        Variable ii,jj 
     2947        String fname,detStr 
     2948         
     2949        detStr = "B" 
     2950         
     2951        Make/O/D/N=3 cal_x,cal_y 
     2952        cal_x[0] = 0.03175                      // pixel size in VCALC_getPixSizeX(detStr) is [cm] 
     2953        cal_x[1] = 1 
     2954        cal_x[2] = 10000 
     2955        cal_y[0] = 0.03175              // pixel size in VCALC_getPixSizeX(detStr) is [cm] 
     2956        cal_y[1] = 1 
     2957        cal_y[2] = 10000 
     2958         
     2959         
     2960        //loop over all files 
     2961        for(jj=lo;jj<=hi;jj+=1) 
     2962                fname = V_FindFileFromRunNumber(jj) 
     2963                if(strlen(fname) != 0) 
     2964                 
     2965                // patch cal_x and cal_y 
     2966                        V_writeDet_cal_x(fname,detStr,cal_x) 
     2967                        V_writeDet_cal_y(fname,detStr,cal_y) 
     2968                                 
     2969                // patch pixel size x and y [cm] 
     2970                        V_writeDet_x_pixel_size(fname,detStr,0.03175) 
     2971                        V_writeDet_y_pixel_size(fname,detStr,0.03175) 
     2972                                         
     2973                else 
     2974                        printf "run number %d not found\r",jj 
     2975                endif 
     2976        endfor 
     2977         
     2978        KillWaves/Z cal_x,cal_y 
     2979        return(0) 
     2980End 
     2981 
     2982 
    29222983 
    29232984// 
Note: See TracChangeset for help on using the changeset viewer.