Ignore:
Timestamp:
May 14, 2009 10:24:20 AM (14 years ago)
Author:
srkline
Message:

List of small changes:
Lin_Fits - added I(0) error to one calculation, Need to propagate this to all logical places. (and submit a ticket)
MainPanel? - correctly handle cancel of raw data display
Transmssion - add a "guess" option of a user-supplied "N" characters
Correct - revert back to zero error for beam center mismatch
NCNR_DataRW - add utility to patch monitor counts (comment out of menu later)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_DataReadWrite.ipf

    r496 r502  
    25792579        return(0) 
    25802580End 
     2581 
     2582// May 2009 - SRK 
     2583// Monitor count not written correctly to file from ICE 
     2584 
     2585Proc PatchMonitorCount(firstFile,lastFile,monCtRate) 
     2586        Variable firstFile=1,lastFile=100,monCtRate 
     2587 
     2588        fPatchMonitorCount(firstFile,lastFile,monCtRate) 
     2589 
     2590End 
     2591 
     2592Proc ReadMonitorCount(firstFile,lastFile) 
     2593        Variable firstFile=1,lastFile=100 
     2594         
     2595        fReadMonitorCount(firstFile,lastFile) 
     2596End 
     2597 
     2598// simple utility to patch the user account name in the file headers 
     2599// pass in the account name as a string 
     2600// lo is the first file number 
     2601// hi is the last file number (inclusive) 
     2602// 
     2603Function fPatchMonitorCount(lo,hi,monCtRate) 
     2604        Variable lo,hi,monCtRate 
     2605         
     2606        Variable ii,ctTime 
     2607        String file 
     2608         
     2609        //loop over all files 
     2610        for(ii=lo;ii<=hi;ii+=1) 
     2611                file = FindFileFromRunNumber(ii) 
     2612                if(strlen(file) != 0) 
     2613                        ctTime = getCountTime(file) 
     2614                        WriteMonitorCountToHeader(file,ctTime*monCtRate)                         
     2615                else 
     2616                        printf "run number %d not found\r",ii 
     2617                endif 
     2618        endfor 
     2619         
     2620        return(0) 
     2621End 
     2622 
     2623// simple utility to read the user account name stored in the file header 
     2624Function fReadMonitorCount(lo,hi) 
     2625        Variable lo,hi 
     2626         
     2627        String file 
     2628        Variable ii,monitorCount 
     2629         
     2630        for(ii=lo;ii<=hi;ii+=1) 
     2631                file = FindFileFromRunNumber(ii) 
     2632                if(strlen(file) != 0) 
     2633                        monitorCount = getMonitorCount(file) 
     2634                        printf "File %d:  Monitor Count = %g\r",ii,monitorCount 
     2635                else 
     2636                        printf "run number %d not found\r",ii 
     2637                endif 
     2638        endfor 
     2639         
     2640        return(0) 
     2641End 
Note: See TracChangeset for help on using the changeset viewer.