Sample

The static and dynamic structure factors as well as current correlation functions generated by the main analysis functions are stored in Sample objects.

Information about the dynamic correlations generated by the compute_dynamic_structure_factors function is provided in the form of a DynamicSample object. The latter allows one to access, for example, the intermediate scattering functions via the following attributes:

Attribute

Explanation

Symbol

Fqt_coh_A_B

partial coherent intermediate scattering function for atom types A and B

\(F(\boldsymbol{q},t)_\mathrm{AB}^\mathrm{coh}\)

Fqt_coh

total coherent intermediate scattering function

\(F(\boldsymbol{q},t)^\mathrm{coh}\)

Fqt_incoh_A

partial incoherent intermediate scattering function for atom type A

\(F(\boldsymbol{q},t)_\mathrm{A}^\mathrm{incoh}\)

Fqt_incoh

total incoherent intermediate scattering function

\(F(\boldsymbol{q},t)^\mathrm{incoh}\)

Fqt

total intermediate scattering function

\(F(\boldsymbol{q},t)^\mathrm{coh} + F(\boldsymbol{q},t)^\mathrm{incoh}\)

Similarly, one can access

  • dynamic structure factors \(S(\boldsymbol{q}, \omega)\) via attributes starting with Sqw

  • the longitudinal and transverse current correlation functions in the time domain, \(C_L(\boldsymbol{q}, t)\) and \(C_T(\boldsymbol{q}, t)\), via attributes starting with Clqt and Ctqt, respectively, and

  • the longitudinal and transverse current correlation functions in the frequency domain, \(C_L(\boldsymbol{q}, \omega)\) and \(C_T(\boldsymbol{q}, \omega)\), via attributes starting with Clqw and Ctqw, respectively.

Information about static correlations can be obtained via the compute_static_structure_factors function, which returns a StaticSample object. The latter allows one to access the static structure factor via the attribute Sq.

dynasor.read_sample_from_npz(fname)[source]

Read Sample from file.

Parameters

fname (str) – Path to the file (numpy npz format) from which to read the Sample object.

Return type

Sample

class dynasor.sample.DynamicSample(data_dict, **meta_data)[source]
property available_correlation_functions

All the available correlation functions in sample.

property dimensions

The dimensions for the samples, e.g., for \(S(q, \omega)\) the dimensions would be the \(q\) and \(\omega\) axes.

property has_currents

Whether this sample contains the current correlation functions or not.

property has_incoherent

Whether this sample contains the incoherent correlation functions or not.

to_dataframe(q_index)[source]

Returns correlation functions as pandas dataframe for the given q-index.

Parameters

q_index (int) – index of q-point to return

write_to_npz(fname)

Write object to file in numpy’s npz format.

Parameters

fname (str) – Name of the file in which to store the Sample object.

class dynasor.sample.StaticSample(data_dict, **meta_data)[source]
property available_correlation_functions

All the available correlation functions in sample.

property dimensions

The dimensions for the samples, e.g., for \(S(q, \omega)\) the dimensions would be the \(q\) and \(\omega\) axes.

property has_currents

Whether this sample contains the current correlation functions or not.

property has_incoherent

Whether this sample contains the incoherent correlation functions or not.

to_dataframe()[source]

Returns correlation functions as pandas dataframe

write_to_npz(fname)

Write object to file in numpy’s npz format.

Parameters

fname (str) – Name of the file in which to store the Sample object.