Ignore:
Timestamp:
Apr 30, 2019 12:17:29 PM (3 years ago)
Author:
srkline
Message:

added a batch patch routine to correct the sample aperture shape and size since it may be incorrectly written by NICE

defined the sector angles to match the SANS definition and updated the associated logic for the averaging and sector display

updated sorting of the file catalog to allow sorting by SDD_F and countRate_F. Also added a second sort key to keep the run numbers in order whenever sorting any other column.

File:
1 edited

Legend:

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

    r1142 r1148  
    29412941        V_fPatch_Guide_SSD_Aperture(lo,hi,numGuideStr,sourceDiam_mm) 
    29422942End 
     2943 
     2944 
    29432945 
    29442946// simple utility to patch all three at once, since they are all linked and typically 
     
    31013103 
    31023104 
    3103  
     3105Proc V_Patch_SampleAperture2(lo,hi,ShapeStr,diam,width,height) 
     3106        Variable lo,hi 
     3107        String shapeStr="CIRCLE" 
     3108        Variable diam,width,height 
     3109         
     3110        V_fPatch_SampleAperture2(lo,hi,ShapeStr,diam,width,height) 
     3111End 
     3112 
     3113// 
     3114// lo is the first file number 
     3115// hi is the last file number (inclusive) 
     3116// 
     3117// Patches sample aperture (2), the external aperture 
     3118// 
     3119// dimensions are expected to be in [cm] 
     3120// 
     3121Function V_fPatch_SampleAperture2(lo,hi,ShapeStr,diam,width,height) 
     3122        Variable lo,hi 
     3123        String ShapeStr 
     3124        Variable diam,width,height 
     3125 
     3126        Variable jj 
     3127        String fname,detStr 
     3128 
     3129                 
     3130        //loop over all files 
     3131        for(jj=lo;jj<=hi;jj+=1) 
     3132                fname = V_FindFileFromRunNumber(jj) 
     3133                if(strlen(fname) != 0) 
     3134                 
     3135                        V_writeSampleAp2_shape(fname,ShapeStr) 
     3136                        if(cmpstr("CIRCLE",ShapeStr)==0) 
     3137                                V_writeSampleAp2_size(fname,diam) 
     3138                        else 
     3139                                //RECTANGLE 
     3140                                V_writeSampleAp2_height(fname,height) 
     3141                                V_writeSampleAp2_width(fname,width)                              
     3142                        endif 
     3143 
     3144                else 
     3145                        printf "run number %d not found\r",jj 
     3146                endif 
     3147        endfor 
     3148         
     3149         
     3150        return(0) 
     3151End 
     3152 
     3153 
Note: See TracChangeset for help on using the changeset viewer.