glassure.soller_correction module
- class glassure.soller_correction.Map(X, Y, data)
Bases:
object
- class glassure.soller_correction.SollerCorrection(two_theta, max_thickness, inner_radius=62, outer_radius=210, inner_width=0.05, outer_width=0.2, inner_length=8, outer_length=6)
Bases:
object- calculate_dispersion_angle_map()
Creates a lookup table of dispersion angles for each two theta value and distance from the center of the soller slit rotation center :return: a map of the dispersion anges, out.X = two theta array, out.Y = distance array, out.data = dispersion angle
- transfer_function_dac(sample_thickness, initial_thickness)
Calculates two transfer function specific to diamond anvil cell (DAC) correction. It calculates the transfer function for the sample and also for the Compton scattering of diamonds which came into the diffraction volume due to the compression. :param sample_thickness: current sample thickness in mm :param initial_thickness: initial sample chamber thickness when background was measured, in mm :return: tuple of (sample transfer function, diamond transfer function), both with same dimensions as two_theta
- transfer_function_from_region(d1, d2)
Calculates the transfer function for a sample region within d1 and d2 :param d1: lower bound of the sample region :param d2: upper bound of the sample region :return: transfer function with same dimensions as two_theta
- transfer_function_sample(sample_thickness, shift=0)
Calculates the transfer function for a specific sample thickness, assuming the sample is centered, to the rotation center of the soller slit :param sample_thickness: sample thickness in mm :param shift: shift of the sample relative to rotation center of the soller slit in beam direction (x) :return: transfer function with same dimensions as two_theta
- class glassure.soller_correction.SollerCorrectionGui(q, wavelength, max_thickness, inner_radius=62, outer_radius=210, inner_width=0.05, outer_width=0.2, inner_length=8, outer_length=6)
Bases:
SollerCorrection
- glassure.soller_correction.calculate_angles(point1, point2, p)
calculates the angle between vectors going from the two points (point1, point2) to a central point p using the dot product.
- glassure.soller_correction.calculate_rectangular_side_points(radius, angle, width)
calculates the points which are rectangularly width/2 away at a certain angle, radius combination :return: 2 points with (x, y) coordinates
- glassure.soller_correction.calculate_x_axis_intercept(p1, p2)
obtains the x-axis intercept of a line defined by two points.
- glassure.soller_correction.calculate_y_axis_intercept(p1, p2)
obtains the y-axis intercept of a line defined by two points.
- glassure.soller_correction.vector_length(vec)