neutronpy.instrument.TripleAxisInstrument

class neutronpy.instrument.TripleAxisInstrument(efixed=14.7, sample=None, hcol=None, vcol=None, mono='PG(002)', mono_mosaic=25, ana='PG(002)', ana_mosaic=25, **kwargs)[source]

An object that represents a Triple Axis Spectrometer (TAS) instrument experimental configuration, including a sample.

Parameters:
efixed : float, optional

Fixed energy, either ei or ef, depending on the instrument configuration. Default: 14.7

sample : obj, optional

Sample lattice constants, parameters, mosaic, and orientation (reciprocal-space orienting vectors). Default: A crystal with a,b,c = 6,7,8 and alpha,beta,gamma = 90,90,90 and orientation vectors u=[1 0 0] and v=[0 1 0].

hcol : list(4)

Horizontal Soller collimations in minutes of arc starting from the neutron guide. Default: [40 40 40 40]

vcol : list(4), optional

Vertical Soller collimations in minutes of arc starting from the neutron guide. Default: [120 120 120 120]

mono_tau : str or float, optional

The monochromator reciprocal lattice vector in Å-1, given either as a float, or as a string for common monochromator types. Default: ‘PG(002)’

mono_mosaic : float, optional

The mosaic of the monochromator in minutes of arc. Default: 25

ana_tau : str or float, optional

The analyzer reciprocal lattice vector in Å-1, given either as a float, or as a string for common analyzer types. Default: ‘PG(002)’

ana_mosaic : float, optional

The mosaic of the monochromator in minutes of arc. Default: 25

Attributes:
method

Selects the computation method.

moncor

Selects the type of normalization used to calculate R0 If moncor=1 or left undefined, R0 is calculated in normalization to monitor counts (Section II C 2).

mono

A structure that describes the monochromator.

ana

A structure that describes the analyzer and contains fields as in mono plus optional fields.

hcol

The horizontal Soller collimations in minutes of arc (FWHM beam divergence) starting from the in-pile collimator.

vcol

The vertical Soller collimations in minutes of arc (FWHM beam divergence) starting from the in-pile collimator.

arms

distances between the source and monochromator, monochromator

efixed

the fixed incident or final neutron energy, in meV.

sample

A structure that describes the sample.

orient1

Miller indexes of the first reciprocal-space orienting vector for the S coordinate system, as explained in Section II G.

orient2

Miller indexes of the second reciprocal-space orienting vector for the S coordinate system, as explained in Section II G.

infin

a flag set to -1 or left unassigned if the final energy is fixed, or

beam
detector

A structure that describes the detector

monitor

A structure that describes the monitor

Smooth

Defines the smoothing parameters as explained in Section II H.

guide

A structure that describes the source

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 EXP, calculates the Cooper-Nathans resolution matrix RMS and Cooper-Nathans Resolution prefactor R0 in a coordinate system defined by the crystallographic axes of the sample.
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).
calc_projections(hkle[, npts]) Calculates the resolution ellipses for projections and slices from the resolution matrix.
get_angles_and_Q(hkle) Returns the Triple Axis Spectrometer angles and Q-vector given position in reciprocal space
get_lattice() Extracts lattice parameters from EXP and returns the direct and reciprocal lattice parameters in the form used by _scalar.m, _star.m, etc.
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
resolution_convolution(sqw, pref, nargout, hkle) Numerically calculate the convolution of a user-defined cross-section function with the resolution function for a 3-axis neutron scattering experiment.
resolution_convolution_SMA(sqw, pref, …[, …]) Numerically calculate the convolution of a user-defined single-mode cross-section function with the resolution function for a 3-axis neutron scattering experiment.
plot_slice(axis, qslice, projections, u, v) Class method for plotting individual projections.