sportran.analysis

This module is the CLI of the library, that can be called after installing it from the command line

Functions

concatenate_if_not_none_with_labels(concat)

main()

  • SPORTRAN * command line interface This script performs the cepstral analysis of a (heat) current. Results are written to stdout and a log file, and plots are saved in PDF format.

run_analysis(args)

Classes

TCOutput()

sportran.analysis.concatenate_if_not_none_with_labels(concat, labels=None)
sportran.analysis.main()

* SPORTRAN * command line interface

This script performs the cepstral analysis of a (heat) current. Results are written to stdout and a log file, and plots are saved in PDF format.

INPUT FORMAT:
  • tablea column-formatted text file, with a header in the same format of LAMMPS.

    The name of the LAMMPS compute can start with c_ and end with [#some_number], the code will recognize vectors, and will read automatically all the components.

  • dict : a Numpy binary file containing a dictionary (e.g. obtained from the script i_o/read_lammps_log.py)

  • LAMMPSa LAMMPS log file.

    In this case a –run-keyword must be provided, that identifies the desired ‘run’ command. This keyword must equal to the comment line placed just before the desired ‘run’ command (see documentation of i_o/read_lammps_log.py for an example).

Physical parameters (time step, temperature, volume, units) must be provided. The average temperature is computed if a column with the header (or a dictionary key) ‘Temp’ is found; otherwise you have to specify it.

You must provide the key that identifies the main current (‘-k KEY’) You can also provide additional currents if your system is a multi-component fluid (‘-j CURRENT2 -j CURRENT3’), or you want to decorrelate the main current with respect to them (see PRL). (Notice that the output is the same with any number of components. If you have a lots of components, note that you may want to use more than 3 independent processes – see theory.)

OUTPUT FILES:
[output].logfile

A log of the available information.

[output].plots.pdf

A PDF with all the plots generated.

OUTPUT DATA files (can be text “.dat” or binary “.npy”):
[output].psd

freqs [THz], original periodogram, original log(periodogram)

[output].cospectrum (if any)

freqs [THz], full matrix cospectrum

[output].resampled_psd

freqs [THz], resampled periodogram, resampled log(periodogram)

[output].cepstral

cepstral coefficients ck, error(ck), L0(P*), err(L0(P*)), kappa(P*) [W/mK], err(kappa(P*)) [W/mK] the line number minus one is the number of cepstral coefficients used (P*).

[output].cepstrumfiltered_psd

freqs [THz], cepstrum-filtered periodogram, cepstrum-filtered log(periodogram)

Example:

read and analyze “examples/data/Silica.dat” file. The energy-flux columns are called c_flux[1], c_flux[2], c_flux[3]

./analysis “examples/data/Silica.dat” –VOLUME 3130.431110818 –TEMPERATURE 1065.705630 -t 1.0 -k flux1 -u metal -r –FSTAR 28.0 -w 0.5 -o silica_test

sportran.analysis.run_analysis(args)