Changeset 857 for sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Timestamp:
- Jul 6, 2012 5:29:38 PM (11 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/ANSTO_Utils.ipf
r795 r857 396 396 End 397 397 398 399 //function to test a file to see if it is a DIV file 400 // 401 // returns truth 0/1 402 // 403 // called by many procedures (both external and local) 404 // 405 Function CheckIfDIVData(fname) 406 String fname 407 408 409 // if(your test here) 410 // //true, is DIV data file 411 Return(1) 412 // else 413 // //some other file 414 // Return(0) 415 // Endif 416 417 End 418 398 419 Function isScatFile(fname) 399 420 String fname -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/FACILITY_Utils.ipf
r795 r857 259 259 // if(your test here) 260 260 // //true, is raw data file 261 // Return(1) 262 // else 263 // //some other file 264 // Return(0) 265 // Endif 266 267 End 268 269 //function to test a file to see if it is a DIV file 270 // 271 // returns truth 0/1 272 // 273 // called by many procedures (both external and local) 274 // 275 Function CheckIfDIVData(fname) 276 String fname 277 278 279 // if(your test here) 280 // //true, is DIV data file 261 281 // Return(1) 262 282 // else -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/ILL_Utils.ipf
r795 r857 450 450 End 451 451 452 //function to test a file to see if it is a DIV file 453 // 454 // returns truth 0/1 455 // 456 // called by many procedures (both external and local) 457 // 458 Function CheckIfDIVData(fname) 459 String fname 460 461 462 // if(your test here) 463 // //true, is DIV file data file 464 Return(1) 465 // else 466 // //some other file 467 // Return(0) 468 // Endif 469 470 End 452 471 453 472 // function returns 1 if file is a transmission file, 0 if not -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/KIST_Utils.ipf
r807 r857 267 267 End 268 268 269 //function to test a file to see if it is a DIV file 270 // 271 // returns truth 0/1 272 // 273 // called by many procedures (both external and local) 274 // 275 Function CheckIfDIVData(fname) 276 String fname 277 278 279 // if(your test here) 280 // //true, is DIV data file 281 // Return(1) 282 // else 283 // //some other file 284 // Return(0) 285 // Endif 286 287 End 269 288 270 289 // function returns 1 if file is a transmission file, 0 if not -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_Utils.ipf
r838 r857 831 831 Return(0) 832 832 Endif 833 End 834 835 //function to test a file to see if it is a DIV file 836 // 837 // returns truth 0/1 838 // 839 // called by many procedures (both external and local) 840 // 841 Function CheckIfDIVData(fname) 842 String fname 843 844 845 Variable refnum,totalBytes 846 // String testStr="" 847 848 Open/R/T="????TEXT" refNum as fname 849 if(strlen(s_filename) == 0) //user cancel (/Z not used, so V_flag not set) 850 return(0) 851 endif 852 853 //get the total number of bytes in the file 854 FStatus refNum 855 totalBytes = V_logEOF 856 //Print totalBytes 857 if(totalBytes < 100) 858 Close refNum 859 return(0) //not a raw file 860 endif 861 // FSetPos refNum,75 862 // FReadLine/N=3 refNum,testStr 863 Close refNum 864 865 if(totalBytes == 66116) // && ( cmpstr(testStr,"RAW")==0 || cmpstr(testStr,"SIM")==0)) 866 //true, is raw data file 867 Return(1) 868 else 869 //some other file 870 Return(0) 871 Endif 872 833 873 End 834 874 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/ProtocolAsPanel.ipf
r853 r857 2109 2109 endif 2110 2110 #else 2111 if(strlen(junkStr)==0 || CheckIfRawData(junkStr)) //for NCNR, not raw is sufficient, but better in the future toconfirm it is DIV if either is false, exit2111 if(strlen(junkStr)==0 || !CheckIfDIVData(junkStr)) //for NCNR, and other data confirm it is DIV if either is false, exit 2112 2112 SetDataFolder root: 2113 2113 Abort "No DIV (PLEX) file selected. Please use setABSParams again, selecting the empty beam file and then the detector sensitivity (Plex_) file"
Note: See TracChangeset
for help on using the changeset viewer.