AFL.agent.reduce_usaxs module#
Calculate R(Q) from raw USAXS data.
- AFL.agent.reduce_usaxs.amplifier_corrections(signal, seconds, dark, gain)#
correct for amplifier dark current and gain \(v = (s - t*d) / g\)
- AFL.agent.reduce_usaxs.calc_R_Q(wavelength, ar, seconds, pd, pd_bkg, pd_gain, I0, I0_bkg=None, I0_gain=None, ar_center=None, V_f_gain=None)#
Calculate 1-D \(R(Q)\) from raw USAXS data.
- Parameters:
wavelength (float) – \(lambda\), (\(\A\))
ar_center (float) – center of rocking curve along AR axis
ar (numpy.ndarray([float])) – array of crystal analyzer angles
seconds (numpy.ndarray([float])) – array of counting time for each point
pd (numpy.ndarray([float])) – array of photodiode counts
pd_bkg (numpy.ndarray([float])) – array of photodiode amplifier backgrounds
pd_gain (numpy.ndarray([float])) – array of photodiode amplifier gains
I0 (numpy.ndarray([float])) – array of incident monitor counts
I0_bkg (numpy.ndarray([float])) – array of I0 backgrounds
I0_amp_gain (numpy.ndarray([float])) – array of I0 amplifier gains
V_f_gain (numpy.ndarray([float])) – array of voltage-frequency converter gains
qVec (numpy.ndarray([float])) – \(Q\)
rVec (numpy.ndarray([float])) – \(R = I/I_o\)
- Returns dictionary:
Q, R
- AFL.agent.reduce_usaxs.centroid(x, y)#
Compute centroid of y(x).
- AFL.agent.reduce_usaxs.reduce_uascan(root)#
1-D data reduction, from livedata.
- AFL.agent.reduce_usaxs.remove_masked_data(data, mask)#
Remove all masked data, convenience routine.