Changeset 738


Ignore:
Timestamp:
Sep 14, 2010 1:22:53 PM (12 years ago)
Author:
srkline
Message:

ticket #290: now the Combine Table automatically lists the data files on startup, no need to click the button unless more files have been written. Also, the user is asked if they wish to clear the table or not (maybe the terminology of which table needs to be more clear?), either clearing the table, or retaining what had been filled in previously. The button has the same behavior.

File:
1 edited

Legend:

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

    r729 r738  
    14601460        popNum = WhichListItem(absStr,lowQPopStr,";",0) 
    14611461        if(popNum == -1) 
    1462                 Abort "Could not find file: " + absStr +" aborting..." 
     1462                Abort "Could not find file: " + absStr +" aborting...  Be sure that your output format is the same as the input" 
    14631463        endif 
    14641464        popNum += 1             // add 1 to get the item number 
     
    14691469        popNum = WhichListItem(absStr,medHiQPopStr,";",0) 
    14701470        if(popNum == -1) 
    1471                 Abort "Could not find file: "+absStr+" aborting..." 
     1471                Abort "Could not find file: "+absStr+" aborting...  Be sure that your output format is the same as the input" 
    14721472        endif 
    14731473        popNum += 1             // add 1 to get the item number 
     
    14801480                popNum = WhichListItem(absStr,medHiQPopStr,";",0) 
    14811481                if(popNum == -1) 
    1482                         Abort "Could not find file: "+absStr+" aborting..." 
     1482                        Abort "Could not find file: "+absStr+" aborting...  Be sure that your output format is the same as the input" 
    14831483                endif 
    14841484                popNum += 1             // add 1 to get the item number 
     
    15651565        RemoveTransFilesFromCombine() 
    15661566// 
    1567 // make the waves and table for the sets to combine 
    1568         Make/O/N=0 $"root:myGlobals:CombineTable:LowRun" 
    1569         Make/O/N=0 $"root:myGlobals:CombineTable:MediumRun" 
    1570         Make/O/N=0 $"root:myGlobals:CombineTable:HighRun" 
    1571         Make/O/T/N=0 $"root:myGlobals:CombineTable:Prefix" 
    1572         Make/O/T/N=0 $"root:myGlobals:CombineTable:SaveName" 
    1573          
    1574         SetDataFolder root:myGlobals:CombineTable 
    1575          
    1576         // make the second table 
    1577         AppendToTable/W=CombinePanel#RunNumbersToCombine LowRun,MediumRun,HighRun,Prefix,SaveName 
    1578  
    15791567        SetDataFolder root: 
     1568         
     1569        Killwaves/Z notRAWlist 
    15801570End 
    15811571 
     
    18431833        saveName[num] = saveStr  
    18441834 
     1835        KillWaves/Z tmpLbl,tmpRun,tmpSDD 
    18451836        return(0) 
    18461837end 
     
    18551846        if(V_flag==0) 
    18561847                CombinePanel() 
     1848                CreateTableToCombine("") 
     1849                DoAlert 1,"Do you want to clear the list of runs and file names to combine?" 
     1850                TableToCombineAndSave(V_flag==1)                // clear and initialize, if desired 
    18571851        endif 
    18581852end 
     
    18671861        Button button0_2,pos={509,40},size={60,20},proc=CombinePanelDone,title="Done" 
    18681862        Button button0_3,pos={522,14},size={30,20},proc=ShowCombineHelp,title="?" 
     1863        Button button0_4,pos={500,220},size={120,20},proc=ClearCombineTable,title="Clear Table?" 
    18691864        Edit/W=(20,54,368,249)/HOST=#  
    18701865        ModifyTable format=1,width=0 
     
    18921887        return(0) 
    18931888end 
     1889 
     1890Function ClearCombineTable(ctrlName) 
     1891        String ctrlName 
     1892         
     1893        DoAlert 1,"Do you want to clear the list of runs and file names to combine?" 
     1894        TableToCombineAndSave(V_flag==1)                // clear and initialize, if desired 
     1895        return(0) 
     1896end 
     1897 
     1898Function TableToCombineAndSave(clear) 
     1899        Variable clear 
     1900         
     1901        if(clear) 
     1902                // make the waves and table for the sets to combine 
     1903                Make/O/N=0 $"root:myGlobals:CombineTable:LowRun" 
     1904                Make/O/N=0 $"root:myGlobals:CombineTable:MediumRun" 
     1905                Make/O/N=0 $"root:myGlobals:CombineTable:HighRun" 
     1906                Make/O/T/N=0 $"root:myGlobals:CombineTable:Prefix" 
     1907                Make/O/T/N=0 $"root:myGlobals:CombineTable:SaveName" 
     1908        endif 
     1909        SetDataFolder root:myGlobals:CombineTable 
     1910         
     1911        // make the second table 
     1912        AppendToTable/W=CombinePanel#RunNumbersToCombine LowRun,MediumRun,HighRun,Prefix,SaveName 
     1913         
     1914        SetDataFolder root: 
     1915End 
Note: See TracChangeset for help on using the changeset viewer.