Ignore:
Timestamp:
Nov 16, 2017 10:57:32 AM (5 years ago)
Author:
srkline
Message:

lots of changes here:
many little fixes to clean up TODO items and marke them DONE

changed the handling of the panel "gap" to split the gap evenly. Q-calculations have been re-verified with this change.

re-named the list of "bin Type" values, and added a few more choices. Streamlined how the averaging and plotting works with this list so that it can be more easily modified as different combinations of binning are envisioned. This resulted in a lot of excess code being cut out and replaced with cleaner logic. This change has also been verified to work as intended.

Attenuation is now always calculated from the table. The table also by (NEW) definition has values for the white beam (one waelength) and graphite (multiple possible wavelengths) where the wavelengths are artificially scaled (*1000) or *1e6) so that the interpolations can be done internally without the need for multiple attenuator tables.

File:
1 edited

Legend:

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

    r1072 r1073  
    468468        String fname 
    469469         
    470         Print "reading atten transmission" 
    471         String path = "entry:instrument:attenuator:attenuator_transmission"      
    472         return(V_getRealValueFromHDF5(fname,path)) 
     470        Print "Atten read - diverted to calculation" 
     471        return(V_CalculateAttenuationFactor(fname)) 
     472         
     473//      String path = "entry:instrument:attenuator:attenuator_transmission"      
     474//      return(V_getRealValueFromHDF5(fname,path)) 
     475 
    473476end 
    474477 
     
    478481        String fname 
    479482         
    480         String path = "entry:instrument:attenuator:attenuator_transmission_error"        
    481         return(V_getRealValueFromHDF5(fname,path)) 
     483        Print "Atten_err read - diverted to calculation" 
     484        return(V_CalculateAttenuationError(fname)) 
     485         
     486//      String path = "entry:instrument:attenuator:attenuator_transmission_error"        
     487//      return(V_getRealValueFromHDF5(fname,path)) 
     488         
    482489end 
    483490 
     
    16411648End 
    16421649 
     1650// gap when panels are "touching" 
     1651// units are mm 
     1652// returns gap value for TOP and RIGHT 
     1653// returns 0 for BACK, BOTTOM and LEFT 
     1654// force a return for BACK (no field in file) 
     1655// B/L detectors have this field, and it should be set to zero in the file 
     1656// 
     1657Function V_getDet_panel_gap(fname,detStr) 
     1658        String fname,detStr 
     1659 
     1660        if(cmpstr(detStr,"B") == 0) 
     1661                return(0) 
     1662        endif 
     1663//      if(cmpstr(detStr,"FB") == 0 || cmpstr(detStr,"FL") == 0) 
     1664//              return(0) 
     1665//      endif 
     1666//      if(cmpstr(detStr,"MB") == 0 || cmpstr(detStr,"ML") == 0) 
     1667//              return(0) 
     1668//      endif    
     1669         
     1670        String path = "entry:instrument:detector_"+detStr+":panel_gap" 
     1671        return(V_getRealValueFromHDF5(fname,path)) 
     1672         
     1673         
     1674End 
    16431675 
    16441676Function/S V_getDetSettings(fname,detStr) 
Note: See TracChangeset for help on using the changeset viewer.