Commit ac4ffcf8 authored by Matt Cumber's avatar Matt Cumber
Browse files

Re #29025 Fixing docs

parent 5715921d
......@@ -44,6 +44,7 @@ protected:
createDeadTimeTable(const std::vector<detid_t> &detectorsLoaded,
const std::vector<double> &deadTimes) const;
// Create time zero table
DataObjects::TableWorkspace_sptr
createTimeZeroTable(const size_t numSpec,
const std::vector<double> &timeZeros) const;
......
......@@ -126,6 +126,7 @@ DataObjects::TableWorkspace_sptr LoadMuonStrategy::createDeadTimeTable(
/**
* Creates a timezero table for the loaded detectors
* @param numSpec :: Numer of spectra (number of rows in table)
* @param timeZeros :: Vector containing time zero values for each spectra
* @return TableWorkspace of time zeros
*/
......
......@@ -146,8 +146,8 @@ Output:
.. testcode:: ExTimeZeroLoading
# Load some spectra
ws, main_field_direction, time_zero, first_good_data, time_zero_list, dead_time_table, detector_grouping_table = \
LoadMuonNexusV2(Filename="EMU00102347.nxs_v2",SpectrumMin=5,SpectrumMax=10,DeadTimeTable="deadTimeTable")
ws, main_field_direction, time_zero, first_good_data, time_zero_list, dead_time_table, detector_grouping_table, time_zero_table = \
LoadMuonNexusV2(Filename="EMU00102347.nxs_v2",SpectrumMin=5,SpectrumMax=10,DeadTimeTable="deadTimeTable",TimeZeroTable="timeZeroTable")
print('Single time zero value is {:.2g}'.format(time_zero))
print("TimeZeroList values are:")
......
......@@ -175,17 +175,17 @@ Output:
.. testcode:: ExampleTimeZero
dataX = [0, 1, 2, 3, 4, 5] * 4
dataY = [100, 200, 300, 200, 100] * 4
input_workspace = CreateWorkspace(dataX, dataY, NSpec=4)
# Create a time zero table
time_zero_table = CreateEmptyTableWorkspace()
time_zero_table.addColumn("double", "time zero")
[time_zero_table.addRow([i+2]) for i in range(4)]
output_workspace = MuonPreProcess(InputWorkspace=input_workspace,
TimeZeroTable=time_zero_table)
print("X values are : {}".format(output_workspace[0].readX(0)))
dataY = [100, 200, 300, 200, 100] * 4
input_workspace = CreateWorkspace(dataX, dataY, NSpec=4)
# Create a time zero table
time_zero_table = CreateEmptyTableWorkspace()
time_zero_table.addColumn("double", "time zero")
[time_zero_table.addRow([i+2]) for i in range(4)]
output_workspace = MuonPreProcess(InputWorkspace=input_workspace,
TimeZeroTable=time_zero_table)
print("X values are : {}".format(output_workspace[0].readX(0)))
print("Y values are : {}".format(output_workspace[0].readY(0)))
Output:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment