EventWorkspace#

This is a Python binding to the C++ class Mantid::DataObjects::EventWorkspace

bases: mantid.api.IEventWorkspace

What is it for?#

Event Workspaces are specialised for time-of-flight neutron scattering. Event Workspaces are designed for sparse data storage of neutron events. Individual detector observations, including information about when that observation was made are stored as discrete items inside the workspace. The ability to keep more detailed information gives a number of advantages over converting directly to a compressed form, such as allowing more powerful filtering operations to be used.

Summary for Users#

The Event Workspace is a type of MatrixWorkspace, where the information about each individual neutron detection event is maintained. For you as a user, this means that:

  • There are many options for filtering an Event Workspace, such as FilterByLogValue

  • You can histogram (via rebin) an Event Workspace over and over and no information is ever lost (as long as you choose the PreserveEvents option).

  • You can convert an Event Workspace to a histogram Workspace 2D by using the Rebin algorithm.

  • You cannot modify the histogram Y values (for example, with the Divide algorithm) and keep the event data. If you use an algorithm that modifies the Y values, the output workspace will be a Workspace 2D using the current binning parameters.

  • Some algorithms are Event Workspace-aware, meaning that the output of it can be another Event Workspace. For example, the Plus algorithm will append the event lists if given two input Event Workspaces.

Note

If you set the same name on the output as the input of your algorithm, then you will overwrite the Event Workspace and lose that event-based information.

Working with Event Workspaces in Python#

The python options for an Event Workspace are limited - it is designed to be able to be read (but not written to) like a MatrixWorkspace.

Accessing Workspaces#

The methods for getting a variable to an Event Workspace is the same as shown in the Workspace help page.

If you want to check if a variable points to something that is an Event Workspace you can use this:

from mantid.simpleapi import *
from mantid.api import IEventWorkspace

eventWS = CreateSampleWorkspace(WorkspaceType="Event")

if isinstance(eventWS, IEventWorkspace):
    print(eventWS.name() + " is an " + eventWS.id())

Output:

eventWS is an EventWorkspace

Event Workspace Properties#

In addition to the Properties of the MatrixWorkspace, the Event Workspace also has the following:

from mantid.simpleapi import *
eventWS = CreateSampleWorkspace(WorkspaceType="Event")

print("Number of events: {}".format(eventWS.getNumberEvents()))
print("Maximum time of flight: {}".format(eventWS.getTofMax()))

Event lists#

Event Workspaces store their data in event lists, one per spectrum. You can access them using:

from mantid.simpleapi import *
eventWS = CreateSampleWorkspace(WorkspaceType="Event")

# get the number of event lists
evListCount = eventWS.getNumberHistograms()

# Get the first event list
evList = eventWS.getSpectrum(0)

# Get some basic information
print("Number of events in event List 0: {}".format(evList.getNumberEvents()))
print("Minimum time of flight in event List 0: {}".format(evList.getTofMax()))
print("Maximum time of flight in event List 0: {}".format(evList.getTofMax()))
print("Memory used: {}".format(evList.getMemorySize()))
print("Type of Events: {}".format(evList.getEventType()))

# Get a vector of the pulse times of the events
pulseTimes = evList.getPulseTimes()

# Get a vector of the TOFs of the events
tofs = evList.getTofs()

# Get a vector of the weights of the events
weights = evList.getWeights()

# Get a vector of the errors squared of the weights of the events
weightErrors = evList.getWeightErrors()

# Integrate the events between  a range of X values
print("Events between 1000 and 5000: {}".format(evList.integrate(1000,5000,False)))

#Check if the list is sorted in TOF
print("Is sorted by TOF: {}".format(evList.isSortedByTof()))

Changing EventLists#

Please note these should only be done as part of a Python Algorithm, otherwise these actions will not be recorded in the workspace history.

from mantid.simpleapi import *
import math
eventWS = CreateSampleWorkspace(WorkspaceType="Event")
# Get the first event list
evList = eventWS.getSpectrum(0)

# Add an offset to the pulsetime (wall-clock time) of each event in the list.
print("First pulse time before addPulsetime: {}".format(evList.getPulseTimes()[0]))
seconds = 200.0
evList.addPulsetime(seconds)
print("First pulse time after addPulsetime: {}".format(evList.getPulseTimes()[0]))

