Changeset 573 for sans/Dev/trunk
- Timestamp:
- Oct 16, 2009 2:24:50 PM (13 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/FACILITY_DataReadWrite.ipf
r572 r573 73 73 String fname 74 74 //this function is for reading in RAW data only, so it will always put data in RAW folder 75 String curPath = "root: RAW"75 String curPath = "root:Packages:NIST:RAW:" 76 76 SetDataFolder curPath //use the full path, so it will always work 77 Variable/G root: RAW:gIsLogScale = 0 //initial state is linear, keep this in RAW folder77 Variable/G root:Packages:NIST:RAW:gIsLogScale = 0 //initial state is linear, keep this in RAW folder 78 78 79 79 Variable refNum,integer,realval 80 80 String sansfname,textstr 81 81 82 Make/D/O/N=23 $"root:RAW:IntegersRead" 83 Make/D/O/N=52 $"root:RAW:RealsRead" 84 Make/O/T/N=11 $"root:RAW:TextRead" 85 86 Wave intw=$"root:RAW:IntegersRead" 87 Wave realw=$"root:RAW:RealsRead" 88 Wave/T textw=$"root:RAW:TextRead" 82 Make/O/D/N=23 $"root:Packages:NIST:RAW:IntegersRead" 83 Make/O/D/N=52 $"root:Packages:NIST:RAW:RealsRead" 84 Make/O/T/N=11 $"root:Packages:NIST:RAW:TextRead" 85 Make/O/N=7 $"root:Packages:NIST:RAW:LogicalsRead" 86 87 Wave intw=$"root:Packages:NIST:RAW:IntegersRead" 88 Wave realw=$"root:Packages:NIST:RAW:RealsRead" 89 Wave/T textw=$"root:Packages:NIST:RAW:TextRead" 90 Wave logw=$"root:Packages:NIST:RAW:LogicalsRead" 89 91 90 92 // FILL IN 3 ARRAYS WITH HEADER INFORMATION FOR LATER USE … … 196 198 //main entry procedure for reading a "WORK.DIV" file 197 199 //displays a quick image of the file, to check that it's correct 198 //data is deposited in root:DIV data folder 199 // 200 // local, just for testing 200 //data is deposited in root:Packages:NIST:DIV data folder 201 // 202 // local, currently unused 203 // 201 204 // 202 205 Proc ReadWork_DIV() … … 205 208 ReadHeaderAndWork("DIV",fname) //puts what is read in work.div 206 209 207 String waveStr = "root:DIV:data" 208 NewImage/F/K=1/S=2 $waveStr 209 ModifyImage '' ctab= {*,*,YellowHot,0} 210 211 String/G root:DIV:fileList = "WORK.DIV" 210 String waveStr = "root:Packages:NIST:DIV:data" 211 // NewImage/F/K=1/S=2 $waveStr //this is an experimental IGOR operation 212 // ModifyImage '' ctab= {*,*,YellowHot,0} 213 //Display;AppendImage $waveStr 214 215 //change the title string to WORK.DIV, rather than PLEXnnn_TST_asdfa garbage 216 // String/G root:Packages:NIST:DIV:fileList = "WORK.DIV" 217 ChangeDisplay("DIV") 212 218 213 219 SetDataFolder root: //(redundant) … … 237 243 238 244 String cur_folder = type 239 String curPath = "root: "+cur_folder245 String curPath = "root:Packages:NIST:"+cur_folder 240 246 SetDataFolder curPath //use the full path, so it will always work 241 247 … … 304 310 String fname, destPath 305 311 //this function is for reading in ASCII data so put data in user-specified folder 306 SetDataFolder "root: "+destPath312 SetDataFolder "root:Packages:NIST:"+destPath 307 313 308 314 NVAR pixelsX = root:myGlobals:gNPixelsX … … 369 375 Function FillFakeHeader_ASC(destFolder) 370 376 String destFolder 371 Make/O/ N=23 $("root:"+destFolder+":IntegersRead")372 Make/O/ N=52 $("root:"+destFolder+":RealsRead")373 Make/O/T/N=11 $("root: "+destFolder+":TextRead")374 375 Wave intw=$("root: "+destFolder+":IntegersRead")376 Wave realw=$("root: "+destFolder+":RealsRead")377 Wave/T textw=$("root: "+destFolder+":TextRead")377 Make/O/D/N=23 $("root:Packages:NIST:"+destFolder+":IntegersRead") 378 Make/O/D/N=52 $("root:Packages:NIST:"+destFolder+":RealsRead") 379 Make/O/T/N=11 $("root:Packages:NIST:"+destFolder+":TextRead") 380 381 Wave intw=$("root:Packages:NIST:"+destFolder+":IntegersRead") 382 Wave realw=$("root:Packages:NIST:"+destFolder+":RealsRead") 383 Wave/T textw=$("root:Packages:NIST:"+destFolder+":TextRead") 378 384 379 385 //Put in appropriate "fake" values 380 386 //parse values as needed from headerLines 381 Wave/T hdr=$("root: "+destFolder+":hdrLines")387 Wave/T hdr=$("root:Packages:NIST:"+destFolder+":hdrLines") 382 388 Variable monCt,lam,offset,sdd,trans,thick 383 389 Variable xCtr,yCtr,a1,a2,a1a2Dist,dlam,bsDiam … … 430 436 // Print tempStr 431 437 // Print junkStr 432 String/G $("root: "+destFolder+":fileList") = tempStr438 String/G $("root:Packages:NIST:"+destFolder+":fileList") = tempStr 433 439 textw[0] = tempStr //filename 434 440 textw[1] = junkStr //run date-time -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/FACILITY_Utils.ipf
r572 r573 92 92 v_lambda = lambdaWidth^2/6.0 93 93 94 if(usingLenses==1) //SRK 2007 94 // if(usingLenses==1) //SRK 2007 95 if(usingLenses != 0) //SRK 2008 allows for the possibility of different numbers of lenses in header 95 96 v_b = 0.25*(S1*L2/L1)^2 +0.25*(2/3)*(lambdaWidth/lambda)^2*(S2*L2/lp)^2 //correction to 2nd term 96 97 else … … 138 139 //Global values are set in the Initialize procedure 139 140 // 141 // 140 142 // - called by CircSectAvg.ipf, RectAnnulAvg.ipf, and ProtocolAsPanel.ipf 141 143 // 142 // fileStr is passed as TextRead[3] and is the filename 143 // detStr is passed as TextRead[9] and is an identifier for the detector 144 // fileStr is passed as TextRead[3] 145 // detStr is passed as TextRead[9] 146 // 147 // *** as of Jan 2008, depricated. Now detector pixel sizes are read from the file header 148 // rw[10] = x size (mm); rw[13] = y size (mm) 144 149 // 145 150 // depricated - pixel dimensions are read directly from the file header -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/ILL_DataReadWrite.ipf
r572 r573 73 73 String fname 74 74 //this function is for reading in RAW data only, so it will always put data in RAW folder 75 String curPath = "root: RAW"75 String curPath = "root:Packages:NIST:RAW:" 76 76 SetDataFolder curPath //use the full path, so it will always work 77 Variable/G root: RAW:gIsLogScale = 0 //initial state is linear, keep this in RAW folder77 Variable/G root:Packages:NIST:RAW:gIsLogScale = 0 //initial state is linear, keep this in RAW folder 78 78 79 79 Variable refNum,integer,realval,ii 80 80 String sansfname,textstr,v0 81 81 82 Make/D/O/N=23 $"root:RAW:IntegersRead" 83 Make/D/O/N=52 $"root:RAW:RealsRead" 84 Make/O/T/N=11 $"root:RAW:TextRead" 85 86 Wave intw=$"root:RAW:IntegersRead" 87 Wave realw=$"root:RAW:RealsRead" 88 Wave/T textw=$"root:RAW:TextRead" 82 Make/O/D/N=23 $"root:Packages:NIST:RAW:IntegersRead" 83 Make/O/D/N=52 $"root:Packages:NIST:RAW:RealsRead" 84 Make/O/T/N=11 $"root:Packages:NIST:RAW:TextRead" 85 Make/O/N=7 $"root:Packages:NIST:RAW:LogicalsRead" 86 87 Wave intw=$"root:Packages:NIST:RAW:IntegersRead" 88 Wave realw=$"root:Packages:NIST:RAW:RealsRead" 89 Wave/T textw=$"root:Packages:NIST:RAW:TextRead" 90 Wave logw=$"root:Packages:NIST:RAW:LogicalsRead" 89 91 90 92 // FILL IN 3 ARRAYS WITH HEADER INFORMATION FOR LATER USE … … 204 206 SetDataFolder curPath 205 207 206 Make/D/O/N=(XPix,YPix) $"root: RAW:data"207 WAVE data=$"root: RAW:data"208 Make/D/O/N=(XPix,YPix) $"root:Packages:NIST:RAW:data" 209 WAVE data=$"root:Packages:NIST:RAW:data" 208 210 209 211 // fill the data array with the detector values … … 214 216 215 217 //keep a string with the filename in the RAW folder 216 String/G root: RAW:fileList = textw[0]218 String/G root:Packages:NIST:RAW:fileList = textw[0] 217 219 218 220 Setdatafolder root: … … 235 237 ReadHeaderAndWork("DIV",fname) //puts what is read in work.div 236 238 237 String waveStr = "root: DIV:data"239 String waveStr = "root:Packages:NIST:DIV:data" 238 240 NewImage/F/K=1/S=2 $waveStr 239 241 ModifyImage '' ctab= {*,*,YellowHot,0} 240 242 241 String/G root: DIV:fileList = "WORK.DIV"243 String/G root:Packages:NIST:DIV:fileList = "WORK.DIV" 242 244 243 245 SetDataFolder root: //(redundant) … … 267 269 268 270 String cur_folder = type 269 String curPath = "root: "+cur_folder271 String curPath = "root:Packages:NIST:"+cur_folder 270 272 SetDataFolder curPath //use the full path, so it will always work 271 273 … … 299 301 // fill in your reader for the header here so that intw, realw, and textW are filled in 300 302 // ? possibly a duplication of the raw data reader 301 Duplicate/O $("root: raw:realsread"),$("curPath"+ ":realsread")302 Duplicate/O $("root: raw:integersread"),$("curPath"+ ":integersread")303 Duplicate/T $("root: raw:Textread"),$("curPath"+ ":Textread")303 Duplicate/O $("root:Packages:NIST:raw:realsread"),$(curPath+ ":realsread") 304 Duplicate/O $("root:Packages:NIST:raw:integersread"),$(curPath+ ":integersread") 305 Duplicate/T $("root:Packages:NIST:raw:Textread"),$(curPath+ ":Textread") 304 306 305 307 … … 309 311 // fill the data array with the detector values 310 312 311 duplicate/O $("root: raw:data"),$("curPath"+ ":data")313 duplicate/O $("root:Packages:NIST:raw:data"),$(curPath+ ":data") 312 314 313 315 … … 332 334 // SVAR cur_folder=root:myGlobals:gDataDisplayType 333 335 String cur_folder = type 334 String curPath = "root: "+cur_folder336 String curPath = "root:Packages:NIST:"+cur_folder 335 337 SetDataFolder curPath //use the full path, so it will always work 336 338 … … 586 588 GBLoadStr="GBLoadWave/O/N=tempGBwave/T={2,2}/J=2/W=1/Q" 587 589 588 curPath = "root: "+cur_folder590 curPath = "root:Packages:NIST:"+cur_folder 589 591 SetDataFolder curPath //use the full path, so it will always work 590 592 … … 694 696 String fname, destPath 695 697 //this function is for reading in ASCII data so put data in user-specified folder 696 SetDataFolder "root: "+destPath698 SetDataFolder "root:Packages:NIST:"+destPath 697 699 698 700 NVAR pixelsX = root:myGlobals:gNPixelsX … … 763 765 Function FillFakeHeader_ASC(destFolder) 764 766 String destFolder 765 Make/O/ N=23 $("root:"+destFolder+":IntegersRead")766 Make/O/ N=52 $("root:"+destFolder+":RealsRead")767 Make/O/T/N=11 $("root: "+destFolder+":TextRead")768 769 Wave intw=$("root: "+destFolder+":IntegersRead")770 Wave realw=$("root: "+destFolder+":RealsRead")771 Wave/T textw=$("root: "+destFolder+":TextRead")767 Make/O/D/N=23 $("root:Packages:NIST:"+destFolder+":IntegersRead") 768 Make/O/D/N=52 $("root:Packages:NIST:"+destFolder+":RealsRead") 769 Make/O/T/N=11 $("root:Packages:NIST:"+destFolder+":TextRead") 770 771 Wave intw=$("root:Packages:NIST:"+destFolder+":IntegersRead") 772 Wave realw=$("root:Packages:NIST:"+destFolder+":RealsRead") 773 Wave/T textw=$("root:Packages:NIST:"+destFolder+":TextRead") 772 774 773 775 //Put in appropriate "fake" values 774 776 //parse values as needed from headerLines 775 Wave/T hdr=$("root: "+destFolder+":hdrLines")777 Wave/T hdr=$("root:Packages:NIST:"+destFolder+":hdrLines") 776 778 Variable monCt,lam,offset,sdd,trans,thick 777 779 Variable xCtr,yCtr,a1,a2,a1a2Dist,dlam,bsDiam … … 824 826 // Print tempStr 825 827 // Print junkStr 826 String/G $("root: "+destFolder+":fileList") = tempStr828 String/G $("root:Packages:NIST:"+destFolder+":fileList") = tempStr 827 829 textw[0] = tempStr //filename 828 830 textw[1] = junkStr //run date-time -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/ILL_Utils.ipf
r572 r573 32 32 33 33 Variable/G root:myGlobals:apOff = 5.0 // (cm) distance from sample aperture to sample position 34 35 // changing behavior specific to ILL correction of data 36 Variable/G root:myGlobals:gDoDetectorEffCorr = 0 //default state is ==1 37 Variable/G root:myGlobals:gDoDetectorEffCorrILL = 1 //new global switch 38 34 39 35 40 End … … 94 99 v_lambda = lambdaWidth^2/6.0 95 100 96 if(usingLenses==1) //SRK 2007 101 // if(usingLenses==1) //SRK 2007 102 if(usingLenses != 0) //SRK 2008 allows for the possibility of different numbers of lenses in header 97 103 v_b = 0.25*(S1*L2/L1)^2 +0.25*(2/3)*(lambdaWidth/lambda)^2*(S2*L2/lp)^2 //correction to 2nd term 98 104 else … … 142 148 // - called by CircSectAvg.ipf, RectAnnulAvg.ipf, and ProtocolAsPanel.ipf 143 149 // 144 // fileStr is passed as TextRead[3] and is the filename 145 // detStr is passed as TextRead[9] and is an identifier for the detector 150 // fileStr is passed as TextRead[3] 151 // detStr is passed as TextRead[9] 152 // 153 // *** as of Jan 2008, depricated. Now detector pixel sizes are read from the file header 154 // rw[10] = x size (mm); rw[13] = y size (mm) 146 155 // 147 156 // depricated - pixel dimensions are read directly from the file header … … 963 972 return("Function Empty") 964 973 End 965 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/Includes_v520_ILL.ipf
r572 r573 18 18 #include "DisplayUtils" version>=5.0 19 19 #include "FIT_Ops" version>=5.0 20 #include "Initialize ILL" version>=5.020 #include "Initialize" version>=5.0 21 21 #include "MainPanel" version>=5.0 22 22 #include "Marquee" version>=5.0 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/NCNR_DataReadWrite.ipf
r572 r573 85 85 String sansfname,textstr 86 86 87 Make/O/ N=23 $"root:Packages:NIST:RAW:IntegersRead"88 Make/O/ N=52 $"root:Packages:NIST:RAW:RealsRead"87 Make/O/D/N=23 $"root:Packages:NIST:RAW:IntegersRead" 88 Make/O/D/N=52 $"root:Packages:NIST:RAW:RealsRead" 89 89 Make/O/T/N=11 $"root:Packages:NIST:RAW:TextRead" 90 90 Make/O/N=7 $"root:Packages:NIST:RAW:LogicalsRead" … … 361 361 SetDataFolder curPath //use the full path, so it will always work 362 362 363 Make/O/ N=16384 $"root:Packages:NIST:RAW:data"363 Make/O/D/N=16384 $"root:Packages:NIST:RAW:data" 364 364 WAVE data=$"root:Packages:NIST:RAW:data" 365 365 SkipAndDecompressVAX(w,data) … … 509 509 Variable/G $(curPath + ":gIsLogScale") = 0 //initial state is linear, keep this in DIV folder 510 510 511 Make/O/ N=23 $(curPath + ":IntegersRead")512 Make/O/ N=52 $(curPath + ":RealsRead")511 Make/O/D/N=23 $(curPath + ":IntegersRead") 512 Make/O/D/N=52 $(curPath + ":RealsRead") 513 513 Make/O/T/N=11 $(curPath + ":TextRead") 514 514 … … 759 759 SetDataFolder curPath //use the full path, so it will always work 760 760 761 Make/O/ N=16384 $(curPath + ":data")761 Make/O/D/N=16384 $(curPath + ":data") 762 762 WAVE data = $(curPath + ":data") 763 763 … … 918 918 Function FillFakeHeader_ASC(destFolder) 919 919 String destFolder 920 Make/O/ N=23 $("root:Packages:NIST:"+destFolder+":IntegersRead")921 Make/O/ N=52 $("root:Packages:NIST:"+destFolder+":RealsRead")920 Make/O/D/N=23 $("root:Packages:NIST:"+destFolder+":IntegersRead") 921 Make/O/D/N=52 $("root:Packages:NIST:"+destFolder+":RealsRead") 922 922 Make/O/T/N=11 $("root:Packages:NIST:"+destFolder+":TextRead") 923 923 -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/PatchFiles.ipf
r570 r573 325 325 Variable ok 326 326 ControlInfo/W=Patch_Panel PatchPopup 327 If(strlen(S_value)==0 )327 If(strlen(S_value)==0 || cmpstr(S_Value,"none")==0) 328 328 //null selection 329 329 Abort "no file selected in popup menu"
Note: See TracChangeset
for help on using the changeset viewer.