This object is a small tool to allow user to quickly determine the variance in q from the instrumental parameters.
Bases: object
compute resolution in 2D
Compute the Q resoltuion in || and + direction of 2D : qx_value: x component of q : qy_value: y component of q
Compute the resolution : qx_value: x component of q : qy_value: y component of q
Get all instrumental parameters
Get default_spectrum
Get detector pixel size
get max detector q ranges
: return: qx_min, qx_max, qy_min, qy_max tuple
Get detector size
Get the resolution in polar coordinate ready to plot : qx_value: qx_value value : qy_value: qy_value value : sigma_1: variance in r direction : sigma_2: variance in phi direction : coord: coordinate system of image, ‘polar’ or ‘cartesian’
Get intensity
Set wavelength spread
Get Neutron mass
Get detector sample2detector_distance
Get detector sampleslitsample_distance
Get sample aperture size
Get detector source2sample_distance
Get source aperture size
Get _spectrum
Get the variance when the slit/pinhole size is given : size: list that can be one(diameter for circular)
or two components(lengths for rectangular)
: distance: [z, x] where z along the incident beam, x // qx_value : comp: direction of the sigma; can be ‘phi’, ‘y’, ‘x’, and ‘radial’
: return variance: sigma^2
Get the variance from gravity when the wavelength spread is given
: s_distance: source to sample distance : d_distance: sample to detector distance : wavelength: wavelength : spread: wavelength spread (ratio) : comp: direction of the sigma; can be ‘phi’, ‘y’, ‘x’, and ‘radial’
: return variance: sigma^2
Get the variance when the wavelength spread is given
: radius: the radial distance from the beam center to the pix of q : distance: sample to detector distance : spread: wavelength spread (ratio) : comp: direction of the sigma; can be ‘phi’, ‘y’, ‘x’, and ‘radial’
: return variance: sigma^2
Set wavelength spread
Get wavelength
Get wavelength spread
Plot image using pyplot : image: 2d resolution image
: return plt: pylab object
Reset image to default (=[])
Set detector pixel size
Set detector size in number of pixels : param size: [pixel_nums] or [x_pix_num, yx_pix_num]
Set intensity
Set Neutron mass
Set detector sample2detector_distance
: param distance: [distance, x_offset]
Set detector sample_slit2sample_distance
: param distance: [distance, x_offset]
Set sample aperture size
: param size: [dia_value] or [xheight_value, yheight_value]
Set detector source2sample_distance
: param distance: [distance, x_offset]
Set source aperture size
: param size: [dia_value] or [x_value, y_value]
Set spectrum
Set wavelength list or wavelength
Set wavelength and its spread list
Set wavelength spread or wavelength spread
Set wavelength
Set wavelength spread
Setup all parameters in instrument
: param ind: index of lambda, etc