magneticScattering.scatter.Sample#

class Sample(sample_length, scattering_factors, structure)#

Bases: object

Describes the sample properties.

Parameters:
sample_lengtharray_like

The dimensions of the sample in meters.

scattering_factors3-list of complex

The complex scattering factors corresponding to charge, XMCD and XMLD.

structurenp.ndarray

The magnetic (and electronic) configuration of the sample.

Methods

calc_pix_size

Calculates the size of a single pixel in the structure.

get_coordinates

Meshgrid spanning the sample.

get_extent

The extent of the sample for plotting.

Attributes

pix_size

The pixel size of the sample; the size of a single pixel.

sample_length

The lateral size of the entire sample or array configuration.

scattering_factors

The three complex scattering factors of the material.

shape

The shape of the sample.

structure

The charge and three magnetization components of the sample.

tracker

Function to notify parent of any changes to the class.

calc_pix_size()#

Calculates the size of a single pixel in the structure.

Returns:
np.ndarray

Pixel size along the x and y dimensions.

get_coordinates()#

Meshgrid spanning the sample.

Returns:
list of np.ndarray

list containing the coordinates obtained from meshgrid.

get_extent()#

The extent of the sample for plotting.

Returns:
np.ndarray

Array with shape (4,) describing the extent of the sample for plotting.

property pix_size#

The pixel size of the sample; the size of a single pixel.

property sample_length#

The lateral size of the entire sample or array configuration.

property scattering_factors#

The three complex scattering factors of the material.

property shape#

The shape of the sample.

property structure#

The charge and three magnetization components of the sample.

property tracker#

Function to notify parent of any changes to the class.