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