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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.