Ignore:
Timestamp:
Mar 28, 2019 11:12:06 AM (4 years ago)
Author:
srkline
Message:

1) speed improvement (2x + faster) in recalculation of VCALC configuration by using multithreading where possible.

2) Important bug fix for USANS to account for data collected in q-values, where each point is collected for a different lenght of time. This change had unintended consequences for normalization and dead time corrections.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/USANS/Main_USANS.ipf

    r1133 r1137  
    456456// note that trans detector counts are NOT normalized to 1E6 mon cts (not necessary) 
    457457// 
     458// 28 Mar 2019 
     459//  converted CtTime to be a wave, loaded in with the raw data 
     460// for old-style data, this is a constant value. for new q-value data, each point 
     461// can be counted for a different time. 
     462// 
    458463Function Convert2Countrate(type,doNorm) 
    459464        String type 
     
    463468         
    464469        String noteStr = note($(USANSFolder+":"+Type+":DetCts")) 
    465         Variable ctTime 
    466         ctTime = NumberByKey("TIMEPT",noteStr,":",";") 
     470         
     471        Variable ctTimeVal 
     472//      Variable ctTime 
     473//      ctTime = NumberByKey("TIMEPT",noteStr,":",";") 
     474 
    467475//      print ctTime 
    468476        //normalize by counting time 
     
    471479        Wave MonCts = $(USANSFolder+":"+Type+":MonCts") 
    472480        Wave TransCts = $(USANSFolder+":"+Type+":TransCts") 
     481        Wave ctTime = $(USANSFolder+":"+Type+":ctTime") 
    473482         
    474483        detCts /= ctTime 
     
    486495         
    487496        //adjust the note (now on basis of 1 second) 
    488         ctTime = 1 
    489         noteStr = ReplaceNumberByKey("TIMEPT",noteStr,ctTime,":",";") 
     497        ctTimeVal = 1 
     498        noteStr = ReplaceNumberByKey("TIMEPT",noteStr,ctTimeVal,":",";") 
    490499        Note/K detCts 
    491500        Note detCts,noteStr 
Note: See TracChangeset for help on using the changeset viewer.