IXS and INS intensity maps without interpolation:

The script make_TDS_DispersionIntensityCurvesClone calculates IXS and INS intensities using only the eigenvectors and eigenvalues provided py the input file. The following steps must have been performed beforehand:

  • symmetrisation
  • Fourier transform
  • Debye waller calculation for the temperature of choice
  • The usage is

    make_TDS_DispersionIntensityCurvesClone QW_castep_filename input_filename castep_filename
    

    the file castep_filename can be either the name of the original castep output containing eigenvectors and eigenvalues on the MP grid. or the associated hdf5 file. In any case the associated hdf5 file must exist already ( make_TDS_Simmetrization must be runned beforehand )

    the file QW_castep_filename must contain eigenvectors and eigenvalues for the q-values of interest. A list of q-values can be created by the script make_TDS_DispersionIntensityCurves, eigenvectors and eigenvalues on these q-points must be calculated by an external program (e.g. CASTEP)

  • The input_file must set the variables :

    • Mandatories
      • APPLYTIMEREVERSAL
      • Temperature
      • resolutionfile
      • Saturation
      • lowerLimit
      • bottom_meV
    • If NEUTRONCALC==0 ( default )
      • Lambda
    • If NEUTRONCALC==1
      • CohB
      • NeutronE
    • Optional
      • branchWeight
      • Eigscal
      • UniqueIon

The input variables are documented with docstrings below

noindex:
make_TDS_DispersionIntensityCurvesClone.APPLYTIMEREVERSAL = 1

this is one by default. Must be coherent with previous steps

make_TDS_DispersionIntensityCurvesClone.Temperature = 100
The hdf5 file must include DW factors calculated ALSO at this temperature.
The temperature at which DW factors have been calculated.
Units are Kelvin
make_TDS_DispersionIntensityCurvesClone.resolutionfile = ''

a two column file : first the energy in cm-1, second the value of resolution function

make_TDS_DispersionIntensityCurvesClone.Lambda = 1.0

For X-ray scattering : the wavelenght in Angstroems.

make_TDS_DispersionIntensityCurvesClone.Saturation = 0

To limit intensity at peaks : intensity is saturated at this value

make_TDS_DispersionIntensityCurvesClone.lowerLimit = 0

To correct the dynamical range, when displaying, the intensity is clipped to prevent it going below this value

make_TDS_DispersionIntensityCurvesClone.bottom_meV = 0

Calculated eigenvalues are clipped to this value before use.

make_TDS_DispersionIntensityCurvesClone.NEUTRONCALC = 0

This activate neutron scattering calculations.

make_TDS_DispersionIntensityCurvesClone.CohB = None

When neutroncalc is on, this must be a dictionary : for each atom name the Coherent lenght.

make_TDS_DispersionIntensityCurvesClone.NeutronE = 0

When neutroncalc is on, the neutron energy in meV

make_TDS_DispersionIntensityCurvesClone.branchWeight = None

a list of weights : one per branch.

make_TDS_DispersionIntensityCurvesClone.Eigscal = 0

EigScal==1 Intensity are calculated WITH only eigenvector scalar products ; ==2 Intensity are calculated WITH only eigenvector scalar products PLUS Mass factor

make_TDS_DispersionIntensityCurvesClone.UniqueIon = -1

If >=0. Selects one ion. All the other will be silent.