From: <ro...@us...> - 2012-06-14 09:38:29
|
Revision: 2728 http://nscldaq.svn.sourceforge.net/nscldaq/?rev=2728&view=rev Author: ron-fox Date: 2012-06-14 09:38:17 +0000 (Thu, 14 Jun 2012) Log Message: ----------- missing commit Modified Paths: -------------- branches/missouri-ccusb/gui/spectrumMaker.tcl Modified: branches/missouri-ccusb/gui/spectrumMaker.tcl =================================================================== --- branches/missouri-ccusb/gui/spectrumMaker.tcl 2012-06-13 19:56:57 UTC (rev 2727) +++ branches/missouri-ccusb/gui/spectrumMaker.tcl 2012-06-14 09:38:17 UTC (rev 2728) @@ -277,11 +277,15 @@ proc createSpectra {} { global sumsPerStep global samplesPerStep + global rawData + set rawData [list] + # normalize... for {set i 0} {$i < 1024} {incr i} { if {$samplesPerStep($i) != 0} { + lappend rawData "$samplesPerStep($i) $sumsPerStep($i)" set normalized [list] foreach sum $sumsPerStep($i) { set normal [expr {100.0*double($sum)/double($samplesPerStep($i))}]; # counts/sec. @@ -311,6 +315,7 @@ global sumsPerStep global samplesPerStep global Filename + global rawData puts "Creating spectra" if {[catch createSpectra msg]} { @@ -326,8 +331,16 @@ puts "Writing output file: $Filename" + # Write the raw data to $Filename.raw + set fd [open $Filename.raw w] + foreach item $rawData { + puts $fd [csv::join $item] + } + close $fd + # Write the cooked data... + set fd [open $Filename w] for {set i 0} {$i < 1023} {incr i} { puts $fd [csv::join $sumsPerStep($i)] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |