Ignore:
Timestamp:
May 27, 2016 4:42:06 PM (7 years ago)
Author:
srkline
Message:

read/write for lateral + vertical offset of detectors, eliminating some extra unused fields.

more additions to the mask editor to give some basic functionality (add/del tubes, save mask)

File:
1 edited

Legend:

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

    r999 r1000  
    14301430End 
    14311431 
     1432// only return value for B and L/R detectors. everything else returns zero 
    14321433Function V_getDet_LateralOffset(fname,detStr) 
    14331434        String fname,detStr 
    14341435 
     1436        if(cmpstr(detStr,"FT") == 0 || cmpstr(detStr,"FB") == 0) 
     1437                return(0) 
     1438        endif 
     1439        if(cmpstr(detStr,"MT") == 0 || cmpstr(detStr,"MB") == 0) 
     1440                return(0) 
     1441        endif    
     1442         
    14351443        String path = "entry:instrument:detector_"+detStr+":lateral_offset" 
    14361444        return(V_getRealValueFromHDF5(fname,path)) 
    14371445End 
    14381446 
    1439 // TODO - be sure this is defined correctly (with correct units!) 
    1440 // -- only returns for T/B detectors 
    1441 Function V_getDet_TBSetback(fname,detStr) 
     1447// only return values for T/B. everything else returns zero 
     1448Function V_getDet_VerticalOffset(fname,detStr) 
    14421449        String fname,detStr 
    14431450 
     
    14521459        endif    
    14531460         
     1461        String path = "entry:instrument:detector_"+detStr+":vertical_offset" 
     1462        return(V_getRealValueFromHDF5(fname,path)) 
     1463End 
     1464 
     1465// TODO - be sure this is defined correctly (with correct units!) 
     1466// -- only returns for T/B detectors 
     1467Function V_getDet_TBSetback(fname,detStr) 
     1468        String fname,detStr 
     1469 
     1470        if(cmpstr(detStr,"B") == 0) 
     1471                return(0) 
     1472        endif 
     1473        if(cmpstr(detStr,"FR") == 0 || cmpstr(detStr,"FL") == 0) 
     1474                return(0) 
     1475        endif 
     1476        if(cmpstr(detStr,"MR") == 0 || cmpstr(detStr,"ML") == 0) 
     1477                return(0) 
     1478        endif    
     1479         
    14541480        String path = "entry:instrument:detector_"+detStr+":setback" 
    14551481        return(V_getRealValueFromHDF5(fname,path)) 
     
    14581484End 
    14591485 
    1460 //Function V_getDet_VerticalOffset(fname,detStr) 
    1461 //      String fname,detStr 
    1462 // 
    1463 //      String path = "entry:instrument:detector_"+detStr+":vertical_offset" 
    1464 //      return(V_getRealValueFromHDF5(fname,path)) 
    1465 //End 
    14661486 
    14671487 
     
    15061526//End 
    15071527 
    1508 Function/S V_getDetType(fname,detStr) 
    1509         String fname,detStr 
    1510  
    1511         String path = "entry:instrument:detector_"+detStr+":type" 
    1512         Variable num=60 
    1513         return(V_getStringFromHDF5(fname,path,num)) 
    1514 End 
     1528//Function/S V_getDetType(fname,detStr) 
     1529//      String fname,detStr 
     1530// 
     1531//      String path = "entry:instrument:detector_"+detStr+":type" 
     1532//      Variable num=60 
     1533//      return(V_getStringFromHDF5(fname,path,num)) 
     1534//End 
    15151535 
    15161536Function V_getDet_x_pixel_size(fname,detStr) 
     
    15411561End 
    15421562 
    1543 // TODO -- be clear on how this is defined. Separation as defined from what point? Units? 
    1544 Function V_getDetPanelSeparation(fname,detStr) 
    1545         String fname,detStr 
    1546  
    1547         String path = "entry:instrument:detector_"+detStr+":separation" 
    1548         if(cmpstr(detStr,"B") == 0) 
    1549                 return(0) 
    1550         else 
    1551                 return(V_getRealValueFromHDF5(fname,path)) 
    1552         endif 
    1553 End 
     1563// this has been deleted from the definition 
     1564//Function V_getDetPanelSeparation(fname,detStr) 
     1565//      String fname,detStr 
     1566// 
     1567//      String path = "entry:instrument:detector_"+detStr+":separation" 
     1568//      if(cmpstr(detStr,"B") == 0) 
     1569//              return(0) 
     1570//      else 
     1571//              return(V_getRealValueFromHDF5(fname,path)) 
     1572//      endif 
     1573//End 
    15541574 
    15551575// TODO -- write this function to return a WAVE with the data 
     
    16881708 
    16891709///////  sample_aperture (1) (data folder) 
     1710// this is the INTERNAL sample aperture 
     1711// 
    16901712Function/S V_getSampleAp_Description(fname) 
    16911713        String fname 
     
    17381760 
    17391761///////  sample_aperture_2 (data folder) 
     1762// sample aperture (2) is the external paerture, which may or may not be present 
    17401763 
    17411764Function/S V_getSampleAp2_Description(fname) 
Note: See TracChangeset for help on using the changeset viewer.