Examples

Do it yourself examples

For all of these you will need to change your Facility to TEST_LIVE. You will need to be using Mantid version 3.2.1 or above.

  1. Open the “Help” menu and select “First Time Setup”
  2. Change the default facility to TEST_LIVE and click “Set”

You can follow the same approach to set your facility back afterwards.

Starting a Fake Instrument

ISIS Event

  1. Run the FakeISISEventDAE Algorithm from the Algorithms toolbox
  2. These settings will create an instrument with 100 spectra, transmitting 2000 events every 20 milliseconds in 1 period. The data is between 10,000 and 20,000 microseconds TOF.
    1. NPeriods = 1
    2. NSpectra = 100
    3. Rate = 20
    4. NEvents = 2000
  3. To stop the fake instrument, open the Algorithm Details window, by clicking on the “Running” button at the bottom of the Algorithms Toolbox. Then click “Cancel” next to FakeISISEventDAE.

ISIS Histogram

  1. Run the FakeISISHistoDAE Algorithm from the Algorithms toolbox
  2. These settings will create an instrument with 100 spectra, with 100 bins in 1 period.
    1. NPeriods = 1
    2. NSpectra = 100
    3. NBins = 100
  3. To stop the fake instrument, open the Algorithm Details window, by clicking on the “Details” button at the bottom of the Algorithms Toolbox. Then click “Cancel” next to FakeISISHistoDAE.

ADARA Fake Event

This approach reads from an SNS pre-nexus file to recreate realistic event data, however It is a little more fiddly to setup.

  1. Find the file “mantid.user.properties” it’s location will vary with your operating system.
    • Windows: c:MantidInstallbin
    • Mac or linux: ~/.mantid (in a .,mantid directory under your home directory)
  2. To use the “REF_L_32035_neutron_event.dat” file (located in the “TrainingCourseData” folder), open Mantid.user.properties in your favorite text editor and add the following lines:
fileeventdatalistener.filename=REF_L_32035_neutron_event.dat
fileeventdatalistener.chunks=300
  1. Start MantidPlot
  2. Use the instrument “ADARA_FileReader” in the “TEST_LIVE” facility in the First Time Setup. There is no need to stop this fake instrument.

The data from this file comprises almost 50,000 events across 77,824 histograms, with TOF values between 6,000 and 23,000 microseconds.

Starting a live data session

  1. Ensure that FakeISISHistoDAE and FakeISISEventDAE are running in the background to complete this example
  2. To open the StartLiveData interface you can either
    • click the drop down “Load” button in the Workspaces toolbox and select “Live Data”
    • Run the StartLiveData algorithm from the Algorithms toolbox

Stopping a live data session

A live data session will run until it is cancelled or Mantid is closed. To cancel a session:

  1. To stop the live data session, open the Algorithm Details window, by clicking on the “Details” button at the bottom of the Algorithms Toolbox
  2. Find the Algorithm “MonitorLiveData” and click the “Cancel” button next to it.

Live Histogram Data

Setup : ISIS Histogram For Histogram data the accumulationMethod needs to be set to Replace, you will get a warning otherwise.

  1. Open the StartLiveData interface
  2. Instrument: ISIS_Histogram
  3. Start Time: now
  4. Update Every: 1 second
  5. Processing: No Processing
  6. Accumulation Method: Replace
  7. Post Processing: No Processing
  8. OutputWorkspace: live

Live Event Rebin using an algorithm

Setup : ADARA Fake Event

  1. Open the StartLiveData interface
  2. Instrument: ADARA_FakeEvent
  3. Start Time: now
  4. Update Every: 1 second
  5. Processing: Algorithm
    1. Within the Processing step tab select the Rebin algorthm
    2. In the algorithm properties set Params to 40e3,1000,60e3
  6. PreserveEvents: unticked
  7. Accumulation Method: Add
  8. OutputWorkspace: live

Live Event Pre and post processing

This uses rebin to select a region of time of flight, and then after the data is accumulated it uses SumSpectra to sum all of the data into a single spectrum. When using post processing you have to give the accumulation workspace a name.

Setup : ADARA Fake Event

  1. Open the StartLiveData interface
  2. Instrument: ADARA_FakeEvent
  3. Start Time: now
  4. Update Every: 1 second
  5. Processing: Algorithm
    1. Within the Processing step tab select the Rebin algorthm
    2. In the algorithm properties set Params to 40e3,500,60e3
  6. PreserveEvents: Not Ticked
  7. Accumulation Method: Add
  8. Post Processing: Algorithm
    1. Within the Post Processing step tab select the SumSpectra algorthm
  9. AccumulationWorkspace: accumulation
  10. OutputWorkspace: live