magnopy.io.output_k_resolved#
- magnopy.io.output_k_resolved(data, data_headers=None, output_filename=None, kpoints=None, relative=False, rcell=None, flat_indices=None, digits=4, scientific_notation=True)[source]#
Outputs any k-resolved data.
Deprecated since version 0.2.0: Always meant to be a temporary solution. This function will be removed in March of 2026
- Parameters:
- data(N, M) array-like
Some k-resolved data. N (\(\ge 1\)) is the amount of kpoints. M is the number of data modes/entries.
- data_headers(N, ) list of str, optional
Header for the data columns.
[f"data {i+1} for i in range(len(data))]by default.- output_filenamestr, optional
Name of the file for saving the data. If
None, then return a list of lines.- kpoints(N, 3) array-like, optional
List of the kpoints.
kpoints[i]correspond to thedata[i].- relativebool, default False
If
relative == True, then givenkpointsare interpreted as relative to the reciprocal unit cell. Otherwise they are interpreted as absolute coordinates.- rcell(3, 3) array-like, optional
Reciprocal unit cell. Rows are interpreted as vectors, columns as Cartesian coordinates.
- flat_indices(N, 3) array-like, optional
kpoints converted to the list of floats according to some rule. Typically used for plotting the band structure. If
Noneprovided, then computed automatically, based on the distance of the givenkpoints(whether absolute or relative).- digitsint, default 4
Number of digits after the comma for the data elements.
- scientific_notationbool, default True
Whether to use scientific notation for the data elements.
- Returns:
- linesstr
Only returned if
output_filename is None. Useprint("\n".join(lines))to output the results to the standard output stream.