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

GetEiT0atSNS v1

Summary

Get Ei and T0 on ARCS and SEQUOIA instruments.

See Also

GetEi

Properties

Name

Direction

Type

Default

Description

MonitorWorkspace

InOut

Workspace

Mandatory

Monitor workspace

IncidentEnergyGuess

Input

number

-1

Incident energy guess

Ei

Output

number

T0

Output

number

Description

Get Ei and T0 on ARCS and SEQUOIA instruments. It accounts for the following:

  • in the ADARA framework, the monitors are in the first frame.

  • SEQUOIA has event based monitors.

  • some data acquisition errors will create unphysical monitor IDs. This will be ignored

  • when vChTrans is 2, on ARCS and SEQUOIA there is no chopper in the beam (white beam). Will return not a number for both Ei and T0

The algorithm is doing the following:

  • Check which spectra corresponds to a physical monitor (as per instrument definition file)

  • Change the time of flight in the monitor spectra to the correct frame

  • Rebins the monitor workspace with a step of 1 microsecond

  • Uses GetEi to calculate incident energy and T0

Usage

Note

To run these usage examples please first download the usage data, and add these to your path. In Mantid this is done using Manage User Directories.

w=Load('ADARAMonitors.nxs')
run=w.getRun()
from mantid.kernel import DateAndTime
run.setStartAndEndTime(
    DateAndTime("2015-01-27T11:00:00"),
    DateAndTime("2015-01-27T11:57:51")
)
LoadInstrument(Workspace=w,InstrumentName='SEQUOIA',RewriteSpectraMap=False)
AddSampleLog(Workspace=w,LogName='vChTrans',LogText='1',LogType='Number Series')
AddSampleLog(Workspace=w,LogName='EnergyRequest',LogText='20',LogType='Number Series')
res=GetEiT0atSNS(w)

print("Incident energy: {:2.2f} meV".format(res[0]))
print("T0: {:2.2f} microseconds".format(res[1]))

Output:

Incident energy: 20.09 meV
T0: 30.42 microseconds

Categories: AlgorithmIndex | Inelastic\Ei

Source

Python: GetEiT0atSNS.py