Ignore:
Timestamp:
Jun 2, 2017 11:29:54 AM (6 years ago)
Author:
srkline
Message:

moved dead time correction to before the solid angle correction, so that the dead time would be correcting counts, not counts per solid angle

added a routine to kill all of the waves and folders possible, if the overall DF kill failed. This is to prevent stray folders and waves from being present if different data files are loaded - since different data blocks are present for say, 3He data, data with temperature logging, etc.
This kill routine is used every time, before raw data is loaded, DIV or MASK loaded, or data is converted to WORK.

changed the "Save I(q)" button on the data display panel to save as ITX format, since the data has not been processed, and data can more easily be used for trimming input.

picking protocols in dialogs now excludes/includes appropriate waves

menus are consolidated

Fixed bug in SANS macros where the DRK[] item in the protocol could be null, and force the read of a DRK file, even if it was not desired.

File:
1 edited

Legend:

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

    r1041 r1042  
    4444// -- not sure how this will work with JointHistogram Operation 
    4545// (split to separate "streams" of values for each detector panel? 
     46// 
     47// 
     48// -- can I efficiently use "sort" (on the tube index) to block the data into groups that can be split 
     49//  into 4 sets of waves 
     50//  that can then be binned per panel, using the usual Joint histogram procedures? Works only if the  
     51// tube indexing is orderly. if it's a mess, Ill need to try something else (indexed sort?) (replace?) 
     52// (manually? ugh.) 
    4653// 
    4754 
     
    163170End 
    164171 
    165  
     172/ 
     173// tested up to num=1e8 successfully 
     174// 
    166175Function V_MakeFakeEventWave() 
    167176 
    168177        Variable num,ii 
    169178 
    170         num = 1000 
     179 
     180        num = 1e3 
    171181         
    172182//      // /l=64 bit, /U=unsigned 
     
    184194        i64_start = ticks 
    185195        for(ii=0;ii<num;ii+=1) 
    186                 sleep/T 6                       // 6 ticks, approx 0.1 s (without the delay, the loop is too fast) 
     196//              sleep/T/C=-1 1                  // 6 ticks, approx 0.1 s (without the delay, the loop is too fast) 
    187197                b1 = trunc(abs(enoise(192)))            //since truncated, need 192 as highest random to give 191 after trunc 
    188198                b2 = trunc(abs(enoise(128)))            // same here, to get results [0,127] 
    189199                 
    190                 i64_ticks = ticks-i64_start 
     200//              i64_ticks = ticks-i64_start 
     201                i64_ticks = ii+1 
    191202                 
    192203                b2 = b2 << 48 
     
    196207                eventWave[ii] = i64_num 
    197208        endfor 
    198          
    199         return(0) 
    200 End 
    201  
    202  
    203 Function V_decodeFakeEventWave() 
    204  
    205         WAVE w = eventWave 
     209 
     210 
     211        return(0) 
     212End 
     213 
     214 
     215Function V_decodeFakeEventWave(w) 
     216        Wave w 
     217 
     218s_tic() 
     219//      WAVE w = eventWave 
    206220        uint64 val,b1,b2,btime 
    207221        val = w[0] 
     
    231245                 
    232246        endfor 
     247 
     248s_toc() 
    233249                 
    234250        return(0) 
     
    286302//      GBLoadWave/B/T={192,192}/W=1/S=22 
    287303        Variable num,refnum 
     304         
    288305 
    289306// so to read: 
     
    308325        vsansStr = PadString(vsansStr,5,0x20)           //pad to 5 bytes 
    309326        detStr = PadString(detStr,1,0x20)                               //pad to 1 byte 
     327 
    310328        Open/R refnum  
    311329        fname = S_fileName 
     330 
     331s_tic() 
    312332 
    313333        FBinRead refnum, vsansStr 
     
    333353        GBLoadWave/B/T={192,192}/W=1/S=22 fname 
    334354         
    335          
    336         return(0) 
    337 End 
     355s_toc()  
     356         
     357        return(0) 
     358End 
Note: See TracChangeset for help on using the changeset viewer.