Ignore:
Timestamp:
Apr 22, 2016 5:02:30 PM (7 years ago)
Author:
srkline
Message:

lots of changes to plotting of q-values, generating fake data with non-linear corrections, masking of data, etc.

File:
1 edited

Legend:

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

    r992 r993  
    5959                sumTubes /= ctTime              //now count rate per tube 
    6060                 
    61                 dataW[][] = dataW[p][q]/(1-sumTubes[p][0]*dtW[p])               //correct the data 
     61                dataW[][] = dataW[p][q]/(1-sumTubes[p]*dtW[p])          //correct the data 
    6262 
    6363        elseif(cmpstr(orientation,"horizontal")==0) 
     
    6767                sumTubes /= ctTime 
    6868                 
    69                 dataW[][] = dataW[p][q]/(1-sumTubes[0][q]*dtW[q]) 
     69                dataW[][] = dataW[p][q]/(1-sumTubes[q]*dtW[q]) 
    7070         
    7171        else             
     
    7676end 
    7777 
     78// test function 
     79Function testDTCor() 
     80 
     81        String detStr = "" 
     82        String fname = "RAW" 
     83        Variable ctTime 
     84         
     85        detStr = "FR" 
     86        Wave w = V_getDetectorDataW(fname,detStr) 
     87        Wave w_err = V_getDetectorDataErrW(fname,detStr) 
     88        Wave w_dt = V_getDetector_deadtime(fname,detStr) 
     89 
     90        ctTime = V_getCount_time(fname) 
     91         
     92//      ctTime = 10 
     93        DeadTimeCorrectionTubes(w,w_err,w_dt,ctTime) 
     94 
     95End 
     96 
     97 
    7898// 
    7999// Non-linear data correction 
    80100//  
     101// DOES NOT modify the data, only calculates the spatial relationship 
     102// 
    81103// input is the data array (N tubes x M pixels) 
    82104// input of N x M array of quadratic coefficients 
     
    191213//    calculate the actual value 
    192214// 
    193 // -- distance in the lateral direction is based on tube width, which is well known 
     215// -- distance in the lateral direction is based on tube width, which is a fixed parameter 
    194216// 
    195217// 
     
    310332        // -- only for the tube, not the Back det 
    311333         
    312         DoAlert 0, "re-do this and do a better job of filling the fake calibration data" 
    313          
    314         fMakeFakeCalibrationWaves() 
     334//      DoAlert 0, "re-do this and do a better job of filling the fake calibration data" 
     335 
     336        DoAlert 0, "Calibration waves are read in from the data file" 
     337         
     338//      fMakeFakeCalibrationWaves() 
    315339End 
    316340 
     
    10301054// TODO: 
    10311055//   --         DoAlert 0,"This has not yet been updated for VSANS" 
     1056//  -- how is the error propagation  handled? 
    10321057// 
    10331058//function will divide the contents of "workType" folder with the contents of  
Note: See TracChangeset for help on using the changeset viewer.