Changeset 846 for sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha
- Timestamp:
- Mar 15, 2012 11:11:10 AM (11 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Alpha/Tinker/FFT_Panel.ipf
r844 r846 12 12 // rather than "1" 13 13 // 14 // 15 // -- incorporate utility function that reads the wave note from a binary file 16 // Function/S LoadNoteFunc(PName,FName[,FileRef]) - use this as an "inspector?" 14 17 //////////// 15 18 … … 196 199 endif 197 200 201 Print "Loaded matrix parameters = ",str 198 202 Execute "NumberOfPoints()" 199 203 200 204 return(0) 201 205 end 206 207 // utility function that reads the wave note from a binary file 208 // 209 Function/S LoadNoteFunc(PName,FName[,FileRef]) 210 String PName, FName 211 Variable FileRef 212 213 Variable noteStart, noteLength, version, dependLength 214 String noteStr, typeStr = ".ibw" 215 if (ParamIsDefault(FileRef)) 216 Open/R/P=$PName/T=typeStr fileRef, as FName //open the file 217 endif 218 FSetPos fileRef, 0 219 FBinRead/F=2 fileRef, version 220 221 222 if (version == 5) 223 224 FSetPos fileRef, 4 225 Make/N=(3)/I/Free SizeWave 226 FBinRead FileRef,SizeWave 227 noteStart = SizeWave[0] 228 DependLength = SizeWave[1] 229 NoteLength = SizeWave[2] 230 noteStart += dependLength+64 231 232 elseif (version == 2) 233 234 FBinRead/F=3 fileRef, noteStart 235 // FBinRead/F=4 fileRef, dependLength 236 FBinRead/F=3 fileRef, noteLength 237 noteStart += 16 238 239 else 240 241 if (ParamIsDefault(FileRef)) 242 Close(FileRef) //close the file 243 endif 244 return "" 245 246 endif 247 if (!NoteLength) 248 if (ParamIsDefault(FileRef)) 249 Close(FileRef) //close the file 250 endif 251 return("") 252 endif 253 FSetPos fileRef, noteStart 254 NoteStr = PadString("",NoteLength,0) 255 FBinRead FileRef,NoteStr 256 257 if (ParamIsDefault(FileRef)) 258 Close(FileRef) //close the file 259 endif 260 return noteStr 261 262 End //LoadNoteFunc 263 202 264 203 265 Function FFTHelpButton(ba) : ButtonControl
Note: See TracChangeset
for help on using the changeset viewer.