Changeset 74 for sans/SANSReduction/branches
- Timestamp:
- Apr 5, 2007 5:06:48 PM (16 years ago)
- Location:
- sans/SANSReduction/branches/kline_29MAR07/Put in User Procedures/SANS_Reduction_v5.00
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/SANSReduction/branches/kline_29MAR07/Put in User Procedures/SANS_Reduction_v5.00/CatVSTable.ipf
r72 r74 315 315 // 0 if the file is a scattering file, 1 (truth) if the file is a transmission file 316 316 InsertPoints lastPoint,1,GIsTrans 317 GIsTrans[lastPoint] = CheckIfBeamstopOut(fname, -5) //returns one if beamstop is "out"317 GIsTrans[lastPoint] = isTransFile(fname, -5) //returns one if beamstop is "out" 318 318 319 319 return(0) -
sans/SANSReduction/branches/kline_29MAR07/Put in User Procedures/SANS_Reduction_v5.00/NCNR_Utils.ipf
r70 r74 393 393 totalBytes = V_logEOF 394 394 //Print totalBytes 395 if(totalBytes!=33316)396 //can't possibly be a raw data file397 Close refnum398 return(0) //not a raw SANS file399 Endif400 395 FSetPos refNum,75 401 396 FReadLine/N=3 refNum,testStr 402 397 Close refNum 403 398 404 if( cmpstr(testStr,"RAW")==0)399 if(totalBytes == 33316 && cmpstr(testStr,"RAW")==0) 405 400 //true, is raw data file 406 401 Return(1) … … 410 405 Endif 411 406 End 407 408 409 410 //function to check the header of a raw data file (full path specified by fname) 411 //checks the field of the x-position of the beamstop during data collection 412 //if the x-position is more negative (farther to the left) than xTol(input) 413 //the the beamstop is "out" and the file is a transmission run and not a scattering run 414 //xtol typically set at -5 (cm) - trans runs have bs(x) at -10 to -15 cm 415 // function returns 1 if beamstop is out, 0 if beamstop is in 416 // 417 Function isTransFile(fName,xTol) 418 String fname 419 Variable xTol 420 421 Variable refnum,xpos 422 //pos = 369, read one real value 423 424 SetDataFolder root: 425 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 426 String strToExecute="" 427 // 1 R*4 value 428 strToExecute = GBLoadStr + "/S=368/U=1" + "\"" + fname + "\"" 429 Execute strToExecute 430 Wave w=$"root:tempGBWave0" 431 xPos = w[0] 432 KillWaves/Z w 433 //Print "xPos = ",xpos 434 435 if(xpos<=xTol) 436 //xpos is farther left (more negative) than xtol (currently -5 cm) 437 Return(1) 438 else 439 //some other file 440 Return(0) 441 Endif 442 End 443 412 444 413 445 //function to remove all spaces from names when searching for filenames -
sans/SANSReduction/branches/kline_29MAR07/Put in User Procedures/SANS_Reduction_v5.00/NSORT.ipf
r70 r74 1781 1781 // 0 if the file is a scattering file, 1 (truth) if the file is a transmission file 1782 1782 InsertPoints lastPoint,1,GIsTrans 1783 GIsTrans[lastPoint] = CheckIfBeamstopOut(fname, -5) //returns one if beamstop is "out"1783 GIsTrans[lastPoint] = isTransFile(fname, -5) //returns one if beamstop is "out" 1784 1784 1785 1785 KillWaves/Z w -
sans/SANSReduction/branches/kline_29MAR07/Put in User Procedures/SANS_Reduction_v5.00/Transmission.ipf
r70 r74 256 256 Variable lastPoint, beamstop, Whole 257 257 258 isTrans = CheckIfBeamstopOut(fname, xTol)258 isTrans = isTransFile(fname, xTol) 259 259 // decalre the correct set of waves 260 260 // S_Whole is only a place holder so the waves are of equal length … … 1655 1655 1656 1656 1657 //function to check the header of a raw data file (full path specified by fname)1658 //checks the field of the x-position of the beamstop during data collection1659 //if the x-position is more negatice (farther to the left) than xTol(input)1660 //the the beamstop is "out" and the file is a transmission run and not a scattering run1661 //xtol typically set at -5 (cm) - trans runs have bs(x) at -10 to -15 cm1662 // function returns 1 if beamstop is out, 0 if beamstop is in1663 //1664 Function CheckIfBeamstopOut(fName,xTol)1665 String fname1666 Variable xTol1667 1668 Variable refnum,xpos1669 //pos = 369, read one real value1670 1671 SetDataFolder root:1672 String GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q"1673 String strToExecute=""1674 // 1 R*4 value1675 strToExecute = GBLoadStr + "/S=368/U=1" + "\"" + fname + "\""1676 Execute strToExecute1677 Wave w=$"root:tempGBWave0"1678 xPos = w[0]1679 KillWaves/Z w1680 //Print "xPos = ",xpos1681 1682 if(xpos<=xTol)1683 //xpos is farther left (more negative) than xtol (currently -5 cm)1684 Return(1)1685 else1686 //some other file1687 Return(0)1688 Endif1689 End1690 1691 1657 //function to update the box coordinates of the file selected as the 1692 1658 //empty beam file - takes the file that is currently popped from the list … … 1713 1679 1714 1680 Variable refnum,x1,x2,y1,y2,err 1715 Open/R refnum as filename 1716 FSetPos refnum,478 1717 FBinRead/F=3/B=3 refnum, x1 1718 FBinRead/F=3/B=3 refnum, x2 1719 FBinRead/F=3/B=3 refnum, y1 1720 FBinRead/F=3/B=3 refnum, y2 1721 Close refnum 1722 1681 GetXYBoxFromFile(filename,x1,x2,y1,y2) 1682 1723 1683 //and update the global string 1724 1684 String msgStr=""
Note: See TracChangeset
for help on using the changeset viewer.