diff --git a/dev-docs/source/EventWorkspaceDev.rst b/dev-docs/source/EventWorkspaceDev.rst index 4e65791274e145c7472897553b5fdd8f22bfb8ac..5ef1d4dedde58754763cad376b9bb1cc5e7d606a 100644 --- a/dev-docs/source/EventWorkspaceDev.rst +++ b/dev-docs/source/EventWorkspaceDev.rst @@ -13,15 +13,19 @@ The following information will be useful to you if you want to write an Individual Neutron Event Data (TofEvent) ######################################## -The TofEvent class holds information for each neutron detection event +The `TofEvent <https://github.com/mantidproject/mantid/blob/master/Framework/Types/inc/MantidTypes/Event/TofEvent.h>`_ class holds information for each neutron detection event data: - PulseTime: An absolute time of the pulse that generated this neutron. This is saved as an INT64 of the number of nanoseconds since Jan 1, 1990; this can be converted to other date and time formats as needed. + Internall the PulseTime is represented as a Kernel::DateAndTime type. - tof: Time-of-flight of the neutron, in microseconds, as a double. Note that this field can be converted to other units, e.g. d-spacing. +.. tip:: + There are in fact several variants of the Event type within Mantid. The common by far is the RAW TOF described above, but there are also ``Weighted`` events that offer better compression. + Lists of Events (EventList) ########################### @@ -29,12 +33,10 @@ Lists of Events (EventList) this list is not significant, since various algorithms will resort by time of flight or pulse time, as needed. -- Also contained in the EventList is a std::set of detector ID's. This - tracks which detector(s) were hit by the events in - the list. +- Also contained in the EventList is a std::set of detector ID's. This tracks which detector(s) were hit by the events in the list. ``EventList`` is a subtype of ``ISpectrum``, which provides the interface to many of the spectrum level access methods. - The histogram bins (X axis) are also stored in EventList. The Y and E - histogram data are not, however, as they are calculated by the MRU + histogram data are not, however, as they are calculated on demand by the MRU (below). The += operator can be used to append two EventList's together. The @@ -56,7 +58,7 @@ A note about workspace index / spectrum number / detector ID For event workspaces there is no benefit, and only a drawback to grouping detectors in hardware, therefore most of the loading algorithms for event data **match** the workspace index and spectrum number in the Event Workspace. Therefore, in an Event Workspace, the two numbers -will be the same, and your workspace's Axis[1] is a simple 1:1 map. As +will often be the same, and your workspace's Axis[1] is a simple 1:1 map. As mentioned above, the detectorID is saved in EventList, but the makeSpectraMap() method generates the usual SpectraDetectorMap object. @@ -68,8 +70,7 @@ like a :ref:`MatrixWorkspace <MatrixWorkspace>`. By default, if an algorithm performs an operation and outputs a new workspace, the WorkspaceFactory will create a :ref:`Workspace2D` *copy* of your Event Workspace's histogram representation. If you attempt to -change an Event Workspace's Y or E data in place, you will get an error -message, since that is not possible. +change an Event Workspace's Y or E data in place, you will get an ``NotImplementedError`` raised, since that is not possible. A Note about Thread Safety ########################## @@ -81,13 +82,12 @@ problems. This is because the histogramming code will try to sort the event list. If two threads try to sort the same event list, you can get segfaults. -Remember that the PARALLEL\_FOR1(), PARALLEL\_FOR2() etc. macros will +Remember that the ``PARALLEL\_FOR1()``, ``PARALLEL\_FOR2()`` etc. macros will perform the check Workspace->threadSafe() on the input Event Workspace. This function will return *false* (thereby disabling parallelization) if any of the event lists are unsorted. You can go around this by forcing the parallel loop with a plain -PARALLEL\_FOR() macro. **Make sure you do not read from the same +``PARALLEL\_FOR()`` macro. **Make sure you do not read from the same spectrum in parallel!** -.. include:: WorkspaceNavigation.txt diff --git a/dev-docs/source/index.rst b/dev-docs/source/index.rst index 0ac831a84b6a7dc6ddf437dea117753b039ee769..d9fbfe76cf26df7795dd6f1e5396443d25173b78 100644 --- a/dev-docs/source/index.rst +++ b/dev-docs/source/index.rst @@ -192,3 +192,4 @@ Component Overviews RemoteJobSubmissionAPI WritingAnAlgorithm WritingCustomConvertToMDTransformation + EventWorkspaceDev diff --git a/docs/source/concepts/EventWorkspace.rst b/docs/source/concepts/EventWorkspace.rst index 4c4d0f552e544250a2f7b41d084112c6ccefa24d..fb1f39e492cd74d66cf877d132fcbf9ea093aeb6 100644 --- a/docs/source/concepts/EventWorkspace.rst +++ b/docs/source/concepts/EventWorkspace.rst @@ -211,7 +211,6 @@ Please note these should only be done as part of a Python Algorithm, otherwise t For Developers/Writing Algorithms --------------------------------- -See the Event Workspace Development documentation - +See the Event Workspace section in development `documentation <http://developer.mantidproject.org/>`_ .. categories:: Concepts