Ignore:
Timestamp:
Mar 29, 2007 4:02:33 PM (15 years ago)
Author:
srkline
Message:

more file adjustments to clean out NCNR bits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sans/SANSReduction/branches/kline_29MAR07/Put in User Procedures/SANS_Reduction_v5.00/NCNR_Utils.ipf

    r69 r70  
    968968End 
    969969 
     970//function called byt the popups to get a file list of data that can be sorted 
     971// this procedure simply removes the raw data files from the string - there 
     972//can be lots of other junk present, but this is very fast... 
     973// 
     974// could also use the alternate procedure of keeping only file with the proper extension 
     975// 
     976// another possibility is to get a listing of the text files, but is unreliable on  
     977// Windows, where the data file must be .txt (and possibly OSX) 
     978// 
     979Function/S ReducedDataFileList(ctrlName) 
     980        String ctrlName 
     981 
     982        String list="",newList="",item="" 
     983        Variable num,ii 
     984         
     985        //check for the path 
     986        PathInfo catPathName 
     987        if(V_Flag==0) 
     988                DoAlert 0, "Data path does not exist - pick the data path from the button on the main panel" 
     989                Return("") 
     990        Endif 
     991         
     992        list = IndexedFile(catpathName,-1,"????") 
     993        num=ItemsInList(list,";") 
     994        //print "num = ",num 
     995        for(ii=(num-1);ii>=0;ii-=1) 
     996                item = StringFromList(ii, list  ,";") 
     997                //simply remove all that are not raw data files (SA1 SA2 SA3) 
     998                if( !stringmatch(item,"*.SA1*") && !stringmatch(item,"*.SA2*") && !stringmatch(item,"*.SA3*") ) 
     999                        if( !stringmatch(item,".*") && !stringmatch(item,"*.pxp") && !stringmatch(item,"*.DIV"))                //eliminate mac "hidden" files, pxp, and div files 
     1000                                newlist += item + ";" 
     1001                        endif 
     1002                endif 
     1003        endfor 
     1004        //remove VAX version numbers 
     1005        newList = RemoveVersNumsFromList(newList) 
     1006        //sort 
     1007        newList = SortList(newList,";",0) 
     1008 
     1009        return newlist 
     1010End 
Note: See TracChangeset for help on using the changeset viewer.