vacf_output_file_writer¶
A module containing the classes for writing related to an
VACF analysis to a file.
Summary¶
Classes:
Reference¶
- class VACFDataWriter(
- filename: str,
- export_files: Sequence[str] | None = None,
- mode: str | FileWritingMode = 'w',
Bases:
AnalysisDataWriterClass for writing the data of an
VACFanalysis to a file.The output file is written in the legacy FreqCalc/Fluxfreqcalc format: one row per lag with the columns lag time in ps and normalized VACF.
- Parameters:
filename (str) – The primary output filename. Its extension selects the format.
export_files (Sequence[str] | None, optional) – Additional output filenames, by default None.
mode (str | FileWritingMode, optional) – The writing mode: “w” stops if a file exists, “a” appends, “o” overwrites, by default “w”.
- write(
- data: tuple[Np1DNumberArray, Np1DNumberArray],
Writes the data to the file.
- Parameters:
data (Tuple[Np1DNumberArray, Np1DNumberArray]) – the time axis and correlation function output from the VACF.run() method
- header = '# PQAnalysis: Normalized correlation function\n# FIELDS time normalized_correlation\n# SYMBOLS t C(t)∕C(0)\n# UNITS ps 1'¶
- schema: AnalysisSchema = AnalysisSchema(title='Normalized correlation function', columns=(AnalysisColumn(field='time', symbol='t', unit='ps'), AnalysisColumn(field='normalized_correlation', symbol='C(t)∕C(0)', unit='1')), plot=AnalysisPlotPreset(x_field='time', y_fields=('normalized_correlation',), x_label='t [ps]', y_label='C(t) / C(0)', legends=('C(t) / C(0)',), graphs=()), units_in_header=False)¶
- class VACFLogWriter(
- filename: str | None,
- mode: str | FileWritingMode = 'w',
Bases:
BaseWriterClass for writing the log (setup parameters) of an
VACFanalysis to a file.- Parameters:
filename (str | None) – the filename to write to if None, the output is printed to stdout
mode (str | FileWritingMode, optional) – The writing mode: “w” stops if a file exists, “a” appends, “o” overwrites, by default “w”.
- class VACFSpectrumDataWriter(
- filename: str,
- export_files: Sequence[str] | None = None,
- mode: str | FileWritingMode = 'w',
Bases:
AnalysisDataWriterClass for writing the spectrum of an
VACFanalysis to a file.The output file is written in the legacy ft.f format: one row per frequency index with the columns wavenumber in cm^-1 and amplitude.
- Parameters:
filename (str) – The primary output filename. Its extension selects the format.
export_files (Sequence[str] | None, optional) – Additional output filenames, by default None.
mode (str | FileWritingMode, optional) – The writing mode: “w” stops if a file exists, “a” appends, “o” overwrites, by default “w”.
- write(
- data: tuple[Np1DNumberArray, Np1DNumberArray],
Writes the spectrum to the file.
- Parameters:
data (Tuple[Np1DNumberArray, Np1DNumberArray]) – the wavenumbers and amplitudes output from the
vacf_spectrum()function
- header = '# PQAnalysis: VACF spectrum\n# FIELDS wavenumber amplitude\n# SYMBOLS ν̃ |Ĉ(ν̃)|\n# UNITS cm⁻¹ arbitrary'¶
- schema: AnalysisSchema = AnalysisSchema(title='VACF spectrum', columns=(AnalysisColumn(field='wavenumber', symbol='ν̃', unit='cm⁻¹'), AnalysisColumn(field='amplitude', symbol='|Ĉ(ν̃)|', unit='arbitrary')), plot=AnalysisPlotPreset(x_field='wavenumber', y_fields=('amplitude',), x_label='Wavenumber [cm\\S-1\\N]', y_label='Amplitude [a.u.]', legends=('Amplitude',), graphs=()), units_in_header=False)¶
- class VACFWindowedDataWriter(
- filename: str,
- export_files: Sequence[str] | None = None,
- mode: str | FileWritingMode = 'w',
Bases:
AnalysisDataWriterClass for writing the windowed (apodized) correlation function of an
VACFanalysis to a file.The output file is written in the legacy ft.f windowfile format: one row per lag with the columns lag time in ps and windowed correlation function.
- Parameters:
filename (str) – The primary output filename. Its extension selects the format.
export_files (Sequence[str] | None, optional) – Additional output filenames, by default None.
mode (str | FileWritingMode, optional) – The writing mode: “w” stops if a file exists, “a” appends, “o” overwrites, by default “w”.
- write(
- data: tuple[Np1DNumberArray, Np1DNumberArray],
Writes the windowed correlation function to the file.
- Parameters:
data (Tuple[Np1DNumberArray, Np1DNumberArray]) – the time axis and the windowed correlation function output from the
vacf_spectrum()function
- header = '# PQAnalysis: Windowed correlation function\n# FIELDS time windowed_correlation\n# SYMBOLS t C(t)w(t)\n# UNITS ps 1'¶
- schema: AnalysisSchema = AnalysisSchema(title='Windowed correlation function', columns=(AnalysisColumn(field='time', symbol='t', unit='ps'), AnalysisColumn(field='windowed_correlation', symbol='C(t)w(t)', unit='1')), plot=AnalysisPlotPreset(x_field='time', y_fields=('windowed_correlation',), x_label='t [ps]', y_label='C(t)w(t)', legends=('Windowed correlation',), graphs=()), units_in_header=False)¶