Ticket #11268 (assigned)
Output transmission workspace as pointworkspace
Reported by: | Anders Markvardsen | Owned by: | Peter Parker |
---|---|---|---|
Priority: | major | Milestone: | Release 3.5 |
Component: | SANS | Keywords: | |
Cc: | richard.heenan@… | Blocked By: | |
Blocking: | Tester: |
Description
At the moment transmission workspace is returned as histogram workspace. With the new devide by bin-width default this courses confusion.
Change this so transmission workspace is outputted as pointworkspace.
Richard suggests the following code change to fix this:
See, isis_reduction_steps.py, around line 1420, where return fittedtransws as pointworkspace (using ConvertToPointData):
{
CalculateTransmission(SampleRunWorkspace=trans_tmp_out, DirectRunWorkspace=direct_tmp_out,
OutputWorkspace=fittedtransws, IncidentBeamMonitor=pre_sample, TransmissionMonitor=post_sample, RebinParams=reducer.to_wavelen.get_rebin(), OutputUnfittedData=True, options) # options FitMethod, PolynomialOrder if present
# Remove temporaries files2delete = [trans_tmp_out]
if direct_tmp_out != trans_tmp_out:
files2delete.append(direct_tmp_out)
if sel_settings[FITMETHOD] in ['OFF', 'CLEAR']:
result = unfittedtransws files2delete.append(fittedtransws)
else:
result = fittedtransws *
reducer.deleteWorkspaces(files2delete)
return result
}
For reference python code to check if histogram or pointworkspace:
{ histogram = CreateSampleWorkspace() print "Histogram: ",histogram.isDistribution() print "Distribution: ", histogram.isHistogramData()
ConvertToDistribution(histogram) print "Histogram: ",histogram.isDistribution() print "Distribution: ", histogram.isHistogramData()
point = ConvertToPointData(InputWorkspace=histogram) print "Histogram: ",point.isDistribution() print "Distribution: ", point.isHistogramData() }