Changeset 680 for sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Timestamp:
- Apr 9, 2010 4:30:03 PM (13 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Buttons.ipf
r570 r680 209 209 Variable increment 210 210 211 Variable i 212 String filename 211 213 //take the currently displayed RAW file (there is only one name in fileList) 212 214 SVAR oldName = root:Packages:NIST:RAW:fileList 213 215 214 //get the run number 215 Variable num = GetRunNumFromFile(oldName) 216 217 //increment 218 num += increment 219 220 //find the next specified file by number 221 String fileName = FindFileFromRunNumber(num) 222 if(cmpstr(fileName,"")==0) 223 //null return, do nothing 224 Return(1) 225 Endif 216 print oldName 217 218 filename = oldname 219 for (i = 0; i < abs(increment); i += 1) 220 filename = GetPrevNextRawFile(filename,increment/abs(increment)) 221 endfor 222 223 print filename 226 224 227 225 // display the specified RAW data file -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_Utils.ipf
r670 r680 1343 1343 return(newList) 1344 1344 End 1345 1346 // Return the filename that represents the previous or next file. 1347 // Input is current filename and increment. 1348 // Increment should be -1 or 1 1349 // -1 => previous file 1350 // 1 => next file 1351 Function/S GetPrevNextRawFile(curfilename, prevnext) 1352 String curfilename 1353 Variable prevnext 1354 1355 String filename 1356 1357 //get the run number 1358 Variable num = GetRunNumFromFile(curfilename) 1359 1360 //find the next specified file by number 1361 fileName = FindFileFromRunNumber(num+prevnext) 1362 1363 if(cmpstr(fileName,"")==0) 1364 //null return, do nothing 1365 fileName = FindFileFromRunNumber(num) 1366 Endif 1367 1368 print "in FU "+filename 1369 1370 Return filename 1371 End
Note: See TracChangeset
for help on using the changeset viewer.