ess.sans.i_of_q.to_I_of_Q
ess.sans.i_of_q.to_I_of_Q#
- ess.sans.i_of_q.to_I_of_Q(data, data_monitors, direct_monitors, direct_beam, wavelength_bins, q_bins, gravity=False, wavelength_mask=None, wavelength_bands=None, signal_over_monitor_threshold=0.1)#
Compute the scattering cross-section I(Q) for a SANS experimental run, performing binning in Q and a normalization based on monitor data and a direct beam function.
The main steps of the workflow are:
Generate a coordinate transformation graph from
tof
toQ
, that also includeswavelength
.Convert the detector data to wavelength.
Compute the transmission fraction from the monitor data.
Compute the solid angles of the detector pixels.
Resample the direct beam function to the same wavelength binning as the monitors.
Combine solid angle, direct beam, transmission fraction and incident monitor counts to compute the denominator for the normalization.
Convert the detector data to momentum vector Q.
Convert the denominator to momentum vector Q.
Normalize the detector data.
- Parameters
data (
DataArray
) – The detector data. This can be both events or dense (histogrammed) data.data_monitors (
Dict
[str
,DataArray
]) – The data arrays for the incident and transmission monitors for the measurement run (background noise removed and converted to wavelength).direct_monitors (
Dict
[str
,DataArray
]) – The data arrays for the incident and transmission monitors for the direct run (background noise removed and converted to wavelength).direct_beam (
DataArray
) – The direct beam function of the instrument (histogrammed, depends on wavelength).wavelength_bins (
Variable
) – The binning in the wavelength dimension to be used.q_bins (
Union
[int
,Variable
]) – The binning in the Q dimension to be used.gravity (
bool
, default:False
) – Include the effects of gravity when computing the scattering angle ifTrue
.wavelength_mask (
Optional
[DataArray
], default:None
) – Mask to apply to the wavelength coordinate (to mask out artifacts from the instrument beamline). Seecommon.mask_range()
for more details.wavelength_bands (
Optional
[Variable
], default:None
) – If defined, return the data as a set of bands in the wavelength dimension. This is useful for separating different wavelength ranges that contribute to different regions in Q space.signal_over_monitor_threshold (
float
, default:0.1
) – The threshold for the ratio of detector counts to monitor counts above which an error is raised because it is not safe to drop the variances of the monitor.
- Returns
DataArray
– The intensity as a function of Q.