# Add an offset to the TOF of each event in the list.
print("First tof before addTof: {}".format(evList.getTofs()[0]))
microseconds = 2.7
evList.addTof(microseconds)
print("First tof after addTof: {}".format(evList.getTofs()[0]))

# Convert the tof units by scaling by a multiplier.
print("First tof before scaleTof: {}".format(evList.getTofs()[0]))
factor = 1.5
evList.scaleTof(factor)
print("First tof after scaleTof: {}".format(evList.getTofs()[0]))

# Multiply the weights in this event list by a scalar with an error.
print("First event weight before multiply: {0} +/- {1}".format(evList.getWeights()[0], math.sqrt(evList.getWeightErrors()[0])))
factor = 10.0
error = 5.0
evList.multiply(factor,error)
print("First event weight after multiply: {0} +/- {1}".format(evList.getWeights()[0], math.sqrt(evList.getWeightErrors()[0])))

# Divide the weights in this event list by a scalar with an error.
print("First event weight before divide: {0} +/- {1}".format(evList.getWeights()[0], math.sqrt(evList.getWeightErrors()[0])))
factor = 1.5
error = 0.0
evList.divide(factor,error)
print("First event weight after divide: {0} +/- {1}".format(evList.getWeights()[0], math.sqrt(evList.getWeightErrors()[0])))

# Mask out events that have a tof between tofMin and tofMax (inclusively)
print("Number of events before masking: {}".format(evList.getNumberEvents()))
evList.maskTof(1000,5000)
print("Number of events after masking: {}".format(evList.getNumberEvents()))

For Developers/Writing Algorithms#

See the Event Workspace section in development documentation.

Reference#

class mantid.dataobjects.EventWorkspace#
YUnit((MatrixWorkspace)self) str :#

Returns the current Y unit for the data (Y axis) in the workspace

YUnitLabel((MatrixWorkspace)self[, (bool)useLatex[, (bool)plotAsDistribution]]) str :#

Returns the caption for the Y axis

applyBinEdgesFromAnotherWorkspace((MatrixWorkspace)self, (MatrixWorkspace)ws, (int)getIndex, (int)setIndex) None :#

Sets the bin edges at setIndex to be the bin edges of ws at getIndex.

applyPointsFromAnotherWorkspace((MatrixWorkspace)self, (MatrixWorkspace)ws, (int)getIndex, (int)setIndex) None :#

Sets the points at setIndex to be the points of ws at getIndex.

axes((MatrixWorkspace)self) int :#

Returns the number of axes attached to the workspace

binIndexOf((MatrixWorkspace)self, (float)xvalue[, (int)workspaceIndex]) int :#

Returns the index of the bin containing the given xvalue (deprecated, use yIndexOfX instead)

blocksize((MatrixWorkspace)self) int :#

Returns size of the Y data array

clearMRU((IEventWorkspace)self) None :#

Clear the most-recently-used lists

clearMonitorWorkspace((MatrixWorkspace)self) None :#

Forget about monitor workspace, attached to the current workspace

clearOriginalWorkspaces((MDGeometry)self) None :#

Clear any attached original workspaces

clone(InputWorkspace)#

Copies an existing workspace into a new one.

Property descriptions:

InputWorkspace(Input:req) Workspace Name of the input workspace. Must be a MatrixWorkspace (2D or EventWorkspace), a PeaksWorkspace or a MDEventWorkspace.

OutputWorkspace(Output:req) Workspace Name of the newly created cloned workspace.

componentInfo((ExperimentInfo)self) mantid.geometry._geometry.ComponentInfo :#

Return a const reference to the ComponentInfo object.

convertUnits(InputWorkspace, Target, EMode=None, EFixed=None, AlignBins=None, ConvertFromPointData=None)#

Performs a unit change on the X values of a workspace

Property descriptions:

InputWorkspace(Input:req) MatrixWorkspace Name of the input workspace

OutputWorkspace(Output:req) MatrixWorkspace Name of the output workspace, can be the same as the input

