Ignore:
Timestamp:
Feb 21, 2017 1:03:50 PM (6 years ago)
Author:
srkline
Message:

minor changes to prefix functions with "V_" to avoid conflicts with non-VSANS functions.

File:
1 edited

Legend:

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

    r1022 r1024  
    3535//Entry procedure from main panel 
    3636// 
    37 Proc CopyWorkFolder(oldType,newType) 
     37Proc V_CopyWorkFolder(oldType,newType) 
    3838        String oldType,newType 
    3939        Prompt oldType,"Source WORK data type",popup,"SAM;EMP;BGD;DIV;COR;CAL;RAW;ABS;STO;SUB;DRK;" 
     
    4141 
    4242        // data folder "old" will be copied to "new" (either kills/copies or will overwrite) 
    43         CopyHDFToWorkFolder(oldtype,newtype) 
     43        V_CopyHDFToWorkFolder(oldtype,newtype) 
    4444End 
    4545 
     
    6565// type is the destination WORK folder for the copy 
    6666// 
    67 Function CopyHDFToWorkFolder(fromStr,toStr) 
     67Function V_CopyHDFToWorkFolder(fromStr,toStr) 
    6868        String fromStr,toStr 
    6969         
     
    302302//   line fails (but reports no error), then DuplicateDataFolder fails, and reports an error. Trying 
    303303//   to simplify this condition, I can't reproduce the bug for WM... 
    304 Proc Convert_to_Workfile(newtype, doadd) 
     304Proc V_Convert_to_Workfile(newtype, doadd) 
    305305        String newtype,doadd 
    306306        Prompt newtype,"WORK data type",popup,"SAM;EMP;BGD;ADJ;" 
     
    315315        if(cmpstr(doadd,"No")==0) 
    316316                //don't add to prev work contents, copy RAW contents to work and convert 
    317                 err = Raw_to_work(newtype) 
     317                err = V_Raw_to_work(newtype) 
    318318        else 
    319319                //yes, add RAW to the current work folder contents 
    320320                Abort "Adding RAW data files is currently unsupported" 
    321                 err = Add_raw_to_work(newtype) 
     321                err = V_Add_raw_to_work(newtype) 
    322322        endif 
    323323         
     
    328328         
    329329        //need to update the display with "data" from the correct dataFolder 
    330         UpdateDisplayInformation(newtype) 
     330        V_UpdateDisplayInformation(newtype) 
    331331         
    332332End 
     
    342342//the current display type is updated to newType (global) 
    343343// 
    344 Function Raw_to_work(newType) 
     344Function V_Raw_to_work(newType) 
    345345        String newType 
    346346         
     
    366366         
    367367        //copy from current dir (RAW) to work, defined by newType 
    368         CopyHDFToWorkFolder("RAW",newType) 
     368        V_CopyHDFToWorkFolder("RAW",newType) 
    369369         
    370370        // now work with the waves from the destination folder.  
     
    432432                        Wave w_calib = V_getDetTube_spatialCalib(fname,detStr) 
    433433                        Variable tube_width = V_getDet_tubeWidth(fname,detStr) 
    434                         NonLinearCorrection(w,w_calib,tube_width,detStr,destPath) 
     434                        V_NonLinearCorrection(w,w_calib,tube_width,detStr,destPath) 
    435435 
    436436                        //(2.4) Convert the beam center values from pixels to mm 
    437437                        // TODO -- there needs to be a permanent location for these values?? 
    438438                        // 
    439                         ConvertBeamCtr_to_mm(fname,detStr,destPath) 
     439                        V_ConvertBeamCtr_to_mm(fname,detStr,destPath) 
    440440                                                         
    441441                        // (2.5) Calculate the q-values 
     
    454454                 
    455455                //"B" is separate 
    456                 NonLinearCorrection_B(fname,"B",destPath) 
    457                 ConvertBeamCtr_to_mmB(fname,"B",destPath) 
     456                V_NonLinearCorrection_B(fname,"B",destPath) 
     457                V_ConvertBeamCtr_to_mmB(fname,"B",destPath) 
    458458                V_Detector_CalcQVals(fname,"B",destPath) 
    459459                 
     
    478478                        Wave w_err = V_getDetectorDataErrW(fname,detStr) 
    479479                        // any other dimensions to pass in? 
    480                         SolidAngleCorrection(w,w_err,fname,detStr,destPath) 
     480                        V_SolidAngleCorrection(w,w_err,fname,detStr,destPath) 
    481481                         
    482482                endfor 
     
    515515                                // do the corrections for 8 tube panels 
    516516                                Wave w_dt = V_getDetector_deadtime(fname,detStr) 
    517                                 DeadTimeCorrectionTubes(w,w_err,w_dt,ctTime) 
     517                                V_DeadTimeCorrectionTubes(w,w_err,w_dt,ctTime) 
    518518                                 
    519519                        endif 
     
    550550                        Wave w_err = V_getDetectorDataErrW(fname,detStr) 
    551551                         
    552 //                      TransmissionCorrection(fill this in) 
     552//                      V_TransmissionCorrection(fill this in) 
    553553                         
    554554                endfor 
     
    572572                        Wave w_err = V_getDetectorDataErrW(fname,detStr) 
    573573                        Variable monCt = V_getBeamMonNormData(fname) 
    574         //                      MonitorNormalization(fill this in) 
     574        //                      V_MonitorNormalization(fill this in) 
    575575                //scale the data to the default montor counts 
    576576                 
     
    629629// 
    630630//the current display type is updated to newType (global) 
    631 Function Add_raw_to_work(newType) 
     631Function V_Add_raw_to_work(newType) 
    632632        String newType 
    633633         
     
    637637        NVAR doAdjustRAW_Atten = root:Packages:NIST:gDoAdjustRAW_Atten 
    638638        if(doAdjustRAW_Atten) 
    639                 Adjust_RAW_Attenuation(newType) 
     639                V_Adjust_RAW_Attenuation(newType) 
    640640        endif 
    641641         
     
    646646                Print "There is no old work file to add to - a new one will be created" 
    647647                //call Raw_to_work(), then return from this function 
    648                 Raw_to_Work(newType) 
     648                V_Raw_to_Work(newType) 
    649649                Return(0)               //does not generate an error - a single file was converted to work.newtype 
    650650        Endif 
     
    710710        endif    
    711711         
    712         DetCorr(raw_data,raw_data_err,raw_reals,doEfficiency,doTrans)   //applies correction to raw_data, and overwrites it 
     712        V_DetCorr(raw_data,raw_data_err,raw_reals,doEfficiency,doTrans) //applies correction to raw_data, and overwrites it 
    713713         
    714714        //deadtime corrections to raw data 
     
    807807//to get the data back on a simple time basis 
    808808// 
    809 Function Raw_to_Work_NoNorm(type) 
     809Function V_Raw_to_Work_NoNorm(type) 
    810810        String type 
    811811         
    812812        WAVE reals=$("root:Packages:NIST:RAW:realsread") 
    813813        reals[1]=1              //true monitor counts, still in raw 
    814         Raw_to_work(type) 
     814        V_Raw_to_work(type) 
    815815        //data is now in "type" folder 
    816816        WAVE data=$("root:Packages:NIST:"+type+":linear_data") 
     
    839839//to get the data back on a simple time basis 
    840840// 
    841 Function Add_Raw_to_Work_NoNorm(type) 
     841Function V_Add_Raw_to_Work_NoNorm(type) 
    842842        String type 
    843843         
    844844        WAVE reals=$("root:Packages:NIST:RAW:realsread") 
    845845        reals[1]=1              //true monitor counts, still in raw 
    846         Add_Raw_to_work(type) 
     846        V_Add_Raw_to_work(type) 
    847847        //data is now in "type" folder 
    848848        WAVE data=$("root:Packages:NIST:"+type+":linear_data") 
Note: See TracChangeset for help on using the changeset viewer.