Changeset 910


Ignore:
Timestamp:
May 22, 2013 10:50:04 AM (9 years ago)
Author:
mjw
Message:

Fixed an issue with additng two raw BT5 files.

File:
1 edited

Legend:

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

    r857 r910  
    842842         
    843843        fname = fpath + file1 
    844         LoadBT5_toWave(fname,tw1,ctTime1,ang11,ang21)           //redimensions tw1 
     844        LoadBT5_toWave(file1,fpath,tw1,ctTime1,ang11,ang21)             //redimensions tw1 
    845845        Print "File 1: time, angle1, angle2",ctTime1,ang11,ang21 
    846846         
    847847        fname = fpath + file2 
    848         LoadBT5_toWave(fname,tw2,ctTime2,ang12,ang22)           //redimensions tw2 
     848        LoadBT5_toWave(file2,fpath,tw2,ctTime2,ang12,ang22)             //redimensions tw2 
    849849        Print "File 2: time, angle1, angle2",ctTime2,ang12,ang22 
    850850 
     
    856856                DoAlert 0,"Files are not the same length and can't be directly added" 
    857857                //Killwaves/Z tw1,tw2,tw3 
     858                abort 
    858859                return(0) 
    859860        endif 
     
    861862                DoAlert 0,"Files don't start at the same angle and can't be directly added" 
    862863                //Killwaves/Z tw1,tw2,tw3 
     864                abort 
    863865                return(0) 
    864866        endif 
     
    866868                DoAlert 0,"Files don't end at the same angle and can't be directly added" 
    867869                //Killwaves/Z tw1,tw2,tw3 
     870                abort 
    868871                return(0) 
    869872        endif 
     
    910913                        DoAlert 0,"Angles don't match and can't be directly added" 
    911914                        //Killwaves/Z tw1,tw2,tw3 
     915                        abort 
    912916                        return(0) 
    913917                endif 
     
    984988// number of lines in the file is a separate check 
    985989// 
    986 Function LoadBT5_toWave(fname,tw,ctTime,a1,a2) 
    987         String fname 
     990Function LoadBT5_toWave(fname,fpath,tw,ctTime,a1,a2) 
     991        String fname,fpath 
    988992        WAVE/T tw 
    989993        Variable &ctTime,&a1,&a2 
     
    994998        String s1,s2,s3,s4,s5,s6,s7,s8,s9,s10 
    995999         
    996         Open/R refNum as fname 
     1000        Open/R/P=bt5PathName refNum as fname 
    9971001         
    9981002        //read the data until EOF - assuming always a pair or lines 
Note: See TracChangeset for help on using the changeset viewer.