Changeset 769
- Timestamp:
- Nov 30, 2010 2:48:30 PM (12 years ago)
- Location:
- sans/Dev/trunk/NCNR_User_Procedures
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Analysis/Packages/GeneticOptimization/NCNR_GenFitUtils.ipf
r764 r769 185 185 WAVE/Z bar.ffsWaves[0] = fs.resW //will not exist for 3-column data sets 186 186 187 187 // FuncFit can accept a null HoldStr, this cannot. 188 if(strlen(holdStr)==0) 189 Variable nc=numpnts(bar.w),ii 190 for(ii=0;ii<nc;ii+=1) 191 holdStr += "0" 192 endfor 193 print holdStr 194 endif 195 188 196 //need to parse limits, or make up some defaults 189 197 // limits is (n,2) -
sans/Dev/trunk/NCNR_User_Procedures/Common/Installer/CheckVersionFTP.ipf
r661 r769 18 18 fileNameStr += "CurrentVersion.txt" 19 19 20 FTPDownload/O/Z url, fileNameStr20 FTPDownload/O/Z/V=7/T=1 url, fileNameStr 21 21 22 22 Open/R refNum as fileNameStr -
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/ILL_DataReadWrite.ipf
r764 r769 248 248 249 249 250 251 /////////DIV file created with NIST reduction so has the VAX format.... painful 252 // 250 253 // Detector sensitivity files have the same header structure as RAW SANS data 251 254 // as NCNR, just with a different data array (real, rather than integer data) … … 261 264 // 262 265 // type is "DIV" on input 263 Function ReadHeaderAndWork1(type,fname)264 String type,fname265 266 //type is the desired folder to read the workfile to267 //this data will NOT be automatically displayed268 // gDataDisplayType is unchanged269 270 String cur_folder = type271 String curPath = "root:Packages:NIST:"+cur_folder272 SetDataFolder curPath //use the full path, so it will always work273 274 Variable refNum,integer,realval275 String sansfname,textstr276 Variable/G $(curPath + ":gIsLogScale") = 0 //initial state is linear, keep this in DIV folder277 278 Make/O/D/N=23 $(curPath + ":IntegersRead")279 Make/O/D/N=52 $(curPath + ":RealsRead")280 Make/O/T/N=11 $(curPath + ":TextRead")281 282 WAVE intw=$(curPath + ":IntegersRead")283 WAVE realw=$(curPath + ":RealsRead")284 WAVE/T textw=$(curPath + ":TextRead")285 286 // the actual data array, dimensions are set as globals in287 // InitFacilityGlobals()288 NVAR XPix = root:myGlobals:gNPixelsX289 NVAR YPix = root:myGlobals:gNPixelsX290 291 292 293 Make/O/D/N=(XPix,YPix) $(curPath + ":data")294 WAVE data = $(curPath + ":data")295 296 297 // print "function used"298 299 300 301 302 303 //loadwave /H "fname"304 305 //Duplicate/O $"fname", datates306 307 308 309 // (1)310 // fill in your reader for the header here so that intw, realw, and textW are filled in311 // ? possibly a duplication of the raw data reader312 Duplicate/O $("root:Packages:NIST:raw:realsread"),$(curPath+ ":realsread")313 Duplicate/O $("root:Packages:NIST:raw:integersread"),$(curPath+ ":integersread")314 Duplicate/T $("root:Packages:NIST:raw:Textread"),$(curPath+ ":Textread")315 316 317 //(2)318 // then fill in a reader for the data array that will DIVIDE your data319 // to get the corrected values.320 // fill the data array with the detector values321 322 duplicate/O $("root:Packages:NIST:raw:data"),$(curPath+ ":data")323 324 325 //keep a string with the filename in the DIV folder326 String/G $(curPath + ":fileList") = textw[0]327 328 //return the data folder to root329 SetDataFolder root:330 331 Return(0)332 End333 334 335 /////////DIV file created with NIST reduction so has the VAX format.... painful336 337 338 339 // Detector sensitivity files have the same header structure as RAW SANS data340 // as NCNR, just with a different data array (real, rather than integer data)341 //342 // So for your facility, make this reader specific to the format of whatever343 // file you use for a pixel-by-pixel division of the raw detector data344 // to correct for non-uniform sensitivities of the detector. This is typically a345 // measurement of water, plexiglas, or another uniform scattering sample.346 //347 // The data must be normalized to a mean value of 1348 //349 // called from ProtocolAsPanel.ipf350 //351 // type is "DIV" on input352 266 Function ReadHeaderAndWork(type,fname) 353 267 String type,fname … … 378 292 NVAR YPix = root:myGlobals:gNPixelsX 379 293 380 381 294 Make/O/D/N=(XPix,YPix) $(curPath + ":data") 382 295 WAVE data = $(curPath + ":data") … … 385 298 WAVE linear_data = $(curPath + ":linear_data") 386 299 387 388 // print "function used" 389 390 391 // (1) 300 // (1) 392 301 // fill in your reader for the header here so that intw, realw, and textW are filled in 393 // ? possibly a duplication of the raw data reader 394 Duplicate/O $("root:Packages:NIST:raw:realsread"),$(curPath+ ":realsread") 395 Duplicate/O $("root:Packages:NIST:raw:integersread"),$(curPath+ ":integersread") 396 Duplicate/T $("root:Packages:NIST:raw:Textread"),$(curPath+ ":Textread") 397 302 // -- these are not really needed at all, so skip them for now 303 // a simple duplication of some other data may be sufficient 304 if(exists("root:Packages:NIST:raw:realsread") == 1) 305 Duplicate/O $("root:Packages:NIST:raw:realsread"),$(curPath+ ":realsread") 306 Duplicate/O $("root:Packages:NIST:raw:integersread"),$(curPath+ ":integersread") 307 Duplicate/O/T $("root:Packages:NIST:raw:Textread"),$(curPath+ ":Textread") 308 endif 398 309 399 310 //(2) 400 311 // then fill in a reader for the data array that will DIVIDE your data 401 312 // to get the corrected values. 402 // fill the data array with the detector values403 313 404 314 //here you load in your file, you're already in the DIV folder 405 // LoadWave/H/O "Macintosh HD:Users:srkline:Desktop:linear_data.ibw" 406 LoadWave/H/O fname //since fname is the full path 407 408 ConvertFolderToLogScale(type) 409 315 LoadWave/O fname //since fname is the full path 316 410 317 String loadedStr = StringFromList(0,S_waveNames,";") //then name of the wave loaded 411 318 412 //then copy the loaded wave to data and to linear data, in the DIV folder 413 duplicate/O $("loadedStr"),$(curPath+ ":data") 414 duplicate/O $("loadedStr"),$(curPath+ ":linear_data") 415 319 // if data loaded in is already named "data", don't bother with this step 320 if(exists("data") == 0) 321 duplicate/O $loadedStr,$(curPath+ ":data") 322 endif 323 // if data loaded in is already named "linear_data", don't bother with this step 324 if(exists("linear_data") == 0) 325 duplicate/O $loadedStr,$(curPath+ ":linear_data") 326 endif 416 327 417 328 //keep a string with the filename in the DIV folder … … 423 334 Return(0) 424 335 End 425 426 427 428 336 429 337
Note: See TracChangeset
for help on using the changeset viewer.