neutronpy.instrument.TimeOfFlightInstrument¶
-
class
neutronpy.instrument.
TimeOfFlightInstrument
(ei=3.0, choppers=None, sample=None, detector=None, guides=None, theta_i=0, phi_i=0, **kwargs)[source]¶ An object representing a Time of Flight (TOF) instrument experimental configuration, including a sample.
Parameters: - ei : float, optional
Incident energy in meV. Default: 3.0
- choppers : obj or list, optional
Chopper object or list of chopper objects defining all choppers. If list, choppers will be automatically sorted by distance from source. Default: See code.
- sample : obj, optional
Sample objection defining the properties of the sample. Default: See code.
- detector : obj, optional
Detector object defining the properties of the detector. Default: See code.
- guides : obj, optional
- theta_i : float, optional
Incident 2-theta in degrees. Default: 0
- phi_i : float, optional
Incident phi in degrees. Default: 0
Notes
If no initial values are specified, the default instrument is similar to the T-REX concept for the ESS specified in Violini et al. (2014).
Calculations of the resolution are based on equations in N. Violini et al., Nuclear Instruments and Methods in Physics Research A 736 (2014) 31-39.
Attributes: ei
Incident Energy object of type
Energy
- choppers
- sample
- detector
- guides
description_string
Generates text string describing most recent resolution calculation
Methods
calc_resolution
(hkle)For a scattering vector (H,K,L) and energy transfers W, given experimental conditions specified in the object, calculates the resolution matrix RMS and Resolution prefactor R0 in a coordinate system defined by the crystallographic axes of the sample, (h, k, l, w) in reciprocal lattice units (rlu). calc_resolution_in_Q_coords
(Q, W)For a momentum transfer Q and energy transfers W, given experimental conditions specified in EXP, calculates the Cooper-Nathans or Popovici resolution matrix RM and resolution prefactor R0 in the Q coordinate system (defined by the scattering vector and the scattering plane, [Q_prep, Q_para, Qz, W]). calc_projections
(hkle[, npts])Calculates the resolution ellipses for projections and slices from the resolution matrix. get_resolution_params
(hkle, plane[, mode])Returns parameters for the resolution gaussian. get_resolution
(hkle)Returns the resolution matrix and r0 correction at a given Q in rlu plot_projections
(hkle[, npts, dpi])Plots resolution ellipses in the QxQy, QxW, and QyW zones plot_ellipsoid
(hkle[, dpi])Plots the resolution ellipsoid in the $Q_x$, $Q_y$, $W$ zone plot_instrument
(hkle)Plots the instrument configuration using angles for a given position in Q and energy transfer plot_slice
(axis, qslice, projections, u, v)Class method for plotting individual projections.