Skip to content

Commit

Permalink
Code works up to (not included) normalization...currently working on …
Browse files Browse the repository at this point in the history
…it. This refs #4303
  • Loading branch information
JeanBilheux committed Jan 13, 2012
1 parent 233e090 commit e50dfe8
Showing 1 changed file with 24 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
from pylab import *
import wks_utility

#This will activate or not the various 2d or 1d plots
bPlot = True
bDataBack = True
bNorm = True
bNormBack = True

#flags
bPlot = True #display the plots
bDataBack = True #with data background
bNorm = True #with normalization
bNormBack = True #with normalization background

h = 6.626e-34 #m^2 kg s^-1
m = 1.675e-27 #kg
Expand All @@ -24,7 +23,6 @@
#over which we add all the pixels along the low resolution
Xrange = [115, 210]


nexus_path = '/mnt/hgfs/j35/results/'
list_data = ['66421',
'66420',
Expand Down Expand Up @@ -249,8 +247,25 @@
Transpose(InputWorkspace='TransposedFlatID',
OutputWorkspace='NormWks')

#collapse data to 1 spectrum (peak region)
Integration('NormWks','IntegratedNormWks',)
# #collapse data to 1 spectrum (peak region)
# Integration('NormWks',
# 'IntegratedNormWks',
# StartWorkspaceIndex=list_norm_peak[0][0],
# EndWorkspaceIndex=list_norm_peak[0][1])

#perform the integration myself
mt_temp = mtd['NormWks']
x_axis = mt_temp.readX(0)[:] #[9100,9300,.... 23500] (73,1)
from_peak = list_norm_peak[0][0]
to_peak = list_norm_peak[0][1]
NormPeakRange = arange(to_peak-from_peak+1) + from_peak
counts_vs_tof = zeros(len(x_axis))
for x in NormPeakRange:
#counts_vs_tof += mt_temp.readY(x)[:]
print mt_temp.readY(int(x))[:]
print counts_vs_tof
sys.exit("stop here")
# raise SystemExit(0)

# mt_NormWks = mtd['NormWks']
# _tof_axis = mt_NormWks.readX(0)[:]
Expand All @@ -270,12 +285,6 @@

mt4 = mtd['NormalizedWks']

#display 2d plot at this point to see if we have data





else:

mt4 = mtd['DataWks']
Expand Down

0 comments on commit e50dfe8

Please sign in to comment.