Target(Input:req) string The name of the units to convert to (must be one of those registered in the Unit Factory)[DeltaE, DeltaE_inFrequency, DeltaE_inWavenumber, dSpacing, dSpacingPerpendicular, Energy, Energy_inWavenumber, Momentum, MomentumTransfer, QSquared, SpinEchoLength, SpinEchoTime, TOF, Wavelength]

EMode(Input) string The energy mode (default: elastic)[Elastic, Direct, Indirect]

EFixed(Input) number Value of fixed energy in meV : EI (EMode=’Direct’) or EF (EMode=’Indirect’) . Must be set if the target unit requires it (e.g. DeltaE)

AlignBins(Input) boolean If true (default is false), rebins after conversion to ensure that all spectra in the output workspace have identical bin boundaries. This option is not recommended (see http://docs.mantidproject.org/algorithms/ConvertUnits).

ConvertFromPointData(Input) boolean When checked, if the Input Workspace contains Points the algorithm ConvertToHistogram will be run to convert the Points to Bins. The Output Workspace will contains Bins.

dataDx((MatrixWorkspace)self, (int)workspaceIndex) numpy.ndarray :#

Creates a writable numpy wrapper around the original Dx data at the given index

dataE((MatrixWorkspace)self, (int)workspaceIndex) numpy.ndarray :#

Creates a writable numpy wrapper around the original E data at the given index

dataX((MatrixWorkspace)self, (int)workspaceIndex) numpy.ndarray :#

Creates a writable numpy wrapper around the original X data at the given index

dataY((MatrixWorkspace)self, (int)workspaceIndex) numpy.ndarray :#

Creates a writable numpy wrapper around the original Y data at the given index

delete(Workspace)#

Removes a workspace from memory.

Property descriptions:

Workspace(Input:req) Workspace Name of the workspace to delete.

detectorInfo((ExperimentInfo)self) mantid.geometry._geometry.DetectorInfo :#

Return a const reference to the DetectorInfo object.

detectorSignedTwoTheta((MatrixWorkspace)self, (mantid.geometry._geometry.IDetector)det) float :#

Returns the signed two theta value for given detector

detectorTwoTheta((MatrixWorkspace)self, (mantid.geometry._geometry.IDetector)det) float :#

Returns the two theta value for a given detector

displayNormalization((IMDWorkspace)self) MDNormalization :#

Returns the visual MDNormalization of the workspace.

displayNormalizationHisto((IMDWorkspace)self) MDNormalization :#

For MDEventWorkspaces returns the visual MDNormalization of derived MDHistoWorkspaces. For all others returns the same as displayNormalization.

equals((MatrixWorkspace)self, (MatrixWorkspace)other, (float)tolerance) bool :#

Performs a comparison operation on two workspaces, using the CompareWorkspaces algorithm

estimateResolution((MDGeometry)self) numpy.ndarray :#

Returns a numpy array containing the width of the smallest bin in each dimension

extractDx((MatrixWorkspace)self) object :#

Extracts (copies) the E data from the workspace into a 2D numpy array. Note: This can fail for large workspaces as numpy will require a block of memory free that will fit all of the data.

extractE((MatrixWorkspace)self) object :#

Extracts (copies) the E data from the workspace into a 2D numpy array. Note: This can fail for large workspaces as numpy will require a block of memory free that will fit all of the data.

extractX((MatrixWorkspace)self) object :#

Extracts (copies) the X data from the workspace into a 2D numpy array. Note: This can fail for large workspaces as numpy will require a block of memory free that will fit all of the data.

extractY((MatrixWorkspace)self) object :#

Extracts (copies) the Y data from the workspace into a 2D numpy array. Note: This can fail for large workspaces as numpy will require a block of memory free that will fit all of the data.

findY((MatrixWorkspace)self, (float)value[, (tuple)start=(0, 0)]) tuple :#

Find first index in Y equal to value. Start may be specified to begin at a specifc index. Returns tuple with the histogram and bin indices.

getAxis((MatrixWorkspace)self, (int)axis_index) MantidAxis :#

Get a pointer to a workspace axis

getBasisVector((MDGeometry)self, (int)index) mantid.kernel._kernel.VMD :#

Returns a VMD object defining the basis vector for the specified dimension

getComment((Workspace)self) str :#

Returns the comment field on the workspace

getDetector((MatrixWorkspace)self, (int)workspaceIndex) mantid.geometry._geometry.IDetector :#

Return the Detector or DetectorGroup that is linked to the given workspace index

getDetectorIDToWorkspaceIndexMap((MatrixWorkspace)self, (bool)throwIfMultipleDets, (bool)ignoreIfNoValidDets) dict :#

Return a map where the key is detector ID (pixel ID), and the value at that index = the corresponding workspace index

getDimension((MDGeometry)self, (int)index) mantid.geometry._geometry.IMDDimension :#

Returns the description of the IMDDimension at the given index (starts from 0). Raises RuntimeError if index is out of range.

getDimensionIndexById((MDGeometry)self, (str)id) int :#

Returns the index of the IMDDimension with the given ID. Raises RuntimeError if the name does not exist.

getDimensionIndexByName((MDGeometry)self, (str)name) int :#

Returns the index of the dimension with the given name. Raises RuntimeError if the name does not exist.

getDimensionWithId((MDGeometry)self, (str)id) mantid.geometry._geometry.IMDDimension :#

Returns the description of the IMDDimension with the given id string. Raises ValueError if the string is not a known id.

getEFixed((ExperimentInfo)self, (int)detId) float#
getEMode((ExperimentInfo)self) mantid.kernel._kernel.DeltaEModeType :#

Returns the energy mode.

getEventList((IEventWorkspace)self, (int)workspace_index) IEventList :#

Return the IEventList managing the events at the given Workspace index

getGeometryXML((MDGeometry)self) str :#

Returns an XML representation, as a string, of the geometry of the workspace

getHistory((Workspace)self) WorkspaceHistory :#

Return read-only access to the WorkspaceHistory

getIndexFromSpectrumNumber((MatrixWorkspace)self, (int)spec_no) int :#

Returns workspace index correspondent to the given spectrum number. Throws if no such spectrum is present in the workspace

getIndicesFromDetectorIDs((MatrixWorkspace)self, (list)detID_list) mantid.kernel._kernel.std_vector_size_t :#

Returns a list of workspace indices from the corrresponding detector IDs.

getInstrument((ExperimentInfo)self) mantid.geometry._geometry.Instrument :#

Returns the Instrument for this run.

static getInstrumentFilename((str)instrument[, (str)date='']) str :#

Returns IDF filename

getIntegratedCountsForWorkspaceIndices((MatrixWorkspace)self, (object)workspaceIndices, (int)numberOfWorkspaces, (float)minX, (float)maxX, (bool)entireRange) mantid.kernel._kernel.std_vector_dbl :#

Return a vector with the integrated counts within the given range for the given workspace indices

getMarkerSize((MatrixWorkspace)self) float :#

Returns the marker size for the workspace

getMarkerStyle((MatrixWorkspace)self) str :#

Return the marker style for the workspace

getMaxNumberBins((MatrixWorkspace)self) int :#

Returns the maximum number of bins in a workspace (works on ragged data).

getMemorySize((Workspace)self) int :#

Returns the memory footprint of the workspace in KB

getMonitorWorkspace((MatrixWorkspace)self) Workspace :#

Return internal monitor workspace bound to current workspace.

getNEvents((IMDWorkspace)self) int :#

Returns the total number of events, contributed to the workspace

getNPoints((IMDWorkspace)self) int :#

Returns the total number of points within the workspace

getName((Workspace)self) str :#

Returns the name of the workspace. This could be an empty string

getNonIntegratedDimensions((MDGeometry)self) list :#

Returns the description objects of the non-integrated dimension as a python list of IMDDimension.

getNumDims((MDGeometry)self) int :#

Returns the number of dimensions present

getNumNonIntegratedDims((MDGeometry)self) int :#

Returns the number of non-integrated dimensions present

getNumberBins((MatrixWorkspace)self, (int)index) int :#

Returns the number of bins for a given histogram index.

getNumberBins( (MatrixWorkspace)self) -> int :

Returns size of the Y data array (deprecated, use blocksize instead)

getNumberEvents((IEventWorkspace)self) int :#

Returns the number of events in the Workspace

getNumberHistograms((MatrixWorkspace)self) int :#

Returns the number of spectra in the workspace

getNumberTransformsFromOriginal((MDGeometry)self) int :#

Returns the number of transformations from original workspace coordinate systems

getNumberTransformsToOriginal((MDGeometry)self) int :#

Returns the number of transformations to original workspace coordinate systems

getOrigin((MDGeometry)self) mantid.kernel._kernel.VMD :#

Returns the vector of the origin (in the original workspace) that corresponds to 0,0,0… in this workspace

getOriginalWorkspace((MDGeometry)self, (int)index) Workspace :#

Returns the source workspace attached at the given index

getPlotType((MatrixWorkspace)self) str :#

Returns the plot type of the workspace

getPulseTimeMax((IEventWorkspace)self) mantid.kernel._kernel.DateAndTime :#

Returns the maximum pulse time held by the Workspace

getPulseTimeMin((IEventWorkspace)self) mantid.kernel._kernel.DateAndTime :#

Returns the minimum pulse time held by the Workspace

static getResourceFilenames((str)prefix, (list)fileFormats, (list)directoryNames, (str)date) list :#

Compile a list of files in compliance with name pattern-matching, file format, and date-stamp constraints

Ideally, the valid-from and valid-to of any valid file should encapsulate the argument date. If this is not possible, then the file with the most recent valid-from stamp is selected

prefix: the name of a valid file must begin with this pattern fileFormats: list of valid file extensions directoryNames: list of directories to be searched date : the ‘valid-from’ and ‘valid-to ‘dates of a valid file will encapsulate this date (e.g ‘1900-01-31 23:59:00’)

returns : list of absolute paths for each valid file

getRun((MatrixWorkspace)self) Run :#

Return the Run object for this workspace

getRunNumber((ExperimentInfo)self) int :#

Returns the run identifier for this run.

getSampleDetails((MatrixWorkspace)self) Run :#

Return the Run object for this workspace (deprecated, use getRun instead)

getSignalAtCoord((MatrixWorkspace)self, (object)coords, (MDNormalization)normalization) object :#

Return signal for array of coordinates

getSpecialCoordinateSystem((IMDWorkspace)self) mantid.kernel._kernel.SpecialCoordinateSystem :#

Returns the special coordinate system of the workspace

getSpectrum((MatrixWorkspace)self, (int)workspaceIndex) ISpectrum :#

Return the spectra at the given workspace index.

getSpectrumNumbers((MatrixWorkspace)self) list :#

Returns a list of all spectrum numbers in the workspace

getTDimension((MDGeometry)self) mantid.geometry._geometry.IMDDimension :#

Returns the IMDDimension description mapped to time

getTitle((Workspace)self) str :#

Returns the title of the workspace

getTofMax((IEventWorkspace)self) float :#

Returns the maximum TOF value (in microseconds) held by the Workspace

getTofMin((IEventWorkspace)self) float :#

Returns the minimum TOF value (in microseconds) held by the Workspace

getXDimension((MDGeometry)self) mantid.geometry._geometry.IMDDimension :#

Returns the IMDDimension description mapped to X

getYDimension((MDGeometry)self) mantid.geometry._geometry.IMDDimension :#

Returns the IMDDimension description mapped to Y

getZDimension((MDGeometry)self) mantid.geometry._geometry.IMDDimension :#

Returns the IMDDimension description mapped to Z

hasAnyMaskedBins((MatrixWorkspace)self) bool :#

Returns true if any of the bins in this workspace are masked.

hasDx((MatrixWorkspace)self, (int)workspaceIndex) bool :#

Returns True if the spectrum uses the DX (X Error) array, else False.

hasMaskedBins((MatrixWorkspace)self, (int)workspaceIndex) bool :#

Returns true if this spectrum contains any masked bins

hasOriginalWorkspace((MDGeometry)self, (int)index) bool :#

Returns True if there is a source workspace at the given index

id((DataItem)self) str :#

The string ID of the class

isCommonBins((MatrixWorkspace)arg1) bool :#

Returns true if the workspace has common X bins.

isCommonLogBins((MatrixWorkspace)arg1) bool :#

Returns true if the workspace has common X bins with log spacing.

isDirty((Workspace)self[, (int)n]) bool :#

True if the workspace has run more than n algorithms (Default=1)

isDistribution((MatrixWorkspace)self) bool :#

Returns the status of the distribution flag

isGroup((Workspace)self) bool :#

Returns if it is a group workspace

isHistogramData((MatrixWorkspace)self) bool :#

Returns True if this is considered to be binned data.

isMDHistoWorkspace((IMDWorkspace)self) bool :#

Returns True if this is considered to be binned data.

isRaggedWorkspace((MatrixWorkspace)self) bool :#

Returns true if the workspace is ragged (has differently sized spectra).

maskDetectors(Workspace, SpectraList=None, DetectorList=None, WorkspaceIndexList=None, MaskedWorkspace=None, ForceInstrumentMasking=None, StartWorkspaceIndex=None, EndWorkspaceIndex=None, ComponentList=None)#

An algorithm to mask a detector, or set of detectors, as not to be used. The workspace spectra associated with those detectors are zeroed.

Property descriptions:

Workspace(InOut:req) Workspace The name of the input and output workspace on which to perform the algorithm.

SpectraList(Input) int list A list of spectra to mask

DetectorList(Input) int list A list of detector ID’s to mask

WorkspaceIndexList(Input) unsigned int list A list of the workspace indices to mask

MaskedWorkspace(Input) MatrixWorkspace If given but not as a SpecialWorkspace2D, the masking from this workspace will be copied. If given as a SpecialWorkspace2D, the masking is read from its Y values.[]

ForceInstrumentMasking(Input) boolean Works when ‘MaskedWorkspace’ is provided and forces to use spectra-detector mapping even in case when number of spectra in ‘Workspace’ and ‘MaskedWorkspace’ are equal

StartWorkspaceIndex(Input) number If other masks fields are provided, it’s the first index of the target workspace to be allowed to be masked from by these masks, if not, its the first index of the target workspace to mask. Default value is 0 if other masking is present or ignored if not.

EndWorkspaceIndex(Input) number If other masks are provided, it’s the last index of the target workspace allowed to be masked to by these masks, if not, its the last index of the target workspace to mask. Default is number of histograms in target workspace if other masks are present or ignored if not.

ComponentList(Input) str list A list names of components to mask

maskedBinsIndices((MatrixWorkspace)self, (int)workspaceIndex) mantid.kernel._kernel.std_vector_size_t :#

Returns all the masked bins’ indices at the workspace index. hasMaskedBins MUST be called first to check if any bins are masked, otherwise an exception will be thrown

mutableRun((ExperimentInfo)self) Run :#

Return a modifiable Run object.

mutableSample((ExperimentInfo)self) Sample :#

Return a modifiable Sample object.

name((DataItem)self) str :#

The name of the object

numOriginalWorkspaces((MDGeometry)self) int :#

Returns the number of source workspaces attached

populateInstrumentParameters((ExperimentInfo)self) None :#

Update parameters in the instrument-parameter map. Logs must be loaded before calling this method

readDx((MatrixWorkspace)self, (int)workspaceIndex) numpy.ndarray :#

Creates a read-only numpy wrapper around the original Dx data at the given index

readE((MatrixWorkspace)self, (int)workspaceIndex) numpy.ndarray :#

Creates a read-only numpy wrapper around the original E data at the given index

readLock((DataItem)self) None :#

Acquires a read lock on the data item.

readX((MatrixWorkspace)self, (int)workspaceIndex) numpy.ndarray :#

Creates a read-only numpy wrapper around the original X data at the given index

readY((MatrixWorkspace)self, (int)workspaceIndex) numpy.ndarray :#

Creates a read-only numpy wrapper around the original Y data at the given index

rebin(InputWorkspace, Params, PreserveEvents=None, FullBinsOnly=None, IgnoreBinErrors=None, UseReverseLogarithmic=None, Power=None, BinningMode=None)#

Rebins data with new X bin boundaries. For EventWorkspaces, you can very quickly rebin in-place by keeping the same output name and PreserveEvents=true.

Property descriptions:

InputWorkspace(Input:req) MatrixWorkspace Workspace containing the input data

OutputWorkspace(Output:req) MatrixWorkspace The name to give the output workspace

Params(Input:req) dbl list A comma separated list of first bin boundary, width, last bin boundary. Optionally this can be followed by a comma and more widths and last boundary pairs. Optionally this can also be a single number, which is the bin width. In this case, the boundary of binning will be determined by minimum and maximum TOF values among all events, or previous binning boundary, in case of event Workspace, or non-event Workspace, respectively. Negative width values indicate logarithmic binning.

PreserveEvents(Input) boolean Keep the output workspace as an EventWorkspace, if the input has events. If the input and output EventWorkspace names are the same, only the X bins are set, which is very quick. If false, then the workspace gets converted to a Workspace2D histogram.

FullBinsOnly(Input) boolean Omit the final bin if its width is smaller than the step size

IgnoreBinErrors(Input) boolean Ignore errors related to zero/negative bin widths in input/output workspaces. When ignored, the signal and errors are set to zero

UseReverseLogarithmic(Input) boolean For logarithmic intervals, the splitting starts from the end and goes back to the start, ie the bins are bigger at the start getting exponentially smaller until they reach the end. For these bins, the FullBinsOnly flag is ignored.

Power(Input) number Splits the interval in bins which actual width is equal to requested width / (i ^ power); default is linear. Power must be between 0 and 1.

BinningMode(Input) string Optional. Binning behavior can be specified in the usual way through sign of binwidth and other properties (‘Default’); or can be set to one of the allowed binning modes. This will override all other specification or default behavior.[Default, Linear, Logarithmic, ReverseLogarithmic, Power]

replaceAxis((MatrixWorkspace)self, (int)axisIndex, (MantidAxis)newAxis) None :#

Replaces one of the workspace’s axes with the new one provided. The axis is cloned.

run((ExperimentInfo)self) Run :#

Return the Run object. This cannot be modified, use mutableRun to modify.

sample((ExperimentInfo)self) Sample :#

Return the Sample object. This cannot be modified, use mutableSample to modify.

setComment((Workspace)self, (str)comment) None :#

Set the comment field of the workspace

setDistribution((MatrixWorkspace)self, (bool)newVal) None :#

Set distribution flag. If True the workspace has been divided by the bin-width.

setDx((MatrixWorkspace)self, (int)workspaceIndex, (object)dX) None :#

Set Dx values from a python list or numpy array. It performs a simple copy into the array.

setE((MatrixWorkspace)self, (int)workspaceIndex, (object)e) None :#

Set E values from a python list or numpy array. It performs a simple copy into the array.

setEFixed((ExperimentInfo)self, (int)detId, (float)value) None#
setMarkerSize((MatrixWorkspace)self, (float)markerSize) None :#

Sets the size of the marker for the workspace

setMarkerStyle((MatrixWorkspace)self, (str)markerType) None :#

Sets the marker type for the workspace

setMonitorWorkspace((MatrixWorkspace)self, (object)MonitorWS) None :#

Set specified workspace as monitor workspace forcurrent workspace. Note: The workspace does not have to contain monitors though some subsequent algorithms may expect it to be monitor workspace later.

setPlotType((MatrixWorkspace)self, (str)newType) None :#

Sets a new plot type for the workspace

setRun((ExperimentInfo)self, (Run)run) None#
setSample((ExperimentInfo)self, (Sample)sample) None#
setTitle((Workspace)self, (str)title) None :#

Set the title of the workspace

setX((MatrixWorkspace)self, (int)workspaceIndex, (object)x) None :#

Set X values from a python list or numpy array. It performs a simple copy into the array.

setY((MatrixWorkspace)self, (int)workspaceIndex, (object)y) None :#

Set Y values from a python list or numpy array. It performs a simple copy into the array.

setYUnit((MatrixWorkspace)self, (str)newUnit) None :#

Sets a new unit for the data (Y axis) in the workspace

setYUnitLabel((MatrixWorkspace)self, (str)newLabel) None :#

Sets a new caption for the data (Y axis) in the workspace

spectrumInfo((ExperimentInfo)self) SpectrumInfo :#

Return a const reference to the SpectrumInfo object.

threadSafe((DataItem)self) bool :#

Returns true if the object can be accessed safely from multiple threads

unlock((DataItem)self) None :#

Unlocks a read or write lock on the data item.

yIndexOfX((MatrixWorkspace)self, (float)xvalue[, (int)workspaceIndex[, (float)tolerance]]) int :#

Returns the y index which corresponds to the X Value provided. The workspace_index [default=0] and tolerance [default=0.0] is optional.