corr module

Corrections for azimuthal integrated curves.

corr.check_material(material)[source]

Check material and raise error if not in xraydb.

corr.get_density(material)[source]

Return the density of a material in kg/m3.

corr.get_mu(material, energy, density=None)[source]

Return the absorption coefficient of a material in 1/m.

corr.get_sensor_info(detector_name)[source]

Get sensor material, thickness and density of known detectors.

corr.material_in_xraydb(material)[source]

Check if material is in xraydb.

corr.sample_transmission(tth, material, energy, thickness, density=None)[source]

Calculate the angular dependent transmission of a sample.

The sample is assumed to be a homogenous sheet with given thickness.

Parameters:
  • tth (float or array-like) – Scattering angle (deg).

  • material (str) – Chemical formula or material from materials list (‘xraydb’).

  • energy (float) – Photon energy (eV).

  • thickness (float) – Sample thickness (m).

  • density (float) – Sample density (kg/m3).

Returns:

t – Sample transmission.

Return type:

ndarray

corr.sensor_absorption(tth, material, energy, thickness, density=None)[source]

Calculate the angular dependent absorption of a sensor.

Parameters:
  • tth (float or array-like) – Scattering angle (deg).

  • material (str) – Chemical formula or material from materials list (‘xraydb’).

  • energy (float) – Photon energy (eV).

  • thickness (float) – Sensor thickness (m).

  • density (float) – Sensor density (kg/m3).

Returns:

A – Sensor absorption.

Return type:

ndarray