Ignore:
Timestamp:
Aug 29, 2017 12:55:04 PM (5 years ago)
Author:
srkline
Message:

many changes to the VCALC code and a few changes to the main code to get the units consistent, and centimeters everywhere possible. The real space distance array and the non-linear calibrations are still defined and calculated in mm. This can hopefully be changed in the future. Some constants in the data file will need to be updated to cm, such as the T/B setback, which has been confirmed to be 41.0 cm

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

Legend:

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

    r1055 r1062  
    125125 
    126126        Variable xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY,nPix_X,nPix_Y 
    127         Variable F_LR_sep,F_TB_sep,F_offset,F_sdd_offset 
     127        Variable F_LR_sep,F_TB_sep,F_offset,F_sdd_setback 
    128128 
    129129        String folderPath = "root:Packages:NIST:VSANS:VCALC" 
     
    136136        F_offset = VCALC_getLateralOffset("FL") 
    137137         
    138         SDD = VCALC_getSDD("FL")                //nominal SDD - need offset for TB 
     138        SDD = VCALC_getSDD("FL")                //nominal SDD [cm] - need offset for TB 
    139139        lam = VCALC_getWavelength() 
    140140 
    141 //separations are in mm -- need to watch the units, convert to cm 
    142         F_LR_sep /= 10 
    143         F_TB_sep /= 10 
     141//separations are in cm --  
     142//      F_LR_sep /= 10 
     143//      F_TB_sep /= 10 
    144144// TODO - I'm treating the separation as the TOTAL width - so the difference 
    145145//      from the "center" to the edge is 1/2 of the separation 
     
    147147// TODO (make the N along the tube length a variable, since this can be reset @ acquisition) 
    148148 
    149         F_sdd_offset = VCALC_getTopBottomSDDOffset("FT")        //T/B are 300 mm farther back  //TODO: make all detector parameters global, not hard-wired 
     149        F_sdd_setback = VCALC_getTopBottomSDDSetback("FT")      //T/B are 41 cm farther back  //TODO: make all detector parameters global, not hard-wired 
    150150 
    151151// detector data to bin 
     
    274274        // global sdd_offset is in (mm), convert to meters here for the Q-calculation 
    275275//      VC_Detector_2Q(det_FT,qTot_FT,qx_FT,qy_FT,qz_FT,xCtr,yCtr,sdd+F_sdd_offset/1000,lam,pixSizeX,pixSizeY) 
    276         VC_Detector_2Q_NonLin(det_FT,qTot_FT,qx_FT,qy_FT,qz_FT,xCtr,yCtr,sdd+F_sdd_offset/1000,lam,pixSizeX,pixSizeY,"FT") 
     276        VC_Detector_2Q_NonLin(det_FT,qTot_FT,qx_FT,qy_FT,qz_FT,xCtr,yCtr,sdd+F_sdd_setback,lam,pixSizeX,pixSizeY,"FT") 
    277277 
    278278//      Print "xy for FT = ",xCtr,yCtr 
     
    315315        // global sdd_offset is in (mm), convert to meters here for the Q-calculation 
    316316//      VC_Detector_2Q(det_FB,qTot_FB,qx_FB,qy_FB,qz_FB,xCtr,yCtr,sdd+F_sdd_offset/1000,lam,pixSizeX,pixSizeY) 
    317         VC_Detector_2Q_NonLin(det_FB,qTot_FB,qx_FB,qy_FB,qz_FB,xCtr,yCtr,sdd+F_sdd_offset/1000,lam,pixSizeX,pixSizeY,"FB") 
     317        VC_Detector_2Q_NonLin(det_FB,qTot_FB,qx_FB,qy_FB,qz_FB,xCtr,yCtr,sdd+F_sdd_setback,lam,pixSizeX,pixSizeY,"FB") 
    318318 
    319319//      Print "xy for FB = ",xCtr,yCtr 
     
    347347                LR_sep = V_Value         
    348348        endif            
    349 //separations on panel are in mm -- need to watch the units, convert to cm 
    350         LR_sep /= 10 
     349//separations on panel are in cm -- need to watch the units, convert to cm 
     350//      LR_sep /= 10 
    351351 
    352352//detector data 
     
    570570 
    571571        Variable xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY,nPix_X,nPix_Y 
    572         Variable M_LR_sep,M_TB_sep,M_offset, M_sdd_offset 
     572        Variable M_LR_sep,M_TB_sep,M_offset, M_sdd_setback 
    573573 
    574574 
     
    581581        M_offset = VCALC_getLateralOffset("ML") 
    582582         
    583         SDD = VCALC_getSDD("ML")                //nominal SDD - need offset for TB 
     583        SDD = VCALC_getSDD("ML")                //nominal SDD [cm] - need offset for TB 
    584584        lam = VCALC_getWavelength() 
    585585 
    586 //separations are in mm -- need to watch the units, convert to cm 
    587         M_LR_sep /= 10 
    588         M_TB_sep /= 10 
     586//separations are in cm -- need to watch the units, convert to cm 
     587//      M_LR_sep /= 10 
     588//      M_TB_sep /= 10 
    589589// TODO - I'm treating the separation as the TOTAL width - so the difference 
    590590//      from the "center" to the edge is 1/2 of the separation 
    591591 
    592592// TODO (make the N along the tube length a variable, since this can be reset @ acquisition) 
    593         M_sdd_offset = VCALC_getTopBottomSDDOffset("MT")        //T/B are 30 cm farther back  //TODO: make all detector parameters global, not hard-wired 
     593        M_sdd_setback = VCALC_getTopBottomSDDSetback("MT")      //T/B are 41 cm farther back  //TODO: make all detector parameters global, not hard-wired 
    594594 
    595595 
     
    723723        // global sdd_offset is in (mm), convert to meters here for the Q-calculation   
    724724//      VC_Detector_2Q(det_MT,qTot_MT,qx_MT,qy_MT,qz_MT,xCtr,yCtr,sdd+M_sdd_offset/1000,lam,pixSizeX,pixSizeY) 
    725         VC_Detector_2Q_NonLin(det_MT,qTot_MT,qx_MT,qy_MT,qz_MT,xCtr,yCtr,sdd+M_sdd_offset/1000,lam,pixSizeX,pixSizeY,"MT") 
     725        VC_Detector_2Q_NonLin(det_MT,qTot_MT,qx_MT,qy_MT,qz_MT,xCtr,yCtr,sdd+M_sdd_setback,lam,pixSizeX,pixSizeY,"MT") 
    726726 
    727727//      Print "xy for MT = ",xCtr,yCtr 
     
    764764                // global sdd_offset is in (mm), convert to meters here for the Q-calculation 
    765765//      VC_Detector_2Q(det_MB,qTot_MB,qx_MB,qy_MB,qz_MB,xCtr,yCtr,sdd+M_sdd_offset/1000,lam,pixSizeX,pixSizeY) 
    766         VC_Detector_2Q_NonLin(det_MB,qTot_MB,qx_MB,qy_MB,qz_MB,xCtr,yCtr,sdd+M_sdd_offset/1000,lam,pixSizeX,pixSizeY,"MB") 
     766        VC_Detector_2Q_NonLin(det_MB,qTot_MB,qx_MB,qy_MB,qz_MB,xCtr,yCtr,sdd+M_sdd_setback,lam,pixSizeX,pixSizeY,"MB") 
    767767 
    768768//      Print "xy for MB = ",xCtr,yCtr 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_DetectorBinning_Utils.ipf

    r1055 r1062  
    3636        // need SDD 
    3737        // need pixel dimensions 
    38         // nominal sdd in meters, offset in mm, want result in cm ! 
    39         sdd = VCALC_getSDD(type)*100    +  VCALC_getTopBottomSDDOffset(type) / 10               // result is sdd in [cm] 
     38        // nominal sdd in cm, offset in cm, want result in cm ! 
     39        sdd = VCALC_getSDD(type)        +  VCALC_getTopBottomSDDSetback(type)           // result is sdd in [cm] 
    4040 
    4141        pixSizeX = VCALC_getPixSizeX(type)              // cm 
     
    193193// 
    194194// 
    195 // -- sdd in meters 
     195// -- sdd in cm 
    196196// -- lambda in Angstroms 
    197197Function VC_Detector_2Q(data,qTot,qx,qy,qz,xCtr,yCtr,sdd,lam,pixSizeX,pixSizeY) 
     
    215215// reverts to the "regular" linear detector if waves not found or a flag is set 
    216216// 
    217 // need to convert the beam center to mm 
    218217// need to call the VSANS V_CalcQval routines (these use the real-space distance, not pixel dims) 
     218// 
     219// ***** everything passed in is [cm], except for wavelength [A] 
     220// 
     221// ****  TODO :: calibration constants are still in [mm] 
     222// 
    219223// 
    220224// TODO: 
     
    267271         
    268272//      Wave w_calib = V_getDetTube_spatialCalib("VCALC",detStr) 
    269         Variable tube_width = 8.4                       // TODO: Hard-wired value!! 
     273        Variable tube_width = 8.4                       // TODO: UNITS!!! Hard-wired value in [mm] 
    270274        if(cmpstr(detStr,"B") == 0) 
    271275                V_NonLinearCorrection_B("VCALC",data,tmpCalib,tmpCalib,detStr,destPath) 
     
    280284        if(kBCTR_CM) 
    281285                if(gUseNonLinearDet && WaveExists(data_realDistX) && WaveExists(data_realDistY)) 
    282                         // no need to convert the beam centers to real space, just to mm 
    283                         xCtr *= 10              // convert from cm to mm 
    284                         yCtr *= 10               
     286                        // beam ctr is in cm already 
     287 
    285288                        // calculate all of the q-values 
    286289                        qTot = V_CalcQval(p,q,xCtr,yCtr,sdd,lam,data_realDistX,data_realDistY) 
     
    365368//and are in detector coordinates (1,128) rather than axis values 
    366369//the pixel locations need not be integers, reals are ok inputs 
    367 //sdd is in meters 
     370//sdd is in [cm] 
    368371//wavelength is in Angstroms 
    369372// 
     
    376379        Variable dx,dy,qval,two_theta,dist 
    377380                 
    378         sdd *=100               //convert to cm 
     381 
    379382        dx = (xaxval - xctr)*pixSizeX           //delta x in cm 
    380383        dy = (yaxval - yctr)*pixSizeY           //delta y in cm 
     
    392395//ALL inputs are in detector coordinates 
    393396// 
    394 //sdd is in meters 
     397//sdd is in [cm] 
    395398//wavelength is in Angstroms 
    396399// 
     
    405408        qval = VC_CalcQval(xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY) 
    406409         
    407         sdd *=100               //convert to cm 
     410//      sdd *=100               //convert to cm 
    408411        dx = (xaxval - xctr)*pixSizeX           //delta x in cm 
    409412        dy = (yaxval - yctr)*pixSizeY           //delta y in cm 
     
    422425//input/output is the same as CalcQval() 
    423426//ALL inputs are in detector coordinates 
    424 //sdd is in meters 
     427//sdd is in [cm] 
    425428//wavelength is in Angstroms 
    426429// 
     
    435438        qval = VC_CalcQval(xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY) 
    436439         
    437         sdd *=100               //convert to cm 
     440//      sdd *=100               //convert to cm 
    438441        dx = (xaxval - xctr)*pixSizeX           //delta x in cm 
    439442        dy = (yaxval - yctr)*pixSizeY           //delta y in cm 
     
    452455//input/output is the same as CalcQval() 
    453456//ALL inputs are in detector coordinates 
    454 //sdd is in meters 
     457//sdd is in [cm] 
    455458//wavelength is in Angstroms 
    456459// 
     
    464467        qval = VC_CalcQval(xaxval,yaxval,xctr,yctr,sdd,lam,pixSizeX,pixSizeY) 
    465468         
    466         sdd *=100               //convert to cm 
     469//      sdd *=100               //convert to cm 
    467470         
    468471        //get scattering angle to project onto flat detector => Qr = qval*cos(theta) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_FrontView_Deg.ipf

    r955 r1062  
    4141        Variable axisRange 
    4242         
    43 // these offset values are in mm !! 
    44 //in mm !!  distance T/B are behind L/R - not to be confused with lateral offset 
    45         NVAR front_SDDOffset = root:Packages:NIST:VSANS:VCALC:gFront_SDDOffset 
    46         NVAR middle_SDDOffset = root:Packages:NIST:VSANS:VCALC:gMiddle_SDDOffset 
     43// these offset values are in cm !! 
     44//in cm !!  distance T/B are behind L/R - not to be confused with lateral offset 
     45        NVAR front_SDDsetback = root:Packages:NIST:VSANS:VCALC:gFront_SDDsetback 
     46        NVAR middle_SDDsetback = root:Packages:NIST:VSANS:VCALC:gMiddle_SDDsetback 
    4747         
    4848         
     
    9595 
    9696        //start drawing from the back, and work to the front as would be visible 
    97         // ********* all of the dimensions are converted to mm 
     97        // ********* all of the dimensions are in cm 
    9898        Variable tmp_x1,tmp_x2,tmp_y1,tmp_y2 
    9999         
    100100        // back detector +/- degrees 
    101         tmp_x1 = -atan(B_w/2/(B_SDD*1000)) *(180/pi) 
     101        tmp_x1 = -atan(B_w/2/(B_SDD)) *(180/pi) 
    102102        tmp_x2 = -tmp_x1 
    103         tmp_y1 = -atan(B_h/2/(B_SDD*1000)) *(180/pi) 
     103        tmp_y1 = -atan(B_h/2/(B_SDD)) *(180/pi) 
    104104        tmp_y2 = -tmp_y1 
    105105         
     
    113113// TO DO -- add in the additional offset (backwards) to the SDD of the T/B panels 
    114114// TOP 
    115         tmp_x1 = -atan(M_TB_w/2/(M_SDD*1000+middle_SDDOffset))*(180/pi)         // x symmetric y is not 
     115        tmp_x1 = -atan(M_TB_w/2/(M_SDD+middle_SDDsetback))*(180/pi)             // x symmetric y is not 
    116116        tmp_x2 = -tmp_x1 
    117         tmp_y1 = atan(M_TB_sep/2/(M_SDD*1000+middle_SDDOffset))*(180/pi) 
    118         tmp_y2 = atan((M_TB_sep/2+M_TB_h)/(M_SDD*1000+middle_SDDOffset))*(180/pi) 
     117        tmp_y1 = atan(M_TB_sep/2/(M_SDD+middle_SDDsetback))*(180/pi) 
     118        tmp_y2 = atan((M_TB_sep/2+M_TB_h)/(M_SDD+middle_SDDsetback))*(180/pi) 
    119119         
    120120//      Print tmp_x1,tmp_x2,tmp_y1,tmp_y2 
     
    124124                 
    125125// BOTTOM (x unchanged, negate and swap y1,y2) 
    126         tmp_y1 = -atan((M_TB_sep/2+M_TB_h)/(M_SDD*1000+middle_SDDOffset))*(180/pi) 
    127         tmp_y2 = -atan(M_TB_sep/2/(M_SDD*1000+middle_SDDOffset))*(180/pi) 
     126        tmp_y1 = -atan((M_TB_sep/2+M_TB_h)/(M_SDD+middle_SDDsetback))*(180/pi) 
     127        tmp_y2 = -atan(M_TB_sep/2/(M_SDD+middle_SDDsetback))*(180/pi) 
    128128        SetDrawEnv/W=VCALC#FrontView xcoord= bottom,ycoord= left,fillfgc= (1,16019,65535) 
    129129        DrawRect/W=VCALC#FrontView tmp_x1,tmp_y2,tmp_x2,tmp_y1           
    130130         
    131131// LEFT 
    132         tmp_x1 = -atan((M_LR_w+M_LR_sep/2)/(M_SDD*1000))*(180/pi)               // y symmetric x is not 
    133         tmp_x2 = -atan((M_LR_sep/2)/(M_SDD*1000))*(180/pi) 
    134         tmp_y1 = atan(M_LR_h/2/(M_SDD*1000))*(180/pi) 
     132        tmp_x1 = -atan((M_LR_w+M_LR_sep/2)/(M_SDD))*(180/pi)            // y symmetric x is not 
     133        tmp_x2 = -atan((M_LR_sep/2)/(M_SDD))*(180/pi) 
     134        tmp_y1 = atan(M_LR_h/2/(M_SDD))*(180/pi) 
    135135        tmp_y2 = -tmp_y1 
    136136        SetDrawEnv/W=VCALC#FrontView xcoord= bottom,ycoord= left,fillfgc= (65535,0,0) 
    137137        DrawRect/W=VCALC#FrontView tmp_x1,tmp_y2,tmp_x2,tmp_y1                   
    138138// RIGHT (x changes, y the same) 
    139         tmp_x1 = atan((M_LR_sep/2)/(M_SDD*1000))*(180/pi)               // y symmetric x is not 
    140         tmp_x2 = atan((M_LR_w+M_LR_sep/2)/(M_SDD*1000))*(180/pi) 
     139        tmp_x1 = atan((M_LR_sep/2)/(M_SDD))*(180/pi)            // y symmetric x is not 
     140        tmp_x2 = atan((M_LR_w+M_LR_sep/2)/(M_SDD))*(180/pi) 
    141141        SetDrawEnv/W=VCALC#FrontView xcoord= bottom,ycoord= left,fillfgc= (65535,0,0) 
    142142        DrawRect/W=VCALC#FrontView tmp_x1,tmp_y2,tmp_x2,tmp_y1   
     
    148148// TO DO -- add in the additional offset (backwards) to the SDD of the T/B panels 
    149149// TOP 
    150         tmp_x1 = -atan(F_TB_w/2/(F_SDD*1000+front_SDDOffset))*(180/pi)          // x symmetric y is not 
     150        tmp_x1 = -atan(F_TB_w/2/(F_SDD+front_SDDsetback))*(180/pi)              // x symmetric y is not 
    151151        tmp_x2 = -tmp_x1 
    152         tmp_y1 = atan(F_TB_sep/2/(F_SDD*1000+front_SDDOffset))*(180/pi) 
    153         tmp_y2 = atan((F_TB_sep/2+F_TB_h)/(F_SDD*1000+front_SDDOffset))*(180/pi) 
     152        tmp_y1 = atan(F_TB_sep/2/(F_SDD+front_SDDsetback))*(180/pi) 
     153        tmp_y2 = atan((F_TB_sep/2+F_TB_h)/(F_SDD+front_SDDsetback))*(180/pi) 
    154154         
    155155//      Print tmp_x1,tmp_x2,tmp_y1,tmp_y2 
     
    159159                 
    160160// BOTTOM (x unchanged, negate and swap y1,y2) 
    161         tmp_y1 = -atan((F_TB_sep/2+F_TB_h)/(F_SDD*1000+front_SDDOffset))*(180/pi) 
    162         tmp_y2 = -atan(F_TB_sep/2/(F_SDD*1000+front_SDDOffset))*(180/pi) 
     161        tmp_y1 = -atan((F_TB_sep/2+F_TB_h)/(F_SDD+front_SDDsetback))*(180/pi) 
     162        tmp_y2 = -atan(F_TB_sep/2/(F_SDD+front_SDDsetback))*(180/pi) 
    163163        SetDrawEnv/W=VCALC#FrontView xcoord= bottom,ycoord= left,fillfgc= (1,52428,26586) 
    164164        DrawRect/W=VCALC#FrontView tmp_x1,tmp_y2,tmp_x2,tmp_y1           
    165165         
    166166// LEFT 
    167         tmp_x1 = -atan((F_LR_w+F_LR_sep/2)/(F_SDD*1000))*(180/pi)               // y symmetric x is not 
    168         tmp_x2 = -atan((F_LR_sep/2)/(F_SDD*1000))*(180/pi) 
    169         tmp_y1 = atan(F_LR_h/2/(F_SDD*1000))*(180/pi) 
     167        tmp_x1 = -atan((F_LR_w+F_LR_sep/2)/(F_SDD))*(180/pi)            // y symmetric x is not 
     168        tmp_x2 = -atan((F_LR_sep/2)/(F_SDD))*(180/pi) 
     169        tmp_y1 = atan(F_LR_h/2/(F_SDD))*(180/pi) 
    170170        tmp_y2 = -tmp_y1 
    171171        SetDrawEnv/W=VCALC#FrontView xcoord= bottom,ycoord= left,fillfgc= (39321,26208,1) 
    172172        DrawRect/W=VCALC#FrontView tmp_x1,tmp_y2,tmp_x2,tmp_y1                   
    173173// RIGHT (x changes, y the same) 
    174         tmp_x1 = atan((F_LR_sep/2)/(F_SDD*1000))*(180/pi)               // y symmetric x is not 
    175         tmp_x2 = atan((F_LR_w+F_LR_sep/2)/(F_SDD*1000))*(180/pi) 
     174        tmp_x1 = atan((F_LR_sep/2)/(F_SDD))*(180/pi)            // y symmetric x is not 
     175        tmp_x2 = atan((F_LR_w+F_LR_sep/2)/(F_SDD))*(180/pi) 
    176176        SetDrawEnv/W=VCALC#FrontView xcoord= bottom,ycoord= left,fillfgc= (39321,26208,1) 
    177177        DrawRect/W=VCALC#FrontView tmp_x1,tmp_y2,tmp_x2,tmp_y1   
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_SideView.ipf

    r954 r1062  
    8181        Variable B_SDD, B_offset 
    8282 
    83         NVAR TB_SDD_offset = gFront_SDDOffset           //in mm !!  distance T/B are behind L/R - not to be confused with lateral offset 
     83        NVAR TB_SDD_setback = gFront_SDDsetback         //in [cm]  distance T/B are behind L/R - not to be confused with lateral offset 
    8484         
    8585        //front 
     
    115115 
    116116// FRONT 
    117         FT_profileX = F_SDD+TB_SDD_offset/1000          //SDD in meters, set back from L/R      ---- convert to meters for the plot 
     117        FT_profileX = (F_SDD+TB_SDD_setback)            //SDD in [cm], set back from L/R        ---- convert to meters for the plot? 
    118118        FB_profileX = FT_profileX 
    119119         
    120         FT_profileY[0] = F_TB_sep               // separation in mm 
    121         FT_profileY[1] = FT_profileY[0] + F_TB_h        // add in height of T/B panel in mm 
     120        FT_profileY[0] = F_TB_sep               // separation in cm 
     121        FT_profileY[1] = FT_profileY[0] + F_TB_h        // add in height of T/B panel in cm 
    122122         
    123123        FB_profileY = -FT_profileY 
     
    125125        //angles (not calculating anything, just connect the dots) 
    126126        FT_rayX[0] = 0 
    127         FT_rayX[1] = F_SDD+TB_SDD_offset/1000 
    128         FT_rayX[2] = F_SDD+TB_SDD_offset/1000 
     127        FT_rayX[1] = F_SDD+TB_SDD_setback 
     128        FT_rayX[2] = F_SDD+TB_SDD_setback 
    129129        FT_rayX[3] = 0 
    130130         
     
    136136         
    137137        FB_rayX[0] = 0 
    138         FB_rayX[1] = F_SDD+TB_SDD_offset/1000 
    139         FB_rayX[2] = F_SDD+TB_SDD_offset/1000 
     138        FB_rayX[1] = F_SDD+TB_SDD_setback 
     139        FB_rayX[2] = F_SDD+TB_SDD_setback 
    140140        FB_rayX[3] = 0 
    141141         
     
    147147 
    148148// MIDDLE        
    149         MT_profileX = M_SDD+TB_SDD_offset/1000          //SDD in meters 
     149        MT_profileX = M_SDD+TB_SDD_setback              //SDD in [cm] 
    150150        MB_profileX = MT_profileX 
    151151         
    152         MT_profileY[0] = M_TB_sep               // separation in mm 
    153         MT_profileY[1] = MT_profileY[0] + M_TB_h        // add in height of T/B panel in mm 
     152        MT_profileY[0] = M_TB_sep               // separation in cm 
     153        MT_profileY[1] = MT_profileY[0] + M_TB_h        // add in height of T/B panel in cm 
    154154         
    155155        MB_profileY = -MT_profileY 
     
    157157        //angles (not calculating anything, just connect the dots) 
    158158        MT_rayX[0] = 0 
    159         MT_rayX[1] = M_SDD+TB_SDD_offset/1000 
    160         MT_rayX[2] = M_SDD+TB_SDD_offset/1000 
     159        MT_rayX[1] = M_SDD+TB_SDD_setback 
     160        MT_rayX[2] = M_SDD+TB_SDD_setback 
    161161        MT_rayX[3] = 0 
    162162         
     
    168168         
    169169        MB_rayX[0] = 0 
    170         MB_rayX[1] = M_SDD+TB_SDD_offset/1000 
    171         MB_rayX[2] = M_SDD+TB_SDD_offset/1000 
     170        MB_rayX[1] = M_SDD+TB_SDD_setback 
     171        MB_rayX[2] = M_SDD+TB_SDD_setback 
    172172        MB_rayX[3] = 0 
    173173         
     
    178178 
    179179// BACK 
    180         B_S_profileX = B_SDD            //SDDb in meters 
     180        B_S_profileX = B_SDD            //SDDb in [cm] 
    181181         
    182182        B_S_profileY[0] = B_h/2         // half-height 
     
    230230                ModifyGraph/W=VCALC#SideView mirror=2 
    231231                ModifyGraph/W=VCALC#SideView nticks(left)=8 
    232                 Label/W=VCALC#SideView left "\\Z10Vertical position (mm)" 
    233                 Label/W=VCALC#SideView bottom "\\Z10SDD (meters)" 
    234                 SetAxis/W=VCALC#SideView left -800,800 
    235                 SetAxis/W=VCALC#SideView bottom 0,25 
     232                Label/W=VCALC#SideView left "\\Z10Vertical position (cm)" 
     233                Label/W=VCALC#SideView bottom "\\Z10SDD (cm)" 
     234                SetAxis/W=VCALC#SideView left -80.0,80.0 
     235                SetAxis/W=VCALC#SideView bottom 0,2500 
    236236//              TextBox/W=VCALC#SideView/C/N=text0/A=MC/X=22.54/Y=42.04 "\\JCSIDE VIEW\rOnly the Top/Bottom panels are shown" 
    237237                TextBox/W=VCALC#SideView/C/N=text0/A=MC/X=40.15/Y=43.62 "\\JCSIDE VIEW\r= Top/Bottom panels" 
     
    337337 
    338338// FRONT 
    339         FL_profileX = F_SDD             //SDD in meters 
     339        FL_profileX = F_SDD             //SDD in [cm] 
    340340        FR_profileX = FL_profileX 
    341341         
    342         FL_profileY[0] = F_LR_sep               // separation in mm 
    343         FL_profileY[1] = FL_profileY[0] + F_LR_w        // add in width of L/R panel in mm 
     342        FL_profileY[0] = F_LR_sep               // separation in cm 
     343        FL_profileY[1] = FL_profileY[0] + F_LR_w        // add in width of L/R panel in cm 
    344344         
    345345        FR_profileY = -FL_profileY 
     
    369369 
    370370// MIDDLE        
    371         ML_profileX = M_SDD             //SDD in meters 
     371        ML_profileX = M_SDD             //SDD in [cm] 
    372372        MR_profileX = ML_profileX 
    373373         
    374         ML_profileY[0] = M_LR_sep               // separation in mm 
    375         ML_profileY[1] = ML_profileY[0] + M_LR_w        // add in width of L/R panel in mm 
     374        ML_profileY[0] = M_LR_sep               // separation in cm 
     375        ML_profileY[1] = ML_profileY[0] + M_LR_w        // add in width of L/R panel in cm 
    376376         
    377377        MR_profileY = -ML_profileY 
     
    400400 
    401401// BACK 
    402         B_T_profileX = B_SDD            //SDDb in meters 
     402        B_T_profileX = B_SDD            //SDDb in [cm] 
    403403         
    404404        B_T_profileY[0] = B_h/2         // half-height 
     
    452452                ModifyGraph/W=VCALC#TopView mirror=2 
    453453                ModifyGraph/W=VCALC#TopView nticks(left)=8 
    454                 Label/W=VCALC#TopView left "\\Z10Horizontal position (mm)" 
    455                 Label/W=VCALC#TopView bottom "\\Z10SDD (meters)" 
    456                 SetAxis/W=VCALC#TopView left -800,800 
    457                 SetAxis/W=VCALC#TopView bottom 0,25 
     454                Label/W=VCALC#TopView left "\\Z10Horizontal position (cm)" 
     455                Label/W=VCALC#TopView bottom "\\Z10SDD (cm)" 
     456                SetAxis/W=VCALC#TopView left -80.0,80.0 
     457                SetAxis/W=VCALC#TopView bottom 0,2500 
    458458                TextBox/W=VCALC#TopView/C/N=text0/A=MC/X=41.61/Y=43.62 "\\JCTOP VIEW\r= Left/Right panels" 
    459459        endif 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_UtilityProcedures.ipf

    r994 r1062  
    1919 
    2020 
    21 // returns the nominal SDD from the panel -- value is METERS 
    22 // Does NOT include the set back (offset) of the T/B panels. This is a separate value 
     21// returns the nominal SDD from the panel -- value is [cm] 
     22// Does NOT include the setback of the T/B panels. This is a separate value 
    2323Function VCALC_getSDD(type) 
    2424        String type 
     
    6262end 
    6363 
    64 // returns the panel separation [mm] 
     64// returns the panel separation [cm] 
    6565Function VCALC_getPanelSeparation(type) 
    6666        String type 
     
    107107end 
    108108 
    109 // returns the lateral panel offset [mm] 
     109// returns the lateral panel offset [cm] 
    110110Function VCALC_getLateralOffset(type) 
    111111        String type 
     
    381381 
    382382// SDD offset of the top/bottom panels 
    383 // value returned is in mm (so beware) 
    384 // 
    385 Function VCALC_getTopBottomSDDOffset(type) 
     383// value returned is in [cm]  
     384// 
     385Function VCALC_getTopBottomSDDSetback(type) 
    386386        String type 
    387387 
     
    396396                case "FT": 
    397397                case "FB":               
    398                         NVAR sdd_offset = gFront_SDDOffset      //T/B are 300 mm farther back  
     398                        NVAR sdd_setback = gFront_SDDsetback    //T/B are 41 cm farther back  
    399399                        break 
    400400                         
     
    406406                case "MT": 
    407407                case "MB": 
    408                         NVAR sdd_offset = gMiddle_SDDOffset     //T/B are 300 mm farther back 
     408                        NVAR sdd_setback = gMiddle_SDDsetback   //T/B are 41 cm farther back 
    409409                        break    
    410410                                                 
     
    415415                         
    416416                default: 
    417                         Print "Error -- type not found in        VCALC_getTopBottomSDDOffset(type)"                                      
    418                         sdd_offset = 0          //no match for type              
     417                        Print "Error -- type not found in        VCALC_getTopBottomSDDSetback(type)"                                     
     418                        sdd_setback = 0         //no match for type              
    419419        endswitch 
    420420 
    421421        SetDataFolder root: 
    422422                 
    423         return(sdd_offset)       
     423        return(sdd_setback)      
    424424End 
    425425 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_VCALCPanel_MockUp.ipf

    r1055 r1062  
    166166 
    167167// tab(2) - Front detector panels, initially not visible 
    168         SetVariable VCALCCtrl_2a,pos={30,260},size={150,15},title="L/R Separation (mm)",proc=VC_FDet_LR_SetVarProc 
    169         SetVariable VCALCCtrl_2a,limits={0,400,1},disable=1,value=_NUM:100 
    170         SetVariable VCALCCtrl_2b,pos={30,290},size={150,15},title="T/B Separation (mm)",proc=VC_FDet_LR_SetVarProc 
    171         SetVariable VCALCCtrl_2b,limits={0,400,1},disable=1,value=_NUM:100 
    172         SetVariable VCALCCtrl_2c,pos={205,290},size={150,15},title="Lateral Offset (mm)" 
    173         SetVariable VCALCCtrl_2c,limits={0,200,0.1},disable=1,value=_NUM:0 
    174         SetVariable VCALCCtrl_2d,pos={205,260},size={230,15},title="Sample to Detector Distance (m)",proc=VC_FDet_SDD_SetVarProc 
    175         SetVariable VCALCCtrl_2d,limits={1,8,0.1},disable=1     ,value=_NUM:1.5 
     168        SetVariable VCALCCtrl_2a,pos={30,260},size={150,15},title="L/R Separation (cm)",proc=VC_FDet_LR_SetVarProc 
     169        SetVariable VCALCCtrl_2a,limits={0,40,1},disable=1,value=_NUM:20 
     170        SetVariable VCALCCtrl_2b,pos={30,290},size={150,15},title="T/B Separation (cm)",proc=VC_FDet_LR_SetVarProc 
     171        SetVariable VCALCCtrl_2b,limits={0,40,1},disable=1,value=_NUM:20 
     172//      SetVariable VCALCCtrl_2c,pos={205,290},size={150,15},title="Lateral Offset (cm)" 
     173//      SetVariable VCALCCtrl_2c,limits={0,20,0.1},disable=1,value=_NUM:0 
     174        SetVariable VCALCCtrl_2d,pos={205,260},size={230,15},title="Sample to Detector Distance (cm)",proc=VC_FDet_SDD_SetVarProc 
     175        SetVariable VCALCCtrl_2d,limits={100,800,1},disable=1   ,value=_NUM:150 
    176176         
    177177 
    178178// tab(3) - Middle detector panels, initially not visible 
    179         SetVariable VCALCCtrl_3a,pos={30,260},size={150,15},title="L/R Separation (mm)",proc=VC_MDet_LR_SetVarProc 
    180         SetVariable VCALCCtrl_3a,limits={0,400,1},disable=1,value=_NUM:100 
    181         SetVariable VCALCCtrl_3b,pos={30,290},size={150,15},title="T/B Separation (mm)",proc=VC_MDet_LR_SetVarProc 
    182         SetVariable VCALCCtrl_3b,limits={0,400,1},disable=1,value=_NUM:100 
    183         SetVariable VCALCCtrl_3c,pos={205,290},size={150,15},title="Lateral Offset (mm)" 
    184         SetVariable VCALCCtrl_3c,limits={0,200,0.1},disable=1,value=_NUM:0 
    185         SetVariable VCALCCtrl_3d,pos={205,260},size={230,15},title="Sample to Detector Distance (m)",proc=VC_MDet_SDD_SetVarProc 
    186         SetVariable VCALCCtrl_3d,limits={8,20,0.1},disable=1,value=_NUM:15 
     179        SetVariable VCALCCtrl_3a,pos={30,260},size={150,15},title="L/R Separation (cm)",proc=VC_MDet_LR_SetVarProc 
     180        SetVariable VCALCCtrl_3a,limits={0,40.0,1},disable=1,value=_NUM:20 
     181        SetVariable VCALCCtrl_3b,pos={30,290},size={150,15},title="T/B Separation (cm)",proc=VC_MDet_LR_SetVarProc 
     182        SetVariable VCALCCtrl_3b,limits={0,40.0,1},disable=1,value=_NUM:20 
     183//      SetVariable VCALCCtrl_3c,pos={205,290},size={150,15},title="Lateral Offset (cm)" 
     184//      SetVariable VCALCCtrl_3c,limits={0,20,0.1},disable=1,value=_NUM:0 
     185        SetVariable VCALCCtrl_3d,pos={205,260},size={230,15},title="Sample to Detector Distance (cm)",proc=VC_MDet_SDD_SetVarProc 
     186        SetVariable VCALCCtrl_3d,limits={800,2000,1},disable=1,value=_NUM:1500 
    187187         
    188188// tab(4) - Back detector panel 
    189         SetVariable VCALCCtrl_4a,pos={188,290},size={150,15},title="Lateral Offset (mm)" 
    190         SetVariable VCALCCtrl_4a,limits={0,200,0.1},disable=1,value=_NUM:0 
    191         SetVariable VCALCCtrl_4b,pos={188,260},size={230,15},title="Sample to Detector Distance (m)",proc=VC_BDet_SDD_SetVarProc 
    192         SetVariable VCALCCtrl_4b,limits={20,25,0.1},disable=1,value=_NUM:20 
    193         PopupMenu VCALCCtrl_4c,pos={40,260},size={180,20},title="Detector type",disable=1 
    194         PopupMenu VCALCCtrl_4c,mode=1,popvalue="2D",value= root:Packages:NIST:VSANS:VCALC:gBackDetType 
     189        SetVariable VCALCCtrl_4a,pos={188,290},size={150,15},title="Lateral Offset (cm)" 
     190        SetVariable VCALCCtrl_4a,limits={0,20,0.1},disable=1,value=_NUM:0 
     191        SetVariable VCALCCtrl_4b,pos={188,260},size={230,15},title="Sample to Detector Distance (cm)",proc=VC_BDet_SDD_SetVarProc 
     192        SetVariable VCALCCtrl_4b,limits={2000,2500,1},disable=1,value=_NUM:2000 
     193//      PopupMenu VCALCCtrl_4c,pos={40,260},size={180,20},title="Detector type",disable=1 
     194//      PopupMenu VCALCCtrl_4c,mode=1,popvalue="2D",value= root:Packages:NIST:VSANS:VCALC:gBackDetType 
    195195 
    196196// tab(5) - Simulation setup 
     
    675675// Width and height are not part of the Nexus file definition, but are needed for VCALC drawing 
    676676// so keep them as variables 
    677         Variable/G gFront_LR_w = 384            //front bank, nominal LR panel width (mm) 
    678         Variable/G gFront_LR_h = 1000 
    679         Variable/G gFront_TB_w = 500 
    680         Variable/G gFront_TB_h = 384 
    681  
    682 // SDD offset of T/B (decide on units??) 
     677        Variable/G gFront_LR_w = 38.4           //front bank, nominal LR panel width [cm] 
     678        Variable/G gFront_LR_h = 100.0 
     679        Variable/G gFront_TB_w = 50.0 
     680        Variable/G gFront_TB_h = 38.4 
     681 
     682// SDD setback of T/B (decide on units??) 
    683683// for the Nexus file, the detector distance should already be corrected for the "setback" 
    684684// of the T/B panels. keep as VCALC variable 
    685         Variable/G gFront_SDDOffset = 300                       // (mm) 
     685        Variable/G gFront_SDDsetback = 41.0                     // [cm] 
    686686         
    687687         
     
    741741// Width and height are not part of the Nexus file definition, but are needed for VCALC drawing 
    742742// so keep them as variables 
    743         Variable/G gMiddle_LR_w = 384           //middle bank, nominal LR panel width (mm) 
    744         Variable/G gMiddle_LR_h = 1000 
    745         Variable/G gMiddle_TB_w = 500 
    746         Variable/G gMiddle_TB_h = 384 
     743        Variable/G gMiddle_LR_w = 38.4          //middle bank, nominal LR panel width (cm) 
     744        Variable/G gMiddle_LR_h = 100.0 
     745        Variable/G gMiddle_TB_w = 50.0 
     746        Variable/G gMiddle_TB_h = 38.4 
    747747// SDD offset of T/B (decide on units??) 
    748748// for the Nexus file, the detector distance should already be corrected for the "setback" 
    749749// of the T/B panels. keep as VCALC variable 
    750         Variable/G gMiddle_SDDOffset = 300                      // (mm) 
     750        Variable/G gMiddle_SDDsetback = 41.0                    // [cm] 
    751751         
    752752// detector resolution (xy for each bank!) 
     
    804804 
    805805//// BACK DETECTOR 
    806         Variable/G gBack_w = 150                                //w and h for the back detector, (mm) 150 pix * 1mm/pix 
    807         Variable/G gBack_h = 150 
     806        Variable/G gBack_w = 15.0                               //w and h for the back detector, (cm) 150 pix * 1mm/pix 
     807        Variable/G gBack_h = 15.0 
    808808         
    809809        Make/O/D/N=1 :entry:instrument:detector_B:x_pixel_size = 0.1            // 1 mm resolution (units of cm here) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_DetectorCorrections.ipf

    r1061 r1062  
    155155 
    156156// kPanelTouchingGap is in mm    
    157         gap = kPanelTouchingGap/10              //cm 
     157        gap = kPanelTouchingGap 
    158158         
    159159        if(cmpstr(orientation,"vertical")==0) 
     
    165165                if(cmpstr(fname,"VCALC")== 0 ) 
    166166                        offset = VCALC_getPanelSeparation(detStr) 
    167                         offset /= 2                     // units of mm 
     167                        offset *= 10                    // convert to units of mm 
     168                        offset /= 2                     // 1/2 the total separation 
     169                        if(cmpstr("L",detStr[1]) == 0) 
     170                                offset *= -1            //negative value for L 
     171                        endif 
    168172                else 
    169173                        //normal case 
    170                 offset = V_getDet_LateralOffset(fname,detStr) 
    171                 offset *= 10 //convert cm to mm 
     174                        offset = V_getDet_LateralOffset(fname,detStr) 
     175                        offset *= 10 //convert cm to mm 
    172176                endif 
    173177                 
    174178        // calculation is in mm, not cm 
     179        // offset will be a negative value for the L panel, and positive for the R panel 
    175180                if(kBCTR_CM) 
    176181                        if(cmpstr("L",detStr[1]) == 0) 
    177                                 data_realDistX[][] = -offset - (dimX - p)*tube_width                    // TODO should this be dimX-1-p = 47-p? 
     182                                data_realDistX[][] = offset - (dimX - p)*tube_width                     // TODO should this be dimX-1-p = 47-p? 
     183//                              data_realDistX[][] = -offset - (dimX - p)*tube_width                    // TODO should this be dimX-1-p = 47-p? 
    178184                        else 
    179185                                data_realDistX[][] += offset + gap + tube_width                 //add to the Right det, not recalculate 
     
    189195                if(cmpstr(fname,"VCALC")== 0 ) 
    190196                        offset = VCALC_getPanelSeparation(detStr) 
    191                         offset /= 2                     // units of mm 
     197                        offset *= 10                    // convert to units of mm 
     198                        offset /= 2                     // 1/2 the total separation 
     199                        if(cmpstr("B",detStr[1]) == 0) 
     200                                offset *= -1    // negative value for Bottom det 
     201                        endif 
    192202                else 
    193203                        //normal case 
     
    200210                                data_realDistY[][] += offset + gap + tube_width                  
    201211                        else 
    202                                 data_realDistY[][] = -offset - (dimY - q)*tube_width    // TODO should this be dimY-1-q = 47-q? 
     212                                data_realDistY[][] = offset - (dimY - q)*tube_width     // TODO should this be dimY-1-q = 47-q? 
    203213                        endif 
    204214                endif 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_RAW_Data_Panel.ipf

    r1061 r1062  
    6262        V_FakeStatusButtonClick() 
    6363 
     64// NOTE: This is where the beam center is picked up so that the panel array scaling is reset 
     65// so that the images will automatically display in relation to the beam center 
    6466        V_FakeRestorePanelsButtonClick()                //so the panels display correctly 
    6567 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/V_Testing_Data_Procs.ipf

    r1055 r1062  
    5151                V_writeDetectorData(fileName,detStr,tmpData) 
    5252                 
    53                 val = VCALC_getSDD(detStr)*100          // make sure value is in cm 
     53                val = VCALC_getSDD(detStr)              // make sure value is in cm 
    5454                print val 
    5555                V_writeDet_distance(fileName,detStr,val) 
    5656                 
    57                 val = VCALC_getTopBottomSDDOffset(detStr)               //val is in mm, as for data file 
     57                val = VCALC_getTopBottomSDDSetback(detStr)*10           //val is in mm, as for data file 
    5858                if(val != 0) 
    5959                        V_writeDet_TBSetback(fileName,detStr,val) 
    6060                endif 
    6161                 
    62                 // returns the total separation (assumed symmetric) in mm 
     62                // returns the total separation (assumed symmetric) in cm 
    6363                val = VCALC_getPanelSeparation(detStr)           
    64                 val /= 2*10                     // to get half of the separation, and convert to cm for the data file 
     64                val /= 2                // to get half of the separation, and cm for the data file 
    6565                // it's OK to call both of these. these functions check detStr for the correct value 
     66                if(cmpstr("L",detStr[1]) == 0 || cmpstr("B",detStr[1]) == 0) 
     67                        val *= -1       // negative separation position for L and Bottom 
     68                endif 
    6669                V_writeDet_LateralOffset(fileName,detStr,val) 
    6770                V_writeDet_VerticalOffset(fileName,detStr,val) 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/Vx_NexusFromIgor.ipf

    r1023 r1062  
    21682168                                data    = root:Packages:NIST:VSANS:VCALC:Middle:det_MT 
    21692169                                nx_distance     = VCALC_getSDD("MT") 
    2170                                 sdd_offset = VCALC_getTopBottomSDDOffset("MT") 
     2170                                sdd_offset = VCALC_getTopBottomSDDSetback("MT") 
    21712171                                separation = VCALC_getPanelSeparation("MT") 
    21722172                                spatial_calibration[0][] = 1.072 
     
    21762176                                data    = root:Packages:NIST:VSANS:VCALC:Middle:det_MB 
    21772177                                nx_distance     = VCALC_getSDD("MB") 
    2178                                 sdd_offset = VCALC_getTopBottomSDDOffset("MB") 
     2178                                sdd_offset = VCALC_getTopBottomSDDSetback("MB") 
    21792179                                separation = VCALC_getPanelSeparation("MB")  
    21802180                                spatial_calibration[0][] = 1.072 
     
    21982198                                data    = root:Packages:NIST:VSANS:VCALC:Front:det_FT 
    21992199                                nx_distance     = VCALC_getSDD("FT") 
    2200                                 sdd_offset = VCALC_getTopBottomSDDOffset("FT") 
     2200                                sdd_offset = VCALC_getTopBottomSDDSetback("FT") 
    22012201                                separation = VCALC_getPanelSeparation("FT") 
    22022202                                spatial_calibration[0][] = 1.072 
     
    22062206                                data    = root:Packages:NIST:VSANS:VCALC:Front:det_FB 
    22072207                                nx_distance     = VCALC_getSDD("FB") 
    2208                                 sdd_offset = VCALC_getTopBottomSDDOffset("FB") 
     2208                                sdd_offset = VCALC_getTopBottomSDDSetback("FB") 
    22092209                                separation = VCALC_getPanelSeparation("FB") 
    22102210                                spatial_calibration[0][] = 1.072 
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/Vx_Nexus_VSANS_Write.ipf

    r1023 r1062  
    9797//                              data    = root:Packages:NIST:VSANS:VCALC:Middle:det_MT 
    9898//                              nx_distance     = VCALC_getSDD("MT") 
    99 //                              sdd_offset = VCALC_getTopBottomSDDOffset("MT") 
     99//                              sdd_offset = VCALC_getTopBottomSDDSetback("MT") 
    100100//                              separation = VCALC_getPanelSeparation("MT") 
    101101//                              spatial_calibration[0][] = 1.072 
     
    105105//                              data    = root:Packages:NIST:VSANS:VCALC:Middle:det_MB 
    106106//                              nx_distance     = VCALC_getSDD("MB") 
    107 //                              sdd_offset = VCALC_getTopBottomSDDOffset("MB") 
     107//                              sdd_offset = VCALC_getTopBottomSDDSetback("MB") 
    108108//                              separation = VCALC_getPanelSeparation("MB")  
    109109//                              spatial_calibration[0][] = 1.072 
     
    127127//                              data    = root:Packages:NIST:VSANS:VCALC:Front:det_FT 
    128128//                              nx_distance     = VCALC_getSDD("FT") 
    129 //                              sdd_offset = VCALC_getTopBottomSDDOffset("FT") 
     129//                              sdd_offset = VCALC_getTopBottomSDDSetback("FT") 
    130130//                              separation = VCALC_getPanelSeparation("FT") 
    131131//                              spatial_calibration[0][] = 1.072 
     
    135135//                              data    = root:Packages:NIST:VSANS:VCALC:Front:det_FB 
    136136//                              nx_distance     = VCALC_getSDD("FB") 
    137 //                              sdd_offset = VCALC_getTopBottomSDDOffset("FB") 
     137//                              sdd_offset = VCALC_getTopBottomSDDSetback("FB") 
    138138//                              separation = VCALC_getPanelSeparation("FB") 
    139139//                              spatial_calibration[0][] = 1.072 
Note: See TracChangeset for help on using the changeset viewer.