ScanSetup#
- class cbclib.ScanSetup(foc_pos, pupil_roi, rot_axis, smp_dist, wavelength, x_pixel_size, y_pixel_size)[source]#
Convergent beam crystallography experimental setup. Contains the parameters of the scattering geometry and experimental setup.
- Parameters
foc_pos (
ndarray) – Focus position relative to the detector [m].pupil_roi (
ndarray) – Region of interest of the aperture function in the detector plane. Comprised of four elements[y_min, y_max, x_min, x_max].rot_axis (
ndarray) – Axis of rotation.smp_dist (
float) – Focus-to-sample distance [m].wavelength (
float) – X-ray beam wavelength [m].x_pixel_size (
float) – Detector pixel size along the x axis [m].y_pixel_size (
float) – Detector pixel size along the y axis [m].
- contents()#
Return a list of the attributes stored in the container that are initialised.
- detector_to_kin(x, y, num_threads=1)[source]#
Project detector coordinates
(x, y)to the incident wave-vectors space.
- detector_to_kout(x, y, pos, idxs=None, num_threads=1)[source]#
Project detector coordinates
(x, y)to the output wave-vectors space originating from the pointpos.- Parameters
- Return type
- Returns
An array of output wave-vectors.
- get(attr, value=None)#
Retrieve a dataset, return
valueif the attribute is not found.
- classmethod import_ini(ini_file)#
Initialize the container object with an INI file
ini_file.
- items()#
Return (key, value) pairs of the datasets stored in the container.
- Return type
- Returns
(key, value) pairs of the datasets stored in the container.
- keys()#
Return a list of the attributes available in the container.
- kin_to_sample(kin, smp_z=None, idxs=None, num_threads=1)[source]#
Project incident wave-vectors to the sample planes located at the z coordinates
smp_z.- Parameters
- Return type
- Returns
An array of points pertaining to the sample planes.
- kout_to_detector(kout, pos, idxs=None, num_threads=1)[source]#
Project output wave-vectors originating from the point
posto the detector plane.- Parameters
- Return type
- Returns
A tuple of x and y detector coordinates.
- replace(**kwargs)#
Return a new container object with a set of attributes replaced.
- static str_to_list(strings)#
Convert strings to a list of strings.
- tilt_rotation(theta)[source]#
Return a tilt rotation by the angle
thetaarount the axis of rotation.- Parameters
theta (
float) – Angle of rotation.- Return type
- Returns
A new
cbclib.Rotationobject.
- tilt_samples(frames, thetas)[source]#
Return a list of sample position and orientations of a tilt series.
- Parameters
- Return type
- Returns
A container of sample objects
ScanSamples.
- to_ini(ini_file)#
Save all the attributes stored in the container to an INI file
ini_file.- Parameters
ini_file (
str) – Path to the ini file.
- values()#
Return the attributes’ data stored in the container.
- Return type
- Returns
List of data stored in the container.