- Timestamp:
- Apr 4, 2011 12:18:33 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sans/Dev/trunk/NCNR_User_Procedures/Reduction/SANS/HFIR_DataReadWrite.ipf
r776 r795 207 207 208 208 WAVE data=$"root:Packages:NIST:RAW:data" 209 Duplicate/O data $"root:Packages:NIST:RAW:linear_data" // data is "fresh" and linear scale, so copy it now 210 209 Duplicate/O data linear_data // data is "fresh" and linear scale, so copy it now 210 211 // proper error for counting statistics, good for low count values too 212 // rather than just sqrt(n) 213 // see N. Gehrels, Astrophys. J., 303 (1986) 336-346, equation (7) 214 // for S = 1 in eq (7), this corresponds to one sigma error bars 215 Duplicate/O linear_data linear_data_error 216 linear_data_error = 1 + sqrt(linear_data + 0.75) 217 // 211 218 212 219 SetDataFolder root: … … 369 376 data=temp0 370 377 Redimension/N=(pixelsX,pixelsY) data //,linear_data 371 378 379 Duplicate/O data linear_data_error 380 linear_data_error = 1 + sqrt(data + 0.75) 381 382 //just in case there are odd inputs to this, like negative intensities 383 WaveStats/Q linear_data_error 384 linear_data_error = numtype(linear_data_error[p]) == 0 ? linear_data_error[p] : V_avg 385 linear_data_error = linear_data_error[p] != 0 ? linear_data_error[p] : V_avg 386 372 387 //linear_data = data 373 388 … … 465 480 // read specific bits of information from the header 466 481 // each of these operations MUST take care of open/close on their own 482 483 // new, April 2011 for error propagation. fill these in with the facility- 484 // specific versions, if desired. 485 Function WriteTransmissionErrorToHeader(fname,transErr) 486 String fname 487 Variable transErr 488 489 490 return(0) 491 End 492 493 Function WriteBoxCountsErrorToHeader(fname,rel_err) 494 String fname 495 Variable rel_err 496 497 return(0) 498 End 499 500 Function getSampleTransError(fname) 501 String fname 502 503 return(0) 504 end 505 506 Function getBoxCountsError(fname) 507 String fname 508 509 return(0) 510 end 511 512 513 // end April 2011 additions 514 467 515 468 516 Function/S getStringFromHeader(fname,wantedterm)
Note: See TracChangeset
for help on using the changeset viewer.