source: sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/CatVSTable.ipf @ 1240

Last change on this file since 1240 was 1240, checked in by srkline, 3 years ago

VSANS: changes here are simply cleaning up comments and TODO items

SANS: added a contextual menu simialr to VSANS so that RAW, MSK, DIV can be directly loaded from the FileCatalog?, in the sam way that they are in VSANS

File size: 35.4 KB
Line 
1#pragma rtGlobals=1             // Use modern global access method.
2#pragma version=5.0
3#pragma IgorVersion=6.1
4
5//
6//      SRK modified 30 JAN07 to include Rotation angle, Temperature, and B-field in the table (at the end)
7//
8
9//**************
10// Vers 1.2 090401
11//
12// Procedures for creating the Catalog listings of the SANS datafiles in the folder
13// specified by catPathName.
14// Header information from each of the dataifles is organized in a table for
15// easy identification of each file. CatVSTable is the preferred invocation,
16// although CatVSNotebook and CatNotebook can also be used.
17// Files in the folder that are not RAW SANS data are appended to the end of the listing.
18//**************
19
20//this main procedure does all the work, obtaining the folder path,
21//parsing the filenames in the list and (dispatching) to write out the
22//appropriate information to the notebook window
23Function BuildCatVeryShortTable()
24       
25        Variable err
26        Variable t1 = ticks
27       
28        PathInfo catPathName
29        if(v_flag==0)
30                err = PickPath()                //sets the local path to the data (catPathName)
31                if(err)
32                        Abort "no path to data was selected, no catalog can be made - use PickPath button"
33                Endif
34        Endif
35       
36        DoWindow/F CatVSTable
37       
38        Make/O/T/N=0 $"root:myGlobals:CatVSHeaderInfo:Filenames"
39        Make/O/T/N=0 $"root:myGlobals:CatVSHeaderInfo:Suffix"
40        Make/O/T/N=0 $"root:myGlobals:CatVSHeaderInfo:Labels"
41        Make/O/T/N=0 $"root:myGlobals:CatVSHeaderInfo:DateAndTime"
42        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:SDD"
43        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:Lambda"
44        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:CntTime"
45        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:TotCnts"
46        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:CntRate"
47        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:Transmission"
48        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:Thickness"
49        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:XCenter"
50        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:YCenter"
51//      Make/O/B/N=0 $"root:myGlobals:CatVSHeaderInfo:nGuides"
52//      Make/O/B/N=0 $"root:myGlobals:CatVSHeaderInfo:NumAttens"
53        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:nGuides"
54        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:NumAttens"
55        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:RunNumber"
56        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:IsTrans"
57        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:RotAngle"
58        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:Temperature"
59        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:Field"
60        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:MCR"              //added Mar 2008
61        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:Pos"              //added Mar 2010
62        //For ANSTO
63        Make/O/T/N=0 $"root:myGlobals:CatVSHeaderInfo:SICS"     
64        Make/O/T/N=0 $"root:myGlobals:CatVSHeaderInfo:HDF"
65       
66        Make/O/D/N=0 $"root:myGlobals:CatVSHeaderInfo:Reactorpower"       //only used for for ILL, June 2008,
67        WAVE ReactorPower = $"root:myGlobals:CatVSHeaderInfo:Reactorpower"
68
69        WAVE/T Filenames = $"root:myGlobals:CatVSHeaderInfo:Filenames"
70        WAVE/T Suffix = $"root:myGlobals:CatVSHeaderInfo:Suffix"
71        WAVE/T Labels = $"root:myGlobals:CatVSHeaderInfo:Labels"
72        WAVE/T DateAndTime = $"root:myGlobals:CatVSHeaderInfo:DateAndTime"
73        WAVE SDD = $"root:myGlobals:CatVSHeaderInfo:SDD"
74        WAVE Lambda = $"root:myGlobals:CatVSHeaderInfo:Lambda"
75        WAVE CntTime = $"root:myGlobals:CatVSHeaderInfo:CntTime"
76        WAVE TotCnts = $"root:myGlobals:CatVSHeaderInfo:TotCnts"
77        WAVE CntRate = $"root:myGlobals:CatVSHeaderInfo:CntRate"
78        WAVE Transmission = $"root:myGlobals:CatVSHeaderInfo:Transmission"
79        WAVE Thickness = $"root:myGlobals:CatVSHeaderInfo:Thickness"
80        WAVE XCenter = $"root:myGlobals:CatVSHeaderInfo:XCenter"
81        WAVE YCenter = $"root:myGlobals:CatVSHeaderInfo:YCenter"
82//      WAVE/B nGuides = $"root:myGlobals:CatVSHeaderInfo:nGuides"
83//      WAVE/B NumAttens = $"root:myGlobals:CatVSHeaderInfo:NumAttens"
84        WAVE nGuides = $"root:myGlobals:CatVSHeaderInfo:nGuides"
85        WAVE NumAttens = $"root:myGlobals:CatVSHeaderInfo:NumAttens"
86        WAVE RunNumber = $"root:myGlobals:CatVSHeaderInfo:RunNumber"
87        WAVE IsTrans = $"root:myGlobals:CatVSHeaderInfo:IsTrans"
88        WAVE RotAngle = $"root:myGlobals:CatVSHeaderInfo:RotAngle"
89        WAVE Temperature = $"root:myGlobals:CatVSHeaderInfo:Temperature"
90        WAVE Field = $"root:myGlobals:CatVSHeaderInfo:Field"
91        WAVE MCR = $"root:myGlobals:CatVSHeaderInfo:MCR"                //added Mar 2008
92        WAVE Pos = $"root:myGlobals:CatVSHeaderInfo:Pos"
93        //For ANSTO
94        WAVE SICS = $"root:myGlobals:CatVSHeaderInfo:SICS"     
95        WAVE HDF = $"root:myGlobals:CatVSHeaderInfo:HDF"
96       
97        If(V_Flag==0)
98                BuildTableWindow()
99                ModifyTable width(:myGlobals:CatVSHeaderInfo:SDD)=40
100                ModifyTable width(:myGlobals:CatVSHeaderInfo:Lambda)=40
101                ModifyTable width(:myGlobals:CatVSHeaderInfo:CntTime)=50
102                ModifyTable width(:myGlobals:CatVSHeaderInfo:TotCnts)=60
103                ModifyTable width(:myGlobals:CatVSHeaderInfo:CntRate)=60
104                ModifyTable width(:myGlobals:CatVSHeaderInfo:Transmission)=40
105                ModifyTable width(:myGlobals:CatVSHeaderInfo:Thickness)=40
106                ModifyTable width(:myGlobals:CatVSHeaderInfo:XCenter)=40
107                ModifyTable width(:myGlobals:CatVSHeaderInfo:YCenter)=40
108                ModifyTable width(:myGlobals:CatVSHeaderInfo:NumAttens)=30
109                ModifyTable width(:myGlobals:CatVSHeaderInfo:RotAngle)=50
110                ModifyTable width(:myGlobals:CatVSHeaderInfo:Field)=50
111                ModifyTable width(:myGlobals:CatVSHeaderInfo:MCR)=50
112#if (exists("QUOKKA")==6)
113                //ANSTO
114                ModifyTable width(:myGlobals:CatVSHeaderInfo:SICS)=80
115                ModifyTable width(:myGlobals:CatVSHeaderInfo:HDF)=40
116#endif         
117               
118#if (exists("ILL_D22")==6)
119                ModifyTable width(:myGlobals:CatVSHeaderInfo:Reactorpower)=50           //activate for ILL, June 2008
120#endif
121
122#if (exists("NCNR")==6)
123                ModifyTable width(:myGlobals:CatVSHeaderInfo:nGuides)=40
124                ModifyTable width(:myGlobals:CatVSHeaderInfo:Pos)=30
125                ModifyTable sigDigits(:myGlobals:CatVSHeaderInfo:Pos)=3                 //to make the display look nice, given the floating point values from ICE
126                ModifyTable sigDigits(:myGlobals:CatVSHeaderInfo:Lambda)=3              //may not work in all situations, but an improvement
127                ModifyTable sigDigits(:myGlobals:CatVSHeaderInfo:SDD)=5
128                ModifyTable trailingZeros(:myGlobals:CatVSHeaderInfo:Temperature)=1
129                ModifyTable sigDigits(:myGlobals:CatVSHeaderInfo:Temperature)=4
130#endif
131
132                ModifyTable width(Point)=0              //JUN04, remove point numbers - confuses users since point != run
133               
134                // (DONE - FEB 2020)
135        //  x- experimental hook with contextual menu
136        //             
137                SetWindow kwTopWin hook=CatTableHook, hookevents=1      // mouse down events
138        Endif
139
140        //get a list of all files in the folder, some will be junk version numbers that don't exist     
141        String list,partialName,tempName,temp=""
142        list = IndexedFile(catPathName,-1,"????")       //get all files in folder
143        Variable numitems,ii,ok
144       
145        //remove version numbers from semicolon-delimited list
146        list =  RemoveVersNumsFromList(list)
147        numitems = ItemsInList(list,";")
148       
149        //loop through all of the files in the list, reading CAT/SHORT information if the file is RAW SANS
150        //***version numbers have been removed***
151        String str,fullName
152        Variable lastPoint
153        ii=0
154       
155        Make/T/O/N=0 notRAWlist
156        do
157       
158                //get current item in the list
159                partialName = StringFromList(ii, list, ";")
160                //get a valid file based on this partialName and catPathName
161                tempName = FindValidFilename(partialName)
162               
163               
164                If(cmpstr(tempName,"")==0)              //a null string was returned
165                        //write to notebook that file was not found
166                        //if string is not a number, report the error
167                        if(numtype(str2num(partialName)) == 2)
168                                str = "this file was not found: "+partialName+"\r\r"
169                                //Notebook CatWin,font="Times",fsize=12,text=str
170                        Endif
171                else
172                        //prepend path to tempName for read routine
173                        PathInfo catPathName
174                        FullName = S_path + tempName
175                        //make sure the file is really a RAW data file
176                        ok = CheckIfRawData(fullName)
177               
178                        if (!ok)
179                                //write to notebook that file was not a RAW SANS file
180                                lastPoint = numpnts(notRAWlist)
181                                InsertPoints lastPoint,1,notRAWlist
182                                notRAWlist[lastPoint]=tempname
183                        else
184                                //go write the header information to the Notebook
185                                GetHeaderInfoToWave(fullName,tempName)
186                        Endif
187                Endif
188                ii+=1
189        while(ii<numitems)
190//Now sort them all based on some criterion that may be facility dependent (aim is to order them as collected)
191        SortWaves()
192//Append the files that are not raw files to the list
193        AppendNotRAWFiles(notRAWlist)   
194        KillWaves/Z notRAWlist
195//
196//      Print "Total time (s) = ",(ticks - t1)/60.15
197//      Print "Time per raw data file (s) = ",(ticks - t1)/60.15/(numItems-numpnts(notRawList))
198        return(0)
199End
200
201//appends the list of files that are not RAW SANS data to the filename wave (1st column)
202//for display in the table. Note that the filenames column will now be longer than all other
203//waves in the table
204Function AppendNotRAWFiles(w)
205        Wave/T w
206        Wave/T Filenames = $"root:myGlobals:CatVSHeaderInfo:Filenames"
207        Variable lastPoint
208       
209        if(numpnts(w) == 0)
210                return(0)
211        endif
212       
213        lastPoint = numpnts(Filenames)
214        InsertPoints lastPoint,numpnts(w),Filenames
215        Filenames[lastPoint,numpnts(Filenames)-1] = w[p-lastPoint]
216        return(0)
217End
218
219//sorts all of the waves of header information using the suffix (A123)
220//the result is that all of the data is in the order that it was collected,
221// regardless of how the prefix or run numbers were changed by the user
222Function SortWaves()
223        Wave/T GFilenames = $"root:myGlobals:CatVSHeaderInfo:Filenames"
224        Wave/T GSuffix = $"root:myGlobals:CatVSHeaderInfo:Suffix"
225        Wave/T GLabels = $"root:myGlobals:CatVSHeaderInfo:Labels"
226        Wave/T GDateTime = $"root:myGlobals:CatVSHeaderInfo:DateAndTime"
227        Wave GSDD = $"root:myGlobals:CatVSHeaderInfo:SDD"
228        Wave GLambda = $"root:myGlobals:CatVSHeaderInfo:Lambda"
229        Wave GCntTime = $"root:myGlobals:CatVSHeaderInfo:CntTime"
230        Wave GTotCnts = $"root:myGlobals:CatVSHeaderInfo:TotCnts"
231        Wave GCntRate = $"root:myGlobals:CatVSHeaderInfo:CntRate"
232        Wave GTransmission = $"root:myGlobals:CatVSHeaderInfo:Transmission"
233        Wave GThickness = $"root:myGlobals:CatVSHeaderInfo:Thickness"
234        Wave GXCenter = $"root:myGlobals:CatVSHeaderInfo:XCenter"
235        Wave GYCenter = $"root:myGlobals:CatVSHeaderInfo:YCenter"
236//      Wave/B GNumGuides = $"root:myGlobals:CatVSHeaderInfo:nGuides"
237//      Wave/B GNumAttens = $"root:myGlobals:CatVSHeaderInfo:NumAttens"
238        Wave GNumGuides = $"root:myGlobals:CatVSHeaderInfo:nGuides"
239        Wave GNumAttens = $"root:myGlobals:CatVSHeaderInfo:NumAttens"
240        Wave GRunNumber = $"root:myGlobals:CatVSHeaderInfo:RunNumber"
241        Wave GIsTrans = $"root:myGlobals:CatVSHeaderInfo:IsTrans"
242        Wave GRot = $"root:myGlobals:CatVSHeaderInfo:RotAngle"
243        Wave GTemp = $"root:myGlobals:CatVSHeaderInfo:Temperature"
244        Wave GField = $"root:myGlobals:CatVSHeaderInfo:Field"
245        Wave GMCR = $"root:myGlobals:CatVSHeaderInfo:MCR"               //added Mar 2008
246        Wave GPos = $"root:myGlobals:CatVSHeaderInfo:Pos"
247        Wave/Z GReactPow = $"root:myGlobals:CatVSHeaderInfo:ReactorPower"               //activate for ILL June 2008 ( and the sort line too)
248        //For ANSTO
249        Wave/T GSICS = $"root:myGlobals:CatVSHeaderInfo:SICS"
250        Wave/T GHDF = $"root:myGlobals:CatVSHeaderInfo:HDF"
251
252#if (exists("ILL_D22")==6)
253        Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR,GReactPow
254#elif (exists("NCNR")==6)
255        //      Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR
256        Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR,GPos,gNumGuides
257#elif (exists("QUOKKA")==6)
258    //ANSTO
259        Sort GFilenames, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR, GSICS, GHDF
260#else
261//      Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR
262        Sort GSuffix, GSuffix, GFilenames, GLabels, GDateTime, GSDD, GLambda, GCntTime, GTotCnts, GCntRate, GTransmission, GThickness, GXCenter, GYCenter, GNumAttens,GRunNumber,GIsTrans,GRot,GTemp,GField,GMCR
263#endif
264
265
266        return(0)
267End
268
269//function to create the CAT/VSTable to display the header information
270//this table is just like any other table
271Function BuildTableWindow()
272        Wave/T Filenames = $"root:myGlobals:CatVSHeaderInfo:Filenames"
273        Wave/T Labels = $"root:myGlobals:CatVSHeaderInfo:Labels"
274        Wave/T DateAndTime = $"root:myGlobals:CatVSHeaderInfo:DateAndTime"
275        Wave SDD = $"root:myGlobals:CatVSHeaderInfo:SDD"
276        Wave Lambda = $"root:myGlobals:CatVSHeaderInfo:Lambda"
277        Wave CntTime = $"root:myGlobals:CatVSHeaderInfo:CntTime"
278        Wave TotCnts = $"root:myGlobals:CatVSHeaderInfo:TotCnts"
279        Wave CntRate = $"root:myGlobals:CatVSHeaderInfo:CntRate"
280        Wave Transmission = $"root:myGlobals:CatVSHeaderInfo:Transmission"
281        Wave Thickness = $"root:myGlobals:CatVSHeaderInfo:Thickness"
282        Wave XCenter = $"root:myGlobals:CatVSHeaderInfo:XCenter"
283        Wave YCenter = $"root:myGlobals:CatVSHeaderInfo:YCenter"
284//      Wave/B NumGuides = $"root:myGlobals:CatVSHeaderInfo:nGuides"
285//      Wave/B NumAttens = $"root:myGlobals:CatVSHeaderInfo:NumAttens"
286        Wave NumGuides = $"root:myGlobals:CatVSHeaderInfo:nGuides"
287        Wave NumAttens = $"root:myGlobals:CatVSHeaderInfo:NumAttens"
288        Wave RotAngle =  $"root:myGlobals:CatVSHeaderInfo:RotAngle"
289        Wave Temperature = $"root:myGlobals:CatVSHeaderInfo:Temperature"
290        Wave Field= $"root:myGlobals:CatVSHeaderInfo:Field"
291        Wave MCR = $"root:myGlobals:CatVSHeaderInfo:MCR"                //added Mar 2008
292        Wave Pos = $"root:myGlobals:CatVSHeaderInfo:Pos"
293        Wave/Z ReactorPower = $"root:myGlobals:CatVSHeaderInfo:reactorpower"       //activate for ILL, June 08 (+ edit line)
294        Wave/Z SICS = $"root:myGlobals:CatVSHeaderInfo:SICS" // For ANSTO June 2010
295        Wave/Z HDF = $"root:myGlobals:CatVSHeaderInfo:HDF" // For ANSTO June 2010
296       
297#if (exists("ILL_D22")==6)
298        Edit Filenames, Labels, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR, ReactorPower as "Data File Catalog"
299#elif (exists("NCNR")==6)
300// original order, magnetic at the end
301//      Edit Filenames, Labels, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR as "Data File Catalog"
302// with numGuides
303        Edit Filenames, Labels, DateAndTime, SDD, Lambda, numGuides, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR, Pos as "Data File Catalog"
304// alternate ordering, put the magnetic information first
305//      Edit Filenames, Labels, RotAngle, Temperature, Field, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens as "Data File Catalog"
306#elif (exists("QUOKKA")==6)
307        //ANSTO
308        Edit Filenames, Labels, DateAndTime,  SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR,SICS, HDF as "Data File Catalog"
309#else
310        // HFIR or anything else
311        Edit Filenames, Labels, DateAndTime, SDD, Lambda, CntTime, TotCnts, CntRate, Transmission, Thickness, XCenter, YCenter, NumAttens, RotAngle, Temperature, Field, MCR as "Data File Catalog"
312#endif
313
314        String name="CatVSTable"
315        DoWindow/C $name
316        return(0)
317End
318
319//reads header information and puts it in the appropriate waves for display in the table.
320//fname is the full path for opening (and reading) information from the file
321//which alreay was found to exist. sname is the file;vers to be written out,
322//avoiding the need to re-extract it from fname.
323Function GetHeaderInfoToWave(fname,sname)
324        String fname,sname
325       
326//      String textstr,temp,lbl,date_time,suffix
327//      Variable ,lambda,sdd,,refNum,trans,thick,xcenter,ycenter,numatten
328//      Variable lastPoint, beamstop,dum
329        Variable lastPoint,ctime,detcnt,cntrate//,instrumentNum
330
331        Wave/T GFilenames = $"root:myGlobals:CatVSHeaderInfo:Filenames"
332        Wave/T GSuffix = $"root:myGlobals:CatVSHeaderInfo:Suffix"
333        Wave/T GLabels = $"root:myGlobals:CatVSHeaderInfo:Labels"
334        Wave/T GDateTime = $"root:myGlobals:CatVSHeaderInfo:DateAndTime"
335        //ANSTO
336        Wave/T GSICS = $"root:myGlobals:CatVSHeaderInfo:SICS"
337        Wave/T GHDF = $"root:myGlobals:CatVSHeaderInfo:HDF"
338        //END ANSTO
339        Wave GSDD = $"root:myGlobals:CatVSHeaderInfo:SDD"
340        Wave GLambda = $"root:myGlobals:CatVSHeaderInfo:Lambda"
341        Wave GCntTime = $"root:myGlobals:CatVSHeaderInfo:CntTime"
342        Wave GTotCnts = $"root:myGlobals:CatVSHeaderInfo:TotCnts"
343        Wave GCntRate = $"root:myGlobals:CatVSHeaderInfo:CntRate"
344        Wave GTransmission = $"root:myGlobals:CatVSHeaderInfo:Transmission"
345        Wave GThickness = $"root:myGlobals:CatVSHeaderInfo:Thickness"
346        Wave GXCenter = $"root:myGlobals:CatVSHeaderInfo:XCenter"
347        Wave GYCenter = $"root:myGlobals:CatVSHeaderInfo:YCenter"
348//      Wave/B GNumGuides = $"root:myGlobals:CatVSHeaderInfo:nGuides"
349//      Wave/B GNumAttens = $"root:myGlobals:CatVSHeaderInfo:NumAttens"
350        Wave GNumGuides = $"root:myGlobals:CatVSHeaderInfo:nGuides"
351        Wave GNumAttens = $"root:myGlobals:CatVSHeaderInfo:NumAttens"
352        Wave GRunNumber = $"root:myGlobals:CatVSHeaderInfo:RunNumber"
353        Wave GIsTrans = $"root:myGlobals:CatVSHeaderInfo:IsTrans"
354        Wave GRot = $"root:myGlobals:CatVSHeaderInfo:RotAngle"
355        Wave GTemp = $"root:myGlobals:CatVSHeaderInfo:Temperature"
356        Wave GField = $"root:myGlobals:CatVSHeaderInfo:Field"
357        Wave GMCR = $"root:myGlobals:CatVSHeaderInfo:MCR"
358        Wave GPos = $"root:myGlobals:CatVSHeaderInfo:Pos"
359        Wave GReactpow = $"root:myGlobals:CatVSHeaderInfo:reactorpower"         //activate for ILL, Jne 2008, (+ last insert @ end of function)
360
361        lastPoint = numpnts(GLambda)
362               
363        //filename
364        InsertPoints lastPoint,1,GFilenames
365        GFilenames[lastPoint]=sname
366       
367        //read the file alphanumeric suffix
368        InsertPoints lastPoint,1,GSuffix
369        GSuffix[lastPoint]=getSuffix(fname)
370
371        //read the counting time (integer)
372        InsertPoints lastPoint,1,GCntTime
373        ctime = getCountTime(fname)
374        GCntTime[lastPoint]=ctime
375       
376        //read the file creation date
377        InsertPoints lastPoint,1,GDateTime
378        GDateTime[lastPoint]=getFileCreationDate(fname)
379
380        // read the sample.label text field
381        InsertPoints lastPoint,1,GLabels
382        GLabels[lastPoint]=getSampleLabel(fname)
383       
384        #if (exists("QUOKKA")==6)
385                InsertPoints lastPoint,1,GSICS
386                GSICS[lastPoint]=getSICSVersion(fname)
387                       
388                //read the HDF version
389                InsertPoints lastPoint,1,GHDF
390                GHDF[lastPoint]=getHDFVersion(fname)
391        #endif
392               
393        //read the reals
394        //detector count and (derived) count rate
395        detcnt = getDetCount(fname)
396        cntrate = detcnt/ctime
397        InsertPoints lastPoint,1,GTotCnts
398        GTotCnts[lastPoint]=detcnt
399        InsertPoints lastPoint,1,GCntRate
400        GCntRate[lastPoint]=cntrate
401       
402        //Attenuators
403        InsertPoints lastPoint,1,GNumAttens
404        GNumAttens[lastPoint]=getAttenNumber(fname)
405       
406        //Transmission
407        InsertPoints lastPoint,1,GTransmission
408        GTransmission[lastPoint]=getSampleTrans(fname)
409       
410        //Thickness
411        InsertPoints lastPoint,1,GThickness
412        GThickness[lastPoint]=getSampleThickness(fname)
413
414        //XCenter of beam on detector
415        InsertPoints lastPoint,1,GXCenter
416        GXCenter[lastPoint]=getBeamXPos(fname)
417
418        //YCenter
419        InsertPoints lastPoint,1,GYCenter
420        GYCenter[lastPoint]=getBeamYPos(fname)
421
422        //SDD
423        InsertPoints lastPoint,1,GSDD
424        GSDD[lastPoint]=getSDD(fname)
425       
426        //wavelength
427        InsertPoints lastPoint,1,GLambda
428        GLambda[lastPoint]=getWavelength(fname)
429       
430        //Rotation Angle
431        InsertPoints lastPoint,1,GRot
432        GRot[lastPoint]=getSampleRotationAngle(fname)
433       
434        //Sample Temperature
435        InsertPoints lastPoint,1,GTemp
436        GTemp[lastPoint]=getTemperature(fname)
437       
438        //Sample Field
439        InsertPoints lastPoint,1,GField
440        GField[lastPoint]=getFieldStrength(fname)
441       
442        //Beamstop position (not reported)
443        //strToExecute = GBLoadStr + "/S=368/U=1" + "\"" + fname + "\""
444
445        //the run number (not displayed in the table, but carried along)
446        InsertPoints lastPoint,1,GRunNumber
447        GRunNumber[lastPoint] = GetRunNumFromFile(sname)
448
449        // 0 if the file is a scattering  file, 1 (truth) if the file is a transmission file
450        InsertPoints lastPoint,1,GIsTrans
451        GIsTrans[lastPoint]  = isTransFile(fname)               //returns one if beamstop is "out"
452       
453        // Monitor Count Rate
454        InsertPoints lastPoint,1,GMCR
455        GMCR[lastPoint]  = getMonitorCount(fname)/ctime         //total monitor count / total count time
456
457
458
459#if (exists("ILL_D22")==6)
460        // Reactor Power (activate for ILL)
461        InsertPoints lastPoint,1,GReactpow
462        GReactPow[lastPoint]  = getReactorPower(fname)
463#endif 
464
465// number of guides and sample position, only for NCNR
466#if (exists("NCNR")==6)
467//      instrumentNum = str2num(getAcctName(fname)[3])          // "[NGxSANSxx]" -- [3] should be then instrument number
468//      Variable/G root:Packages:NIST:SAS:instrument = instrumentNum            //so that Ng can be correctly calculated
469
470        // acct name is "[NGxSANSxx]" -- [1,3] is the instrument "name" "NGx"
471        //so that Ng can be correctly calculated
472        String/G root:Packages:NIST:SAS:gInstStr = getAcctName(fname)[1,3]
473       
474        InsertPoints lastPoint,1,GNumGuides
475        GNumGuides[lastPoint]  = numGuides(getSourceToSampleDist(fname))
476       
477        //Sample Position
478        InsertPoints lastPoint,1,GPos
479        GPos[lastPoint] = getSamplePosition(fname)
480#endif
481
482        return(0)
483End
484
485
486//this main procedure does all the work for making the cat notebook,
487// obtaining the folder path, parsing the filenames in the list,
488// and (dispatching) to write out the appropriate information to the notebook window
489Proc BuildCatShortNotebook()
490
491        DoWindow/F CatWin
492        If(V_Flag ==0)
493                String nb = "CatWin"
494                NewNotebook/F=1/N=$nb/W=(5.25,40.25,581.25,380.75) as "CATALOG Window"
495                Notebook $nb defaultTab=36, statusWidth=238, pageMargins={72,72,72,72}
496                Notebook $nb showRuler=1, rulerUnits=1, updating={1, 60}
497                Notebook $nb newRuler=Normal, justification=0, margins={0,0,468}, spacing={0,0,0}, tabs={}
498                Notebook $nb ruler=Normal; Notebook $nb  margins={0,0,544}
499        Endif
500       
501        Variable err
502        PathInfo catPathName
503        if(v_flag==0)
504                err = PickPath()                //sets the local path to the data (catPathName)
505                if(err)
506                        Abort "no path to data was selected, no catalog can be made - use PickPath button"
507                Endif
508        Endif
509       
510        String temp=""
511        //clear old window contents, reset the path
512        Notebook CatWin,selection={startOfFile,EndOfFile}
513        Notebook CatWin,text="\r"
514       
515        PathInfo catPathName
516        temp = "FOLDER: "+S_path+"\r\r"
517        Notebook CatWin,font="Times",fsize=12,text = temp
518       
519        //get a list of all files in the folder, some will be junk version numbers that don't exist     
520        String list,partialName,tempName
521        list = IndexedFile(catPathName,-1,"????")       //get all files in folder
522        Variable numitems,ii,ok
523       
524        //remove version numbers from semicolon-delimited list
525        list =  RemoveVersNumsFromList(list)
526       
527        numitems = ItemsInList(list,";")
528       
529        //loop through all of the files in the list, reading CAT/SHORT information if the file is RAW SANS
530        //***version numbers have been removed***
531        String str,fullName,notRAWlist
532        ii=0
533        notRAWlist = ""
534        do
535                //get current item in the list
536                partialName = StringFromList(ii, list, ";")
537                //get a valid file based on this partialName and catPathName
538                tempName = FindValidFilename(partialName)
539                If(cmpstr(tempName,"")==0)              //a null string was returned
540                        //write to notebook that file was not found
541                        //if string is not a number, report the error
542                        if(numtype(str2num(partialName)) == 2)
543                                str = "this file was not found: "+partialName+"\r\r"
544                                Notebook CatWin,font="Times",fsize=12,text=str
545                        Endif
546                else
547                        //prepend path to tempName for read routine
548                        PathInfo catPathName
549                        FullName = S_path + tempName
550                        //make sure the file is really a RAW data file
551                        ok = CheckIfRawData(fullName)
552                        if (!ok)
553                                //write to notebook that file was not a RAW SANS file
554                                notRAWlist += "This file is not recognized as a RAW SANS data file: "+tempName+"\r"
555                                //Notebook CatWin,font="Times",fsize=12,text=str
556                        else
557                                //go write the header information to the Notebook
558                                WriteCatToNotebook(fullName,tempName)
559                        Endif
560                Endif
561                ii+=1
562        while(ii<numitems)
563        Notebook CatWin,font="Times",fsize=12,text=notRAWlist
564End
565
566//writes out the CATalog information to the notebook named CatWin (which must exist)
567//fname is the full path for opening (and reading) information from the file
568//which alreay was found to exist. sname is the file;vers to be written out,
569//avoiding the need to re-extract it from fname.
570Function WriteCatToNotebook(fname,sname)
571        String fname,sname
572       
573        String textstr,temp,lbl,date_time
574        Variable ctime,lambda,sdd,detcnt,cntrate,refNum,trans,thick
575       
576        //read the file creation date
577        date_time = getFileCreationDate(fname)
578
579        // read the sample.label text field
580        lbl = getSampleLabel(fname)
581       
582        //read the counting time (integer)
583        ctime = getCountTime(fname)
584               
585        //read the reals
586       
587        //detector count + countrate
588        detcnt = getDetCount(fname)
589        cntrate = detcnt/ctime
590       
591        //wavelength
592        lambda = getWavelength(fname)
593       
594        //SDD
595        sdd = getSDD(fname)
596       
597        //Transmission
598        trans = getSampleTrans(fname)
599       
600        //Thickness
601        thick = getSampleThickness(fname)
602               
603        temp = "FILE:  "
604        Notebook CatWin,textRGB=(0,0,0),text=temp
605        Notebook CatWin,fstyle=1,text=sname
606        temp = "\t\t"+date_time+"\r"
607        Notebook CatWin,fstyle=0,text=temp
608        temp = "LABEL: "+lbl+"\r"
609        Notebook CatWin,text=temp
610        temp = "COUNTING TIME: "+num2str(ctime)+" secs \t\tDETECTOR COUNT: "+num2str(detcnt)+"\r"
611        Notebook CatWin,text=temp
612        temp = "WAVELENGTH: "+num2str(lambda)+" A \tSDD: "+num2str(sdd)+" m \t"
613        temp += "DET. CNT. RATE: "+num2str(cntrate)+"  cts/sec\r"
614        Notebook CatWin,text=temp
615        temp = "TRANS: "
616        Notebook CatWin,text=temp
617        temp =  num2str(trans)
618        Notebook CatWin,textRGB=(50000,0,0),fStyle = 1,text=temp
619        temp =  "\t\tTHICKNESS: "
620        Notebook CatWin,textRGB=(0,0,0),fStyle = 0,text=temp
621        temp =  num2str(thick)
622        Notebook CatWin,textRGB=(50000,0,0),fStyle = 1,text=temp
623        temp = " cm\r\r"
624        Notebook CatWin,textRGB=(0,0,0),fStyle = 0,text=temp
625End
626
627//writes out the CATalog information to the notebook named CatWin (which must exist)
628//fname is the full path for opening (and reading) information from the file
629//which alreay was found to exist. sname is the file;vers to be written out,
630//avoiding the need to re-extract it from fname.
631//
632// this is just for 1D (not Raw) data files
633Function Write_ABSHeader_toNotebook(fname,sname)
634        String fname,sname
635       
636        String textstr,temp,lbl,date_time
637        Variable ctime,lambda,sdd,detcnt,cntrate,refNum,trans,thick
638       
639        //read the file creation date
640        date_time = getFileCreationDate(fname)
641
642        // read the sample.label text field
643        lbl = getSampleLabel(fname)
644       
645        //read the counting time (integer)
646        ctime = getCountTime(fname)
647               
648        //read the reals
649       
650        //detector count + countrate
651        detcnt = getDetCount(fname)
652        cntrate = detcnt/ctime
653       
654        //wavelength
655        lambda = getWavelength(fname)
656       
657        //SDD
658        sdd = getSDD(fname)
659       
660        //Transmission
661        trans = getSampleTrans(fname)
662       
663        //Thickness
664        thick = getSampleThickness(fname)
665               
666        temp = "FILE:  "
667        Notebook CatWin,textRGB=(0,0,0),text=temp
668        Notebook CatWin,fstyle=1,text=sname
669        temp = "\t\t"+date_time+"\r"
670        Notebook CatWin,fstyle=0,text=temp
671        temp = "LABEL: "+lbl+"\r"
672        Notebook CatWin,text=temp
673        temp = "COUNTING TIME: "+num2str(ctime)+" secs \t\tDETECTOR COUNT: "+num2str(detcnt)+"\r"
674        Notebook CatWin,text=temp
675        temp = "WAVELENGTH: "+num2str(lambda)+" A \tSDD: "+num2str(sdd)+" m \t"
676        temp += "DET. CNT. RATE: "+num2str(cntrate)+"  cts/sec\r"
677        Notebook CatWin,text=temp
678        temp = "TRANS: "
679        Notebook CatWin,text=temp
680        temp =  num2str(trans)
681        Notebook CatWin,textRGB=(50000,0,0),fStyle = 1,text=temp
682        temp =  "\t\tTHICKNESS: "
683        Notebook CatWin,textRGB=(0,0,0),fStyle = 0,text=temp
684        temp =  num2str(thick)
685        Notebook CatWin,textRGB=(50000,0,0),fStyle = 1,text=temp
686        temp = " cm\r\r"
687        Notebook CatWin,textRGB=(0,0,0),fStyle = 0,text=temp
688End
689
690
691//****************
692// main procedure for CAT/VS Notebook ******
693//this main procedure does all the work, obtaining the folder path,
694//parsing the filenames in the list and (dispatching) to write out the
695//appropriate information to the notebook window
696Proc BuildCatVeryShortNotebook()
697
698        DoWindow/F CatWin
699        If(V_Flag ==0)
700                String nb = "CatWin"
701                NewNotebook/F=1/N=$nb/W=(5.25,40.25,581.25,380.75) as "CATALOG Window"
702                Notebook $nb defaultTab=36, statusWidth=238, pageMargins={72,72,72,72}
703                Notebook $nb showRuler=1, rulerUnits=1, updating={1, 60}
704                Notebook $nb newRuler=Normal, justification=0, margins={0,0,468}, spacing={0,0,0}, tabs={}
705                Notebook $nb ruler=Normal; Notebook $nb  margins={0,0,544}
706        Endif
707       
708        Variable err
709        PathInfo catPathName
710        if(v_flag==0)
711                err = PickPath()                //sets the local path to the data (catPathName)
712                if(err)
713                        Abort "no path to data was selected, no catalog can be made - use PickPath button"
714                Endif
715        Endif
716       
717        String temp=""
718        //clear old window contents, reset the path
719        Notebook CatWin,selection={startOfFile,EndOfFile}
720        Notebook CatWin,text="\r"
721       
722        PathInfo catPathName
723        temp = "FOLDER: "+S_path+"\r\r"
724        Notebook CatWin,font="Times",fsize=12,text = temp
725        Notebook CatWin,fstyle=1,text="NAME"+", "
726        temp = "Label"+", "
727        Notebook CatWin,fstyle=0, text=temp
728        temp = "CntTime"
729        Notebook CatWin,fstyle=1,textRGB=(0,0,50000),text=temp
730        temp = ", TotDetCnts, "
731        Notebook CatWin,fstyle=0,textRGB=(0,0,0),text=temp
732        temp = "Lambda"
733        Notebook CatWin,textRGB=(50000,0,0),fStyle = 1,text=temp
734        temp = ", SDD, "
735        Notebook CatWin,fstyle=0,textRGB=(0,0,0),text=temp
736        temp = "CountRate"
737        Notebook CatWin,textRGB=(0,50000,0),fStyle = 1,text=temp
738        temp =  ", Transmission, "
739        Notebook CatWin,fstyle=0,textRGB=(0,0,0),text=temp
740        temp =  "Thickness"
741        Notebook CatWin,textRGB=(0,0,50000),fStyle = 1,text=temp
742        temp = ", Xposition"
743        Notebook CatWin,textRGB=(0,0,0),fStyle = 0,text=temp
744        temp = ", Yposition"
745        Notebook CatWin,textRGB=(50000,0,0),fStyle = 0,text=temp
746        temp = "\r\r"
747        Notebook CatWin,textRGB=(0,0,0),fStyle = 0,text=temp
748
749       
750        //get a list of all files in the folder, some will be junk version numbers that don't exist     
751        String list,partialName,tempName
752        list = IndexedFile(catPathName,-1,"????")       //get all files in folder
753        Variable numitems,ii,ok
754       
755        //remove version numbers from semicolon-delimited list
756        list =  RemoveVersNumsFromList(list)
757       
758        numitems = ItemsInList(list,";")
759       
760        //loop through all of the files in the list, reading CAT/SHORT information if the file is RAW SANS
761        //***version numbers have been removed***
762        String str,fullName,notRAWlist
763        ii=0
764       
765        notRAWlist=""
766        do
767                //get current item in the list
768                partialName = StringFromList(ii, list, ";")
769                //get a valid file based on this partialName and catPathName
770                tempName = FindValidFilename(partialName)
771                If(cmpstr(tempName,"")==0)              //a null string was returned
772                        //write to notebook that file was not found
773                        //if string is not a number, report the error
774                        if(numtype(str2num(partialName)) == 2)
775                                str = "this file was not found: "+partialName+"\r\r"
776                                Notebook CatWin,font="Times",fsize=12,text=str
777                        Endif
778                else
779                        //prepend path to tempName for read routine
780                        PathInfo catPathName
781                        FullName = S_path + tempName
782                        //make sure the file is really a RAW data file
783                        ok = CheckIfRawData(fullName)
784                        if (!ok)
785                                //write to notebook that file was not a RAW SANS file
786                                notRAWlist += "This file is not recognized as a RAW SANS data file: "+tempName+"\r"
787                                //Notebook CatWin,font="Times",fsize=12,text=str
788                        else
789                                //go write the header information to the Notebook
790                                WriteCatVSToNotebook(fullName,tempName)
791                        Endif
792                Endif
793                ii+=1
794        while(ii<numitems)
795        Notebook CatWin,font="Times",fsize=12,text=notRAWlist
796End
797
798//writes out the CATalog information to the notebook named CatWin (which must exist)
799//fname is the full path for opening (and reading) information from the file
800//which alreay was found to exist. sname is the file;vers to be written out,
801//avoiding the need to re-extract it from fname.
802Function WriteCatVSToNotebook(fname,sname)
803        String fname,sname
804       
805        String textstr,temp,lbl,date_time
806        Variable ctime,lambda,sdd,detcnt,cntrate,refNum,trans,thick,xcenter,ycenter,numatten
807       
808        //read the file creation date
809        date_time = getFileCreationDate(fname)
810
811        // read the sample.label text field
812        lbl = getSampleLabel(fname)
813       
814        //read the counting time (integer)
815        ctime = getCountTime(fname)
816               
817        //read the reals
818        //detector count + countrate
819        detcnt = getDetCount(fname)
820        cntrate = detcnt/ctime
821       
822        //wavelength
823        lambda = getWavelength(fname)
824       
825        //SDD
826        sdd = getSDD(fname)
827       
828        //Transmission
829        trans = getSampleTrans(fname)
830       
831        //Thickness
832        thick = getSampleThickness(fname)
833               
834        //Attenuators
835        numatten = getAttenNumber(fname)
836
837        //XCenter
838        xCenter = getBeamXPos(fname)
839
840        //YCenter
841        yCenter = getBeamYPos(fname)
842
843       
844        temp = ""
845        Notebook CatWin,textRGB=(0,0,0),text=temp
846        Notebook CatWin,fstyle=1,text=sname+", "
847//      temp = ", "+date_time+", "
848//      Notebook CatWin,fstyle=0,text=temp
849        temp = lbl+", "
850        Notebook CatWin,fstyle=0, text=temp
851        temp = num2str(ctime)
852        Notebook CatWin,fstyle=1,textRGB=(0,0,50000),text=temp
853        temp = ", " + num2str(detcnt) + ", "
854        Notebook CatWin,fstyle=0,textRGB=(0,0,0),text=temp
855        temp = num2str(lambda)
856        Notebook CatWin,textRGB=(50000,0,0),fStyle = 1,text=temp
857        temp = ", "+num2str(sdd)+", "
858        Notebook CatWin,fstyle=0,textRGB=(0,0,0),text=temp
859        temp = num2str(cntrate)
860        Notebook CatWin,textRGB=(0,50000,0),fStyle = 1,text=temp
861        temp =  ", "+num2str(trans)+", "
862        Notebook CatWin,fstyle=0,textRGB=(0,0,0),text=temp
863        temp =  num2str(thick)
864        Notebook CatWin,textRGB=(0,0,50000),fStyle = 1,text=temp
865        temp = ", "+num2str(xCenter)+", "
866        Notebook CatWin,textRGB=(0,0,0),fStyle = 0,text=temp
867        temp = num2str(yCenter)+"\r"
868        Notebook CatWin,textRGB=(50000,0,0),fStyle = 1,text=temp
869        //temp = num2str(numatten)+", "
870        //Notebook CatWin,text=temp
871End
872
873
874//
875// TODO:
876//  this is experimental...not been tested by any users yet
877// -- FEB 2020 copied this function over from VSANS, since it was popular there
878//
879// -- what else to add to the menu? (MSK and DIV now work)
880// -- add directly to WORK files?
881// -- "set" as some special file type, intent, use? (quick "patch" operations)
882// -- "check" the reduction protocol for completeness?
883//
884// x- seems to not "let go" of a selection (missing the mouse up?)
885//    (possibly) less annoying if I only handle mouseup and present a menu then.
886//
887Function CatTableHook(infoStr)
888        String infoStr
889        String event= StringByKey("EVENT",infoStr)
890       
891        Variable ii
892       
893        String pathStr
894        PathInfo catPathName
895        pathStr = S_path
896       
897//      Print "EVENT= ",event
898        strswitch(event)
899                case "mouseup":
900//                      Variable xpix= NumberByKey("MOUSEX",infoStr)
901//                      Variable ypix= NumberByKey("MOUSEY",infoStr)
902//                      PopupContextualMenu/C=(xpix, ypix) "yes;no;maybe;"
903                        PopupContextualMenu "Load RAW;Load MSK;Load DIV;-;Send to MRED;"
904       
905       
906       
907
908//              root:myGlobals:CatVSHeaderInfo:Filenames       
909                        WAVE/T Filenames = $"root:myGlobals:CatVSHeaderInfo:Filenames"
910                        Variable err
911                        strswitch(S_selection)
912                                case "Load RAW":
913                                        GetSelection table,CatVSTable,1
914//                                      Print V_flag, V_startRow, V_startCol, V_endRow, V_endCol
915                                        Print "Loading " + FileNames[V_StartRow]
916                                        ReadHeaderAndData(pathStr + FileNames[V_StartRow])      //this is the full Path+file
917//                                      err = V_LoadHDF5Data(FileNames[V_StartRow],"RAW")
918                                        if(!err)                //directly from, and the same steps as DisplayMainButtonProc(ctrlName)
919                                                // this (in SANS) just passes directly to fRawWindowHook()
920                                                UpdateDisplayInformation("RAW")         // plot the data in whatever folder type
921                                        endif
922                                        break
923                                       
924                                case "Load MSK":
925                                        GetSelection table,CatVSTable,1
926//                                      Print V_flag, V_startRow, V_startCol, V_endRow, V_endCol
927                                        Print "Loading " + FileNames[V_StartRow]
928                                        ReadMCID_MASK(pathStr + FileNames[V_StartRow])
929                                        Execute "maskButtonProc(\"maskButton\")"
930                                       
931                                        break
932                                       
933                                case "Load DIV":
934                                        GetSelection table,CatVSTable,1
935//                                      Print V_flag, V_startRow, V_startCol, V_endRow, V_endCol
936                                        Print "Loading " + FileNames[V_StartRow]
937                                       
938                                        ReadHeaderAndWork("DIV",pathStr + FileNames[V_StartRow])
939                                       
940                                        break
941                                case "Send to MRED":
942                                        //  root:myGlobals:MRED:gFileNumList
943                                        SVAR/Z numList=root:myGlobals:MRED:gFileNumList
944                                        if(SVAR_Exists(numList))
945                                                GetSelection table,CatVSTable,1
946                                                for(ii=V_StartRow;ii<=V_endRow;ii+=1)
947        //                                              Print "selected " + FileNames[ii]
948                                                        numList += fileNames[ii] + ","
949                                                endfor
950                                                // pop the menu on the mred panel
951                                                MREDPopMenuProc("",1,"")
952                                        endif
953                                        break
954                                       
955                        endswitch               //popup selection
956        endswitch       // event
957       
958        return 0
959End
960
Note: See TracBrowser for help on using the repository browser.