- 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/ANSTO_DataReadWrite.ipf
r776 r795 202 202 String/G root:Packages:NIST:RAW:fileList = textw[0] 203 203 204 Duplicate/O data $"root:Packages:NIST:RAW:linear_data" //data read in is on linear scale, copy it now 205 204 Duplicate/O data linear_data //data read in is on linear scale, copy it now 205 206 // proper error for counting statistics, good for low count values too 207 // rather than just sqrt(n) 208 // see N. Gehrels, Astrophys. J., 303 (1986) 336-346, equation (7) 209 // for S = 1 in eq (7), this corresponds to one sigma error bars 210 Duplicate/O linear_data linear_data_error 211 linear_data_error = 1 + sqrt(linear_data + 0.75) 212 // 213 206 214 Return 0 207 215 … … 409 417 data=temp0 410 418 Redimension/N=(pixelsX,pixelsY) data //,linear_data 419 420 Duplicate/O data linear_data_error 421 linear_data_error = 1 + sqrt(data + 0.75) 422 423 //just in case there are odd inputs to this, like negative intensities 424 WaveStats/Q linear_data_error 425 linear_data_error = numtype(linear_data_error[p]) == 0 ? linear_data_error[p] : V_avg 426 linear_data_error = linear_data_error[p] != 0 ? linear_data_error[p] : V_avg 411 427 412 428 //linear_data = data … … 517 533 // (3) close the file 518 534 519 535 // new, April 2011 for error propagation. fill these in with the facility- 536 // specific versions, if desired. 537 Function WriteTransmissionErrorToHeader(fname,transErr) 538 String fname 539 Variable transErr 540 541 542 return(0) 543 End 544 545 Function WriteBoxCountsErrorToHeader(fname,rel_err) 546 String fname 547 Variable rel_err 548 549 return(0) 550 End 551 552 Function getSampleTransError(fname) 553 String fname 554 555 return(0) 556 end 557 558 Function getBoxCountsError(fname) 559 String fname 560 561 return(0) 562 end 563 564 565 // end April 2011 additions 520 566 521 567 //whole transmission is NCNR-specific right now
Note: See TracChangeset
for help on using the changeset viewer.