\(\renewcommand\AA{\unicode{x212B}}\)

EventList

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

bases: mantid.api.IEventList

class mantid.dataobjects.EventList
addDetectorID((ISpectrum)self, (int)det_id) None :

Add a detector ID to this spectrum

addEventQuickly((EventList)self, (float)tof, (DateAndTime)pulsetime) None :

Create TofEvent and add to EventList.

addPulsetime((IEventList)self, (float)seconds) None :

Add an offset to the pulsetime (wall-clock time) of each event in the list.

addPulsetimes((IEventList)self, (object)seconds) None :

Add offsets to the pulsetime (wall-clock time) of each event in the list.

addTof((IEventList)self, (float)offset) None :

Add an offset to the TOF of each event in the list.

addWeightedEventQuickly((EventList)self, (float)tof, (float)weight, (float)errorsquare, (DateAndTime)pulsetime) None :

Create weighted TofEvent and add to eventlist

clear((IEventList)self, (bool)removeDetIDs) None :

Clears the event list

clearDetectorIDs((ISpectrum)self) None :

Clear the set of detector IDs

convertTof((IEventList)self, (float)factor, (float)offset) None :

Convert the time of flight by tof’=tof*factor+offset

divide((IEventList)self, (float)value, (float)error) None :

Divide the weights in this event list by a scalar with an (optional) error.

getDetectorIDs((ISpectrum)self) std_set_int :

Returns a list of detector IDs for this spectrum

getEventType((IEventList)self) EventType :

Return the type of events stored.

getMemorySize((IEventList)self) int :

Returns the memory size in bytes

getNumberEvents((IEventList)self) int :

Returns the number of events within the list

getPulseTimeMax((IEventList)self) DateAndTime :

The maximum pulse time for the list of the events.

getPulseTimeMin((IEventList)self) DateAndTime :

The minimum pulse time for the list of the events.

getPulseTimes((IEventList)self) std_vector_dateandtime :

Get a vector of the pulse times of the events

getPulseTimesAsNumpy((IEventList)arg1) numpy.ndarray :

Get a vector of the pulse times of the events

getSpectrumNo((ISpectrum)self) int :

Returns the spectrum number of this spectrum

getTofMax((IEventList)self) float :

The maximum tof value for the list of the events.

getTofMin((IEventList)self) float :

The minimum tof value for the list of the events.

getTofs((IEventList)self) numpy.ndarray :

Get a vector of the TOFs of the events

getWeightErrors((IEventList)self) numpy.ndarray :

Get a vector of the weights of the events

getWeights((IEventList)self) numpy.ndarray :

Get a vector of the weights of the events

hasDetectorID((ISpectrum)self, (int)det_id) bool :

Returns True if the spectrum contain the given spectrum number

hasDx((ISpectrum)self) bool :

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

integrate((IEventList)self, (float)minX, (float)maxX, (bool)entireRange) float :

Integrate the events between a range of X values, or all events.

isSortedByTof((IEventList)self) bool :

Returns true if the list is sorted in TOF

maskCondition((IEventList)self, (object)mask) None :

Mask out events by the condition vector

maskTof((IEventList)self, (float)tofMin, (float)tofMax) None :

Mask out events that have a tof between tofMin and tofMax (inclusively)

multiply((IEventList)self, (float)value, (float)error) None :

Multiply the weights in this event list by a scalar variable with an error; though the error can be 0.0

scaleTof((IEventList)self, (float)factor) None :

Convert the tof units by scaling by a multiplier.

setDetectorID((ISpectrum)self, (int)det_id) None :

Set the given ID has the only

setSpectrumNo((ISpectrum)self, (int)num) None :

Set the spectrum number for this spectrum

switchTo((IEventList)self, (EventType)newType) None :

Switch the event type to the one specified