Ignore:
Timestamp:
Jul 20, 2017 3:22:34 PM (6 years ago)
Author:
srkline
Message:

LOTS of changes to accommodate the beam center being reported in cm rather than pixels. Required a lot of changes to VCALC (to fill in simulated data), and in the reading and interpreting of data for display, and most importantly, the calculation of q.

There may still be a few residual bugs with this. I am still re-testing with new sample data sets.

File:
1 edited

Legend:

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

    r1034 r1055  
    21472147        String fname,detStr 
    21482148         
    2149         Wave xCtr_pix = root:Packages:NIST:VSANS:Globals:Patch:xCtr_pix 
    2150         Wave yCtr_pix = root:Packages:NIST:VSANS:Globals:Patch:yCtr_pix 
     2149        Wave xCtr_cm = root:Packages:NIST:VSANS:Globals:Patch:xCtr_cm 
     2150        Wave yCtr_cm = root:Packages:NIST:VSANS:Globals:Patch:yCtr_cm 
    21512151        Wave/T panelW = root:Packages:NIST:VSANS:Globals:Patch:panelW 
    21522152         
    21532153        // check the dimensions of the waves (9) 
    2154         if (DimSize(xCtr_pix, 0) != 9 || DimSize(yCtr_pix, 0) != 9 || DimSize(panelW, 0) != 9) 
     2154        if (DimSize(xCtr_cm, 0) != 9 || DimSize(yCtr_cm, 0) != 9 || DimSize(panelW, 0) != 9) 
    21552155                Abort "waves are not of proper dimension (9)" 
    21562156        endif 
     
    21632163                        for(ii=0;ii<ItemsInList(ksDetectorListAll);ii+=1) 
    21642164                                detStr = panelW[ii] 
    2165                                 V_writeDet_beam_center_x(fname,detStr,xCtr_pix[ii]) 
    2166                                 V_writeDet_beam_center_y(fname,detStr,yCtr_pix[ii])              
     2165                                V_writeDet_beam_center_x(fname,detStr,xCtr_cm[ii]) 
     2166                                V_writeDet_beam_center_y(fname,detStr,yCtr_cm[ii])               
    21672167                        endfor   
    21682168                 
     
    21832183        Variable ii,jj 
    21842184         
    2185         Wave xCtr_pix = root:Packages:NIST:VSANS:Globals:Patch:xCtr_pix 
    2186         Wave yCtr_pix = root:Packages:NIST:VSANS:Globals:Patch:yCtr_pix 
     2185        Wave xCtr_cm = root:Packages:NIST:VSANS:Globals:Patch:xCtr_cm 
     2186        Wave yCtr_cm = root:Packages:NIST:VSANS:Globals:Patch:yCtr_cm 
    21872187        Wave/T panelW = root:Packages:NIST:VSANS:Globals:Patch:panelW 
    21882188         
     
    21942194                                detStr = StringFromList(ii, ksDetectorListAll, ";") 
    21952195                                panelW[ii] = detStr 
    2196                                 xCtr_pix[ii] = V_getDet_beam_center_x(fname,detStr) 
    2197                                 yCtr_pix[ii] = V_getDet_beam_center_y(fname,detStr) 
     2196                                xCtr_cm[ii] = V_getDet_beam_center_x(fname,detStr)              //these values are in cm, not pixels 
     2197                                yCtr_cm[ii] = V_getDet_beam_center_y(fname,detStr) 
    21982198                        endfor 
    21992199                 
     
    22172217                NewDataFolder/O/S root:Packages:NIST:VSANS:Globals:Patch 
    22182218 
    2219                 Make/O/D/N=9 xCtr_pix,yCtr_pix 
     2219                Make/O/D/N=9 xCtr_cm,yCtr_cm 
    22202220                Make/O/T/N=9 panelW 
    22212221                 
     
    22482248        DrawText 21,258,"Write to all files (inlcusive)" 
    22492249        SetDrawEnv fsize= 14,fstyle= 1 
    2250         DrawText 262,30,"Beam Center (pixels)" 
     2250        DrawText 262,30,"Beam Center (cm)" 
    22512251        DrawText 20,133,"Run Number(s)" 
    22522252         
     
    22612261        SetDataFolder root:Packages:NIST:VSANS:Globals:Patch 
    22622262// display the wave      
    2263         Edit/W=(180,40,500,370)/HOST=#  panelW,xCtr_pix,yCtr_pix 
     2263        Edit/W=(180,40,500,370)/HOST=#  panelW,xCtr_cm,yCtr_cm 
    22642264        ModifyTable width(Point)=0 
    22652265        ModifyTable width(panelW)=80 
    2266         ModifyTable width(xCtr_pix)=100 
    2267         ModifyTable width(yCtr_pix)=100 
     2266        ModifyTable width(xCtr_cm)=100 
     2267        ModifyTable width(yCtr_cm)=100 
    22682268        RenameWindow #,T0 
    22692269        SetActiveSubwindow ## 
Note: See TracChangeset for help on using the changeset viewer.