Ignore:
Timestamp:
Oct 18, 2018 12:09:16 PM (4 years ago)
Author:
srkline
Message:

extensive changes to accomodate 1x1 binning of the HighRes? detector. It is implemented as a global flag. Currently only 4x4 and 1x1 are allowed. 1x1 has never been tested in reality, only simulated data - so my assumed dimensions may not be correct. look for TODOHIGHRES in the file for places that may need to be updated for different file dimensions. Testing of the simulated data is proving to be excruciatingly slow, but passable for a test. Speed optimization will be needed if this is the final solution. Memory management will also be an issue since every "copy" of the highRes matrix is enormous. Carry as few of these around as possible in the future to keep the experiment size to something reasonable.

File:
1 edited

Legend:

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

    r1106 r1117  
    28492849        return(0) 
    28502850End 
     2851 
     2852// 
     2853// simple utility to patch all of the pixel sizes 
     2854// - in the header, the Y size for LR panels was grossly wrong (4 mm) 
     2855// and all of the values are slightly off from the true values 
     2856// 
     2857// data collected after 10/3/18 should not need this patch since the 
     2858// config.js file was updated 
     2859// 
     2860// 
     2861// 
     2862// lo is the first file number 
     2863// hi is the last file number (inclusive) 
     2864// 
     2865Function V_fPatch_XYPixelSize(lo,hi) 
     2866        Variable lo,hi 
     2867 
     2868         
     2869        Variable ii,jj 
     2870        String fname,detStr 
     2871         
     2872         
     2873        //loop over all files 
     2874        for(jj=lo;jj<=hi;jj+=1) 
     2875                fname = V_FindFileFromRunNumber(jj) 
     2876                if(strlen(fname) != 0) 
     2877                         
     2878                // patch pixel size x and y [cm] L/R panels 
     2879                        V_writeDet_x_pixel_size(fname,"FL",8.4) 
     2880                        V_writeDet_y_pixel_size(fname,"FL",8.14) 
     2881 
     2882                        V_writeDet_x_pixel_size(fname,"FR",8.4) 
     2883                        V_writeDet_y_pixel_size(fname,"FR",8.14)                         
     2884 
     2885                        V_writeDet_x_pixel_size(fname,"ML",8.4) 
     2886                        V_writeDet_y_pixel_size(fname,"ML",8.14) 
     2887 
     2888                        V_writeDet_x_pixel_size(fname,"MR",8.4) 
     2889                        V_writeDet_y_pixel_size(fname,"MR",8.14) 
     2890                         
     2891                // patch pixel size x and y [cm] T/B panels 
     2892                        V_writeDet_x_pixel_size(fname,"FT",4.16) 
     2893                        V_writeDet_y_pixel_size(fname,"FT",8.4) 
     2894 
     2895                        V_writeDet_x_pixel_size(fname,"FB",4.16) 
     2896                        V_writeDet_y_pixel_size(fname,"FB",8.4)                  
     2897 
     2898                        V_writeDet_x_pixel_size(fname,"MT",4.16) 
     2899                        V_writeDet_y_pixel_size(fname,"MT",8.4) 
     2900 
     2901                        V_writeDet_x_pixel_size(fname,"MB",4.16) 
     2902                        V_writeDet_y_pixel_size(fname,"MB",8.4)                  
     2903                         
     2904                else 
     2905                        printf "run number %d not found\r",jj 
     2906                endif 
     2907        endfor 
     2908         
     2909        return(0) 
     2910End 
     2911 
Note: See TracChangeset for help on using the changeset viewer.