shadow4.physical_models.bragg package

Submodules

shadow4.physical_models.bragg.bragg module

Crystal structure factor preprocessor for Bragg diffraction calculations.

Provides create_bragg_preprocessor_file_v2() to generate the SHADOW bragg preprocessor file (version 2), which encodes the crystal structure factor as a function of photon energy for a given crystal and Miller indices. The resulting file is consumed by crystalpy’s DiffractionSetupShadowPreprocessorV2.

shadow4.physical_models.bragg.bragg.bragg_calc2(descriptor='YB66', hh=1, kk=1, ll=1, temper=1.0, emin=5000.0, emax=15000.0, estep=100.0, ANISO_SEL=0, fileout=None, do_not_prototype=0, material_constants_library=None, verbose=False)[source]

Preprocessor for Structure Factor (FH) calculations. It calculates the basic ingredients of FH.

Parameters:
  • descriptor (str, optional) – crystal name (as in xraylib)

  • hh (int, optional) – miller index H

  • kk (int, optional) – miller index K

  • ll (int, optional) – miller index L

  • temper (float, optional) – temperature factor (scalar <=1.0 )

  • emin (float, optional) – photon energy minimum in eV

  • emax (float, optional) – photon energy maximum in eV

  • estep (float, optional) – photon energy step in eV

  • ANISO_SEL (int, optional) – 0: Do not use anisotropy. 1: Use anisotropy.

  • fileout (None or str, optional) – name for the output file (default=None, no output file)

  • do_not_prototype (int, optional) – for computing the structure factor, 0=sum over site groups (recommended), 1=sum over each individual sites

  • verbose (int, optional) – Set to 1 for verbose output.

  • material_constants_library (xraylib or instance of DabaxXraylib, optional) – The pointer to the material library to be used to retrieve scattering data.

Returns:

a dictionary with all ingredients of the structure factor.

Return type:

dict

shadow4.physical_models.bragg.bragg.create_bragg_preprocessor_file_v2(interactive=False, DESCRIPTOR='Si', H_MILLER_INDEX=1, K_MILLER_INDEX=1, L_MILLER_INDEX=1, TEMPERATURE_FACTOR=1.0, E_MIN=5000.0, E_MAX=15000.0, E_STEP=100.0, SHADOW_FILE='bragg.dat', material_constants_library=None)[source]

Preprocessor for Crystal Structure Factor calculations. It calculates the SHADOW bragg preprocessor file version 2.

Note that the created file is read using crystalpy: DiffractionSetupShadowPreprocessorV2() SHADOW4 can read version 1 file, but it cannot create it.

Parameters:
  • descriptor (str, optional) – crystal name (as in dabax, xraylib)

  • H_MILLER_INDEX (int, optional) – miller index H

  • K_MILLER_INDEX (int, optional) – miller index K

  • L_MILLER_INDEX (int, optional) – miller index L

  • TEMPERATURE_FACTOR (float, optional) – temperature factor (scalar <=1.0 )

  • E_MIN (float, optional) – photon energy minimum in eV

  • E_MAX (float, optional) – photon energy maximum in eV

  • E_STEP (float, optional) – photon energy step in eV

  • SHADOW_FILE (None or str, optional) – name for the output file (default=None, no output file)

  • material_constants_library (xraylib or instance of DabaxXraylib, optional) – The pointer to the material library to be used to retrieve scattering data.

Returns:

a dictionary with all ingredients of the structure factor.

Return type:

dict

Module